Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
ED846905
90521-905-9226-583702
9.05.702
Revision: March 14, 2013 1:13 a.m.
Total pages: 121
course.ditaval
Crystal Reports Course Contents
Contents
Crystal Reports Course...........................................................................................................8
Before You Begin....................................................................................................................9
Audience.........................................................................................................................................................9
Prerequisites....................................................................................................................................................9
Environment Setup..........................................................................................................................................9
Workshop Constraints............................................................................................................................10
Crystal Reports Overview....................................................................................................11
BAQ Report Designer...........................................................................................................13
Setup Information..........................................................................................................................................15
Workshop - Define BAQ Report Paths.....................................................................................................15
Setup Crystal Reports......................................................................................................................15
Setup BAQ Report Options..............................................................................................................16
Detail.............................................................................................................................................................17
BAQ Report Additional Details................................................................................................................17
Workshop - Define Report Details...........................................................................................................17
Option Fields..................................................................................................................................................19
Workshop - Add Option Fields................................................................................................................19
Add Option Field 1..........................................................................................................................19
Add Option Field 2..........................................................................................................................20
Filters.............................................................................................................................................................21
Workshop - Define Filters........................................................................................................................21
Add Filter 1.....................................................................................................................................21
Add Filter 2.....................................................................................................................................21
Sorts..............................................................................................................................................................22
Workshop - Label Sorts...........................................................................................................................22
Add Sort Option 1...........................................................................................................................22
Add Sort Option 2...........................................................................................................................23
The BAQ Report Designer Actions Menu........................................................................................................24
Test Report Form....................................................................................................................................24
Creating an .xml Datasource............................................................................................................24
Workshop - Test the BAQ Report.....................................................................................................24
Generate Sample Data............................................................................................................................26
Workshop - Generate Sample Data..................................................................................................26
Create a Sample Data File.........................................................................................................26
Review the Sample Data File.....................................................................................................26
Design Crystal Report.............................................................................................................................28
Workshop - Set Up the Crystal Report.............................................................................................28
Set Datasource Location...........................................................................................................28
Set Up Available Datasources...................................................................................................29
Add Report Fields.....................................................................................................................30
This course introduces Crystal Reports®. It discusses how to use Crystal Reports and the Business Activity Query
(BAQ) Report Designer to design and create reports as well as how to modify existing Crystal Report forms. In
addition, this course reviews relational database concept fundamentals such as tables, table relationships, records,
and field types.
Crystal Reports is a reporting tool that helps you design flexible, high-quality reports from virtually any datasource
including xml and Online Analytical Processing (OLAP). Extensive formatting options give you complete control
over how to present data. These design and formatting options include grouping, sorting, field highlighting, and
field summarization.
The Epicor application has an integral relationship with Crystal Reports. The data pulled into a Crystal report is
gathered using a BAQ.
Note The BAQs are predefined for this course.
Read this topic for information you should know in order to successfully complete this course.
Audience
Prerequisites
In order to complete the workshops in this course, all necessary modules must be licensed and operating in your
training environment. For more information on the modules available, contact your Epicor Customer Account
Manager at EpicorCAM@epicor.com. It is also important you understand the prerequisite knowledge contained
in other valuable courses.
• Navigation Course - This course introduces navigational aspects of the Epicor application's user interface.
Designed for a hands-on environment, general navigation principles and techniques are available at each of
the interface levels in the Epicor application - system, module, and program. Workshops focus on each of
these levels and guide you through each navigational principle introduced.
• BAQ and Advanced Dashboard Course - The Business Activity Query (BAQ) program allows the user to
create personalized queries and copy standard queries so they can be modified. Once a query is created, it
can be viewed through the Dashboard interface. The queries can also be exported as .xml or ASCII files which
allow the user to view and edit third party applications. Queries can be created to be available only for the
user, or they can be shared queries available to everyone in the company.
• Recommended Industry Knowledge:
• Exposure to other database report generator programs
• Knowledge of relational database concepts such as table relationships, records, and field types
• Understanding of the current release application functionality.
Environment Setup
The environment setup steps and potential workshop constraints must be reviewed in order to successfully
complete the workshops in this course.
Your Epicor training environment, in which the Epicor demonstration database is found, enables you to experience
Epicor functionality in action but does not affect data in your live, production environment.
The following steps must be taken to successfully complete the workshops in this course.
1. Verify the following or ask your system administrator to verify for you:
• Your Epicor training icon (or web address if you are using Epicor Web Access) points to your
Epicor training environment with the Epicor demonstration database installed. Do not complete
the course workshops in your live, production environment.
Note It is recommended that multiple Epicor demonstration databases are installed. Contact
Support or Systems Consulting for billable assistance.
• The Epicor demonstration database is at the same service pack and patch as the Epicor
application. Epicor's education team updates the Epicor demonstration database for each service pack
and patch. If your system administrator upgrades your Epicor application to a new service pack or patch,
he or she must also download the corresponding Epicor demonstration database from EPICweb > Support
> Epicor > Downloads and install it. If this is not performed, unexpected results can occur when completing
the course workshops.
• Your system administrator restored (refreshed) the Epicor demonstration database prior to
starting this course. The Epicor demonstration database comes standard with parts, customers, sales
orders, and so on, already defined. If the Epicor demonstration database is shared with multiple users
(that is, the database is located on a server and users access the same data, much like your live, production
environment) and is not periodically refreshed, unexpected results can occur. For example, if a course
workshop requires you to ship a sales order that came standard in the Epicor demonstration database,
but a different user already completed this workshop and the Epicor demonstration database was not
restored (refreshed), then you will not be able to ship the sales order. Epicor's education team has written
the course workshops to minimize situations like this from occurring, but Epicor cannot prevent users
from manipulating the data in your installation of the Epicor demonstration database.
2. Log in to the training environment using the credentials manager/manager. If you are logged into your
training environment as a different user, from the Options menu, select Change User.
3. From the Main menu, select the company Epicor Education (EPIC06).
Workshop Constraints
Below is a list of workshops in this course that can be performed only once in each instance of a restored (refreshed)
database. Where applicable, a detailed explanation of the workshop constraints is documented in the workshop
itself.
• Workshop - Deploy and Publish a Report - Add the Report to a Menu
• Workshop - Deploy and Publish a Report - Test the Report from the Menu
• Workshop - Modify a System Query - Add the Report to a Menu
Crystal Reports® version 11.5 or later must be installed and operational in a training environment.
If necessary, create the following folders:
• C:\_BAQReports\Sample Data
• C:\_BAQReports\Reports
Crystal Reports delivers tools to convert dynamic content from the Epicor application database into reports. This
section provides an explanation of the report design features.
Formatting Toolbar
The Formatting toolbar is below the Standard toolbar and is used to format one or more selected objects in a
report. From the Formatting toolbar, you can select an object and then select one or more formatting options.
Insert Toolbar
The Insert toolbar provides access to the Crystal Report functions that insert new items into a report. These
functions include text objects, groups, summaries, subreport lines, boxes, and pictures.
Expert Toolbar
Crystal Reports provides a number of advanced functions via expert tools and wizards. These functions include
the following experts: database, group, sort, section, formula workshop, and select.
1. Navigate to the Running Totals Group sample report in the C:\Program Files\Business Objects\Crystal
Reports 11.5\Samples\en\Reports\Feature Examples folder.
The Print Preview window works in a similar manner as Microsoft® Windows® print preview mode. Component
specifics are discussed later in this course but are listed here for discussion purposes:
• Design and Preview sheets
• Close Preview Window button
• Beginning of Report and Page Back buttons
• Page Forward and End of Report buttons
• Tree view display area
• Report sections display area
Use the BAQ Report Designer to display the results from personalized business activity queries (BAQs) in a
Crystal report. You design each query to pull in a customized set of information from your database.
Use the BAQ Report Designer to define directory paths and review the key menu features available when designing
a user-defined report interface. The designer is used as the base for a report and define the option fields, filters,
and sort by options that display on the report interface.
The BAQ Report Designer is the intermediary step between creating the BAQ and formatting the finalized Crystal
report. Use the BAQ Report Designer to design a BAQ report interface directly from Business Activity Query
Designer.
To use the BAQ Report Designer, it is recommended you understand both BAQs and Crystal Reports.
The reports you create through the BAQ Report Designer are flat reports. They are restricted to only pulling data
from the table defined in their selected BAQs.
Tip The selected BAQ can be new, a standard modified BAQ, or simply, a standard BAQ. In addition, each
BAQ used in the BAQ Report Designer must have a Company column. This course uses a standard BAQ to
complete the workshops.
• Create a BAQ: A BAQ is the data foundation for Crystal Reports and dashboards. Create a BAQ using the
BAQ Report Designer.
• Define the BAQ Report Interface: The BAQ is pulled into the BAQ Report Designer and the definition of
the report is designed. The interface definition creates a report definition recognized by Crystal Reports.
• Define the Report Options: Use the BAQ Report Designer to define sorts, filters, and options that can be
used as part of the report. Once complete, the report is sent to Crystal Reports for further formatting.
• Create the Report Layout: Use Crystal Reports to define the report layout, calculated columns, and groupings.
In the BAQ Report Designer, from the Actions menu, select Design Crystal Report to display Crystal Reports
and create a base template of a report immediately available for formatting.
• Deploy the BAQ Report: When you deploy the report to the Main menu, it becomes available to all users
with the appropriate security settings.
Setup Information
The BAQ Report Options ensure the report exports to Crystal Reports, saves locally for easy retrieval, and generates
sample data for testing prior to completion.
The paths below are discussed in workshops that follow.
Field Data
Crystal Reports Executable
Example C:\Program Files\Business Objects\Crystal Reports
XX\crw32.exe (where XX is the crystal report version)
Be sure the Copy Report Locally check box is selected so the BAQ Report Designer creates a duplicate copy of
each BAQ report as a backup.
For more information on the paths used in the course, refer to the Crystal Reports Executable, Sample Data
Directory, and Local Reports Directory topics in the Crystal Reports Help.
Path locations are usually defined once for all BAQ Report Designer reports. In this workshop, use the path
locations indicated in the following steps to define the paths fields, however you can specify different paths if
necessary.
Setup the Crystal Report Executable path to access Crystal Reports from your Epicor application.
Navigate to the BAQ Report Designer.
Menu Path: Executive Analysis > Business Activity Management > General Operations > BAQ Report Designer
Important This program is not available
®
in the Epicor Web Access™ interface. You can launch this program
from an Epicor Smart Client (Windows ) interface.
2. In the Crystal Report Executable field, verify the path to Crystal Reports defaults.
If the path does not display, click the ellipsis (...) button and browse for and select file crw32.exe, which is
the executable file for Crystal Reports.
Example C:\Program Files (x86)\BusinessObjects\BusinessObjects Enterprise XXX\win32_x86\crw32.exe
Important This path can vary depending on your installation settings. If you are not able to find the
executable file, contact your system administrator.
1. In the Sample Data Directory field, click the ellipsis button (...).
The Browse For Folder window displays.
3. In the Local Reports Directory field, click the ellipsis button (...).
The Browse For Folder window displays.
6. Click Apply.
Detail
Use the Detail sheet to define the primary details of the Business Activity Query (BAQ) report. This sheet allows
you to set up the identifier and description of the report. Also, select the BAQ that is used as the base query for
the report.
Important Before you can use this tool, you must create a BAQ in the Business Activity Query Designer.
The BAQ must contain the Company column.
For more information on how to create a BAQ, refer to the Business Activity Query topics in the Application
Help.
Note The local paths used to save the report file must also be defined.
For more information on setting up the local paths, refer to the BAQ Report Designer > BAQ Report Options
topic in the Application Help.
The BAQ ID is the name of the BAQ used as the basis for creating a new report.
The Report ID is the BAQ report identifier. The Report ID also becomes the Crystal Report (.rpt) file name.
Example Employee Efficiency Report has the following data:
Field Data
BAQ ID zEmployeeEfficiency
Report ID EmplEff
Crystal Report EmplEff
Description Employee Efficiency Report1
Form Title Employee Efficiency Report
In this workshop, define the report details. These details provide the report ID and description referenced by the
Epicor application.
2. In the Report ID field, enter XXX_TimeEntry (where XXX are your initials) and press Tab.
The Crystal Report field automatically populates with XXX_TimeEntry.rpt (where XXX are your initials).
The Report ID is the BAQ report identifier and the Crystal Report (.rpt) file name.
Tip If the BAQ ID has a "z" prefix, it indicates this business activity query is a system query you cannot
modify. This BAQ is used on a dashboard or a report installed with the Epicor application. However,
you can copy system queries in the Business Activity Query Designer and modify the duplicate
versions as you need.
6. Click Save.
The path locations and report definition steps must be complete before using the BAQ Report Designer or
Crystal Reports. Other field definitions, such as options, sorts, and filters, must be included in the report
plan; however, they can be defined before or after you format the report using Crystal Reports.
Option Fields
Use BAQ Report Options to set up the main input fields for the report.
Use option fields to define the Business Activity Query (BAQ) data that displays when the report generates. For
example, use this sheet to define the From and To date range fields.
Use the Option Fields sheet to turn any field on the selected BAQ into an input field. Enter the Field Label for
the option field and the Compare Operator which defines what data displays in the report.
The Option Fields functionality is equivalent to the parameters in Crystal Reports.
In this workshop, convert fields from the selected business activity query into an input field for report criteria.
Field Data
FieldLabel Enter Start Date
Compare Operator >= (greater than or equal)
Data Type date
Order 1
Tip A number of compare operators are available. Aside from equals (=), not equals (<>), less than
or equal (<=), and so on, you can also select both Begins and List.
The List compare operator is used when you allow users to enter a series of values. For example, you
create a report against the zcustomer01 query that lists all customers. For the user input (option) field,
you select Customer.State. When the report is run, users can narrow down the search by entering
states for which they want to list customers. For example, to return customers based in California,
Ohio and Minnesota, the valid entry must be entered as follows: "CA,OH,MN". When the BAQ runs
it will select records where the state = "CA" or "OH" or "MN". It is important to use "," as the
delimiter when you enter report criteria.
5. Click Save.
Field Data
FieldLabel Enter End Date
Compare Operator <= (less than or equal)
Data Type date
Order 2
4. Click Save.
Filters
Use the Filters sheet to define the various filters available in the BAQ report. These items restrict the records
printed on a report. Filters can limit reports to only display items related to a single record or a range of records.
Example In the Employee Efficiency Report, the Employee and Dept options are filters.
Any indexed field in the business activity query (BAQ) can be used as a filter. In this workshop, define the filters
available in the BAQ report.
Add Filter 1
Add Filter 2
1. From the New menu, select New Filter to add another filter.
Sorts
Use the Sorts sheet to define the sort orders for the selected BAQ report. Sort orders indicate the sequence in
which the records display on the report. These sort orders display on the report interface on the Sort By list.
Example When you design a BAQ report for sales orders, you create two sort options. The first one
(Customer/CustomerPart) sorts all the sales orders by customers and then by customer part numbers. The
second (Part/Customer) sorts all the sales order by parts and then by customer.
Sorts created on this sheet are then used by the Epicor application to limit the data passed to Crystal Reports.
Note however, that Crystal Reports contains the first group sort. You may want to handle the sort options within
Crystal Reports instead, rather than limit the raw data coming from the Epicor application.
Field Data
Sort Field LaborDtl.ResourceID
Order 10
8. Click Save.
Field Data
Sort Field LaborDtl.JCDept
Order 20
5. Click Save.
Once the report has been defined and registered with the Epicor application, it is time to gather the data. A BAQ
is used as the data foundation and has to be executed, or Tested, within the Business Activity Query creation
program to populate initially.
When the BAQ is linked to the report using the BAQ Report Designer definition we just discussed, it is then
executed based on the report criteria when the sample data is created. This section will explain how to test the
BAQ for accuracy and then how to generate the sample data. Once the data is has been displayed, the newly
defined report is passed to Crystal Reports for further formatting.
Use the Test Report Form option to display the interface for the current BAQ report. You can then test the
option fields, filters, and sort orders defined for the report.
On the BAQ report interface, option fields display in the Report Options section. To use filters, navigate to the
Filters sheet and select the records you need; the filter options you select display in the Filter Summary section.
Sort options can be selected from the Sort By list.
Use the Test Report form to see a preview of the screen used to print the report. You are prompted for the option
and filters you defined.
Once they are complete, select the Print Preview option from the Standard toolbar.
The Epicor application creates a .xml datasource that is later used as the foundation for the Crystal report. The
path to the datasource file is c:\Program Files\Epicor Software\EpicorData905\Reports\<username>. Check
with the system administrator for the location of the EpicorData905 directory in your installation.
Note If working in a shared database, the datasource .xml file is created in the Reports\<username> folder
in your server file directory. Your path may be different, contact your system administrator.
In this workshop, test the BAQ user-defined report interface for the report created in the Workshop - Define
Report Details. In this case, the report is tested with no filters.
4. In the Enter Start Date field, enter the date one year before today.
7. Close the BAQ report and the Time Entry Report window.
Use the Generate Sample Data option to create data you can use to test the current report.
This option runs the business activity query (BAQ) selected on the current report to generate the data. The data
file is saved to the Sample Data Directory. The data can help you design the final layout of the report within
Crystal Reports.
Tip You define the Sample Data Directory on the BAQ Report Options window. You launch this
window from the Actions menu. For more information, refer to the BAQ Report Designer > BAQ Report
Options topic in the Application Help.
In this workshop, generate sample data to use when designing the layout in Crystal Reports.
2. In the Sample Data window, note the path and the name of the data .xml file
________________________________.
Use Windows Internet Explorer to review the xml sample data file created in the previous workshop.
2. Double-click the XXX_TimeEntry_Data.xml (where XXX are your initials) file created in the Create a Sample
Data File topic.
In Windows Internet Explorer®, the XXX_TimeEntry_Data.xml file displays.
Use the Design Crystal Report option to launch the current BAQ report within Crystal Reports.
This option causes the program to search for the Crystal Reports .exe file. The path is set up in the Crystal Report
Executable field. When the Crystal Reports .exe file is found, Crystal Reports displays.
Tip You define the Crystal Report Executable path on the BAQ Report Options window. You launch
this window from the Actions menu. For more information, refer to the BAQ Report Designer > BAQ
Report Options topic in the Application Help.
Tip Before modifying the BAQ report in Crystal Reports, run the Generate Sample Data option from the
Actions menu to generate sample data you can use with the report.
For more information, refer to the BAQ Report Designer > Generate Sample Data topic in the Application
Help.
In this workshop, set up the Crystal Reports functionality to format the Time Entry report.
Crystal Reports is unaware of the datasource at this time; therefore, the .xml file, which was created using the
Generate Sample Data option, must be linked as the new datasource. In this workshop, set the datasource
location.
4. In the Replace With section, click the plus sign (+) next to Create New Connection and double-click
ADO.Net (XML).
The ADO.Net (XML) window displays.
5. In the File Path field, click the ellipsis button (...), browse for the C:\_BAQ Reports\Sample Data folder,
and double-click XXX_TimeEntry_Data.xml (where XXX are your initials).
Note When you click the Generate Sample File option, the BAQ Report Designer creates the
XXX_TimeEntry_Data.xml (where XXX are your initials) as the sample data file.
7. From the Current Data Source section, select the Report > ReportDataSet node.
8. From the Replace with section, select the Create New Connection > ADO.Net (XML) > ReportDataSet
node.
9. Click Update.
2. From the Available Data Sources pane, expand the Create New Connection > ADO.Net (XML) >
ReportDataSet node.
4. Click the right arrow (>) to add the table to the Selected Tables pane.
6. In the Links sheet, double-click the line between the Company table and the BAQReportParameter table.
The Link Options window displays.
8. Click OK.
11. When asked to overwrite the report with the latest report format, click Yes.
Select the fields from the tables and add them to the Details section of the report.
When Crystal Reports is connected to the datasource and the tables are linked, select the fields and format the
report.
2. In the Page Header section, drag the bottom line down to increase the Page Header area.
3. In Field Explorer pane, select the Database Fields > BAQReportResult > LaborDtl.ClockInDate field,
then drag and release it within the Details section.
4. Drag the following fields from the BAQReportResult table to the Details section:
• EmpBasic.LastName
• LabHrsIndirect
• LabHrsDirect
• BurDirectHrs
5. Click Save.
Add a report grouping criterion to group the report by Job Cost Department.
3. Click the right arrow (>) to move the selected field to the Group By section.
5. Click Save.
A report summary is similar to a subtotal by group. The following steps demonstrate how to create grand total
summaries for the report.
1. In the Details section, right-click the LabHrsIndirect field and select Insert > Summary.
The Insert Summary window displays.
3. Repeat steps 1 and 2 to add summaries to the LabHrsDirect and BurDirectHrs fields.
4. Click Save.
7. If necessary, navigate to the Design sheet, make adjustments and preview the report again.
Use the Deploy BAQ Report option to move the current BAQ report to the network. The program moves the
report from the Local Reports Directory to the Server Reports Directory on the server.
Tip You define the Local Reports Directory path and view the Server Reports Directory path in the
BAQ Report Options window. You launch this window from the Actions menu. For more information,
refer to the BAQ Report Designer > BAQ Report Options topic in the Application Help.
Once the BAQ report is deployed, you are ready to add this report to the Main menu. You can do this
through Menu Maintenance. For more information, refer to the Menu Maintenance topic in the Application
Help.
This workshop demonstrates how to use the Deploy BAQ Report functionality.
2. In the Save As message, click Yes to confirm you want to replace existing report.
Download Report
Use the Download Report option from the Actions menu when a copy of the deployed report is to be brought
back down to the local reports directory. A selection screen comes up to allow choice of report to bring down.
Use the Copy BAQ Report option from the Actions menu to create a duplicate .rpt file for the current BAQ
report.
This copy is saved in the local reports directory. You can then edit the duplicate report file.
Tip In the BAQ Report Options window, define the Local Reports Directory path. You launch this
window from the Actions menu.
For more information, refer to the BAQ Report Designer > BAQ Report Options topic in the Application Help.
Use the Export BAQ Report option from the Actions menu to move the current BAQ report out of the local
reports directory into another location. You must define both the path and the new name for the exported file.
Tip Use the local reports directory path in the BAQ Report Options window. For more information, refer
to the BAQ Report Designer > BAQ Report Options topic in the Application Help.
Use the Import BAQ Report option from the Actions menu to pull a BAQ report back into the Epicor application.
Create a new identifier for the report and indicate whether or not this report can be edited in the BAQ Report
Designer.
Database Concepts
This section introduces database topics that relate to the custom report generation process. Topics covered include
the following.
Table and Field Name Identification
When writing a report in Crystal Reports, a fundamental requirement to identify the tables within the database
that contain the information required for the report. Additionally, you must identify the field names you use to
store data.
Data Dictionary Viewer
This tracker is a source that determines probable join fields based on a dataset definition for directly related
tables.
Table Joining and Linking Process
When you link tables, Crystal Reports enables you to specify the join type and the link type to use. You can also
enforce the use of tables in your joins. Joins and the links indicate how to compare linked fields in two tables
when records are read. You can specify join and link options in the Link Options dialog box. Using the various
join enforcement options can ensure linked tables are included in the structured query language (SQL) query,
even when the report uses none of the fields in the table.
Join Types
There are four join types available to use when writing Crystal reports or queries.
• Inner join
• Left Outer join
• Right Outer join
• Full Outer join
The first requirement of any report or query is to locate the data. The Epicor database is a relational database
and therefore, all data is stored in a collection of tables and fields.
A common question occurs when writing reports or queries, especially for the report writer who is not familiar
with the database structure and naming conventions. The question is, I know where the data is entered and
located, but where do I find the table and field name?
This is a typical question, and the answer becomes easier over time as you are exposed to the database. For
purposes of writing a custom report or query, you already know where certain data that is critical to the report
is entered.
What is not necessarily known is the specific database table or field names for the data. Application tools are
available that aid in table and field identification. These tools include the Field Help, Customization Tools, and
the Data Dictionary Viewer.
When you create a query or report, the type of information you need in the query and a time frame is usually all
the information you receive. Next comes the challenge of determining where the data is located.
Every user interface form is a small database that contains a collection of tables and fields that display data. First
determine how and where the information was entered in the Epicor application.
For example, a query or report is built to demonstrate a part listing that displays part and part bin information.
Ask yourself the following questions:
1. What kind of information should I include in a query or report that displays parts? - Write down
probable fields.
4. Where do I enter part bin information? - Enter part bin information in the Warehouse Maintenance
table or the Warehouse Bin Maintenance table. These tables are in the Part > Plants > Warehouses > Bin
Information sheet in Part Maintenance.
The Field Help feature is a quick reference tool that provides a brief field description and the technical property
reference for selected fields.
To enable Field Help, from the Help menu, select Field Help and click a field in the interface.
The Field Help sheet contains two menu items:
• Field Level Help - The Field Level Help is a text description of the field from the Application Help. You can
use Field Help as a learning tool, as it allows you to access documentation for each field.
• Technical Details - The technical details include the data dictionary information for the field. Use technical
specifications for a field when building business activity queries (BAQs) and using Business Process Management
(BPM) methods and other advanced functions of the Epicor application.
Note To view technical details, you must have permission to access the corresponding business object.
This permission is set in Process Security Maintenance for the bo.DataDict business object.
The technical details of the Field Help are valuable in understanding the table structure of the database. Keep
in mind that data can reside in multiple tables. The query topic displays where the data comes from.
You can also use the Customization feature to locate tables and fields.
In this workshop, use the Field Help to find table and field names.
The Field Help provides a Technical Details sheet to display the data dictionary information for a selected field.
The properties that display are helpful when you create a Business Activity Query and discuss the Data Dictionary
Viewer.
• Field Name - This displays the field name as defined by the Epicor application. This name is used in all
expressions.
• EpiBinding - This displays the table name and the field name. For example, the field displays Part.PartNum,
which means the table to use is the Part table and the field to pull into the query is the Part field. The syntax
is always <Tablename.Fieldname>.
• DB Field - This displays the database field property which also displays as <Tablename.Fieldname>.
• Format - This is the Progress database format for this field and the number of characters to which that field
is limited.
• Like - Use this field to validate a BAQ search and generate Foreign Key Views to indicate the common field
between two tables or datasets.
Navigate to Part Maintenance.
Menu Path: Material Management > Inventory Management > Setup > Part
2. Place the cursor in the Field Help sheet header and click the push pin icon to dock the Field Help window.
5. Navigate to the Part > Plants > Warehouses > Primary Bin sheet and place the cursor in the Bin field.
The properties populate with the data in this field. The table and field combination display in the EpiBinding
field of the Technical Details in the format of <table>.<field>.
7. Navigate to the Part > Plants > Warehouses > Bin Information > Detail sheet and place the cursor in
the Bin field.
Record the table and field ________________________.
Customization Tools
Use the Customization tools as an alternate method of identifying tables and fields.
Example
To create a shipping activity report that lists the tracking number assigned to the shipment, use the
Customization Tools to locate and identify the name of the table and field that contain this data.
1. In the User ID field, search for and select System Manager (MANAGER).
1. In the Select Customization window, click OK to accept the defaults and open the program.
4. Move or resize the Customization Tools Dialog window so the Tracking Number field is visible on the
Customer Shipment Entry window.
5. In the Customer Shipment Entry window, click the Tracking Number field.
6. In the Customization Tools Dialog window, in the EpiBinding section, in the EpiBinding field, view the
table and field names.
The full identifier for the Tracking Number field is ShipHead.TrackingNumber. This means the field name
is TrackingNumber and it is located in the ShipHead table.
8. Close the Customization Tools Dialog window, and do not save changes.
The Data Dictionary Viewer allows you to find and review details of each field and table within the database.
It helps you better understand the purpose and data values of each field.
Use the Data Dictionary Viewer to identify the fields and tables to use for a customization or custom report. The
Data Dictionary Viewer is also helpful during upgrades, as you can view the current database structure and
compare it against a previous database version.
Note
You can print a hard copy of the data dictionary and use this report as a reference during upgrades and
customization.
To access this report, from the Actions menu select Print Field Definitions. Define report parameters in
the Data Dictionary Field Report window.
Tables Sheet
The Data Dictionary is organized by tables. A table is a set of fields that contains related information. Use the
Tables sheet to find and select the database table to review.
Example
Use the Customer table to store all your customer records. The OrderHed table records your Order Header
records.
Data is often stored in multiple tables, each with a specific purpose. Use the Search functionality to display
tables in a grid format. The grid includes a brief overview of the tables and helps you determine which table you
should use when a field is located in more than one table.
Fields Sheet
The Fields > Detail sheet displays all values for a selected field, such as format, label, and description, display
on this sheet.
Example
The customer table includes the identifying code for the customer (CustNum), name (Name), and other
specific customer details.
For information regarding the Data Dictionary Viewer properties, refer to the Technical Details topic in the Field
Help.
Menu Path
Navigate to this program from the Main Menu:
• System Management > Data Dictionary Viewer
This workshop demonstrates how to use the Data Dictionary Viewer to identify fields and tables.
Navigate to the Data Dictionary Viewer.
Menu Path: System Management > Data Dictionary Viewer
Table Linking
In the table selection process, it is important to link tables together. Use one or more common fields to aid in
reporting by selecting field data from multiple tables to create links.
Table Links
Link tables so the records from one table match related records from another. This linking process involves using
a common field between the selected tables. For example, if you activate an Orders table and a Customers table,
link the tables so each order from the Orders table can be matched with the customer from the Customer table
that made the order.
Reporting or querying tools use this connection to identify related records between tables. In the above example,
the linking process ensures the data in each line of the report refers to the same order.
Link Types
The main link types are one table to another or one table to multiple others.
• One table to another - The primary table and the lookup table have a one-to-one relationship between
their records.
• One table to multiple others - The primary table and the lookup table have a one-to-many relationship
between their records.
Indexed Fields
An index field points to a data location which is a named path designed within the database in order to quickly
locate and store data or to easily retrieve data in a table. The index name and path, or index order, are identified
in the Data Dictionary Viewer and on the Field Help > Technical Details sheet.
Note Always use the Company field as it is the first indexed field and it is located at the top of the Epicor
application table hierarchy. The data of each company is stored and separated from other company data
using the Company ID field. Since every table uses the Company field, it is an indexed field and you must
select it as one of the fields to use in a join.
There are no exceptions to this rule. You must select the Company field as a join field pair when linking
tables because company is at the top of the table hierarchy in the Epicor application. Your report will not
provide the correct results if this field is not used in the join.
The Dataset Relationships Tracker displays relationships between application datasets in a dashboard format.
Use this table to create custom reports and queries, as it can help you create joins between tables.
Unlike other dashboard trackers, the Dataset Relationships Tracker automatically groups its grid by Dataset ID,
Parent Table, and Child Table. The Parent-Child table then displays the Parent field, its related Child field, and
its Sequence. This helps to illustrate the database hierarchy.
Example
You want to create a custom query between the Customer table and the Ship To table, but you do not
know what join to use. Within the Dataset Relationships Tracker, expand the Customer node, expand the
Customer parent table, and expand the ShipTo child table. Note the correct join is Company and CustNum.
Advanced Search
Use the Advanced Search features to locate specific field data. Create a search using the DataSet ID, Parent
Data Table, or Child Data Table. Click the Refresh button to execute the search based on the value(s) selected.
6. In the Dataset Relationships pane, view the relationship between the OrderDtl and OrderRel tables.
Record the join fields _______________________________________.
Join Types
This section defines the available join types and identifies when you would use these table relationships while
creating custom business activity queries (BAQs) and custom Crystal reports.
Inner Joins
An inner join, also known as an equal join, is the standard join type. The report output from an inner join includes
all the records in which the linked field value in both tables is an exact match. Records from either table that do
not have a match in the other table are excluded from the report or query results. The following diagram shows
this relationship:
Example Join the Customer table to the OrderDtl table and create a view of customers and the specific
orders they have placed. In this case, only customers with sales orders are included in the report or query
results. Records for customers who have not placed orders are excluded from the data output.
You typically use this join when the report or query needs to display only matching records between the primary
table and the lookup table.
Example When using a left outer join to view all customers and orders these customers placed, you also
get a row for customers who have not placed orders. These customers display with blanks in the fields that
would otherwise hold order information.
You typically use this join when you want to display all the records from one table to contrast the activity
in another table. When joining the customer and sales order tables, this join relationship is useful when
you want to see which customers have not recently placed an order.
Again, this join is not available for either queries or custom Crystal reports. However, other applications you use
may support this join type.
To illustrate use of the custom report design tools, create a Manufactured Parts Listing report. First define the
report as a new report definition in the BAQ Report Designer. Once you define the report definition, use the BAQ
Report Designer Action menu to transfer the data to Crystal Reports. Connect the datasource and format the
report as necessary. Once the report is formatted, exit Crystal Reports to return to the BAQ Report Designer for
further deployment and testing.
Although Crystal Reports has selection criteria, prompts, and filters, these actions are created in the BAQ Report
Designer. This report example creates report option fields, sorts, and filters required after formatting the Crystal
report.
2. In the Query ID field, enter XXXPartsList (where XXX are your initials).
The Query ID should not include spaces.
3. In the Description field, enter XXX New Manufactured Parts Listing (where XXX are your initials).
Spaces are allowed in the Description field. Once you save the query, the Epicor application adds the
company ID, in this example, EPIC06.
6. In the Filtering field, enter the letter P to advance to this section of the table names.
7. From the table listings, select the Part table and drag it onto the Query Designer canvas.
8. From the table listings, select the PartBin table and drag it onto the Query Designer canvas to the right of
the Part table.
The Epicor application displays a connector between the two tables. The connector arrow indicates which
table is the Parent table and which is the child.
9. In the Filtering field, enter the letter W to advance to this section of the table names.
10. From the table listing, select the Warehse table and drag it onto the Query Designer canvas to the right of
the Part Bin table.
11. In the grid, click the Warehse table, and click the Add Connection icon.
12. Click the Warehse table, drag the line to the PartBin table, and release.
A dotted line follows the link to indicate the Warehse table is the child table and the Part Bin table the parent
table. The Epicor application assumes an inner join between all tables. Notice the fields the application
selects. You can also see the tables rearranged as a result of the combination selected. Select the outer join
field when the table relation requires it. When selected, the Epicor application assumes a left outer join.
13. Select the Warehse table and navigate to the Table Relations sheet.
14. Click the Add Row icon to add a new table relationship.
The tables are identified for the query. The column information displays for the table in focus on the right. You
are now ready to select the fields to display in the query.
Use the Display sheet to select the columns to display in the query. You can also use the Display sheet to rename
column headings. Use the tree view for the following workshop.
3. Locate and select the PartNum field and drag it to the Display Column pane.
You can also select a field and click the blue arrow to advance the field.
4. Drag and drop the following fields from their respective table:
5. Navigate to the Display > Sort Order sheet to define sorting criteria for the query.
By default, a new query sorts by the first field, but you can use multiple sort fields.
6. In the Available Columns pane, expand the Part table and drag the PartNum field to the Sort By pane
as the primary sort.
7. Click Save.
9. Click the Test button to execute and display the query results.
This workshop shows how to define BAQ Report Definitions for the new report.
2. In the BAQ Report Options window, verify report paths are correct.
Verify paths are correct for:
• Crystal Report Executable
• Sample Data Directory
• Local Reports Directory
4. Click Apply.
2. In the Report ID field, enter XXX_MfgParts (where XXX are your initials).
This automatically populates the Crystal Report field.
4. In the BAQ ID field, enter or browse for the EPIC06-XXXPartsList query (where XXX are your initials).
Once the print screen opens, the Epicor application creates a new datasource .xml file in the c:\Program
Files\Epicor Software\EpicorData905\Reports\<username> directory you can use if the report requires
the full data rather than the sample data created in the next step.
Important If working in a shared database, the new datasource .xml file is created in the Reports
folder in your server file directory. Your path may be different, contact your system administrator for
the correct path.
If the entire dataset is not required to design the report, you can use the Generate Sample Data command.
This command creates an .xml file with minimal information.
2. In the dialog box, note the data file path and name _________________________.
3. Click OK.
At this point, the business activity query ran, and Crystal Reports can use the data in the .xml file. This is a
good time to examine the data presented to ensure it pulls the query data you expect it to pull.
3. In the Replace with section, navigate to Create New Connection > ADO.Net (XML) and select it.
The ADO.Net (xml) window displays.
4. Select the ellipsis button to browse for the .xml report using the path to c:\Program Files\Epicor
Software\EpicorData\Reports\<username>.
Important If working in a shared database, the .xml report is located in the Reports folder in your
server file directory.
5. Select the BAQ Report - XXX_MfgParts-XXXXX.xml file (where XXX are your initials and XXXXX the
number assigned by the Epicor application) and click Open.
Epicor creates the BAQ report using a unique sequential number where XXXXX is indicated. Using this .xml
file displays all the records returned by the BAQ, rather than a sampling as seen when using the sample data
.xml file.
Every time the Test Report function is run, a new .xml file is created in this directory. If there are more than
one choices, then select the most recent date.
6. Click Finish.
9. Click Update.
3. In the Available Data Sources pane, navigate to the Create New Connection > ADO.Net (XML) >
ReportDataSet node.
5. Click the right arrow to move the selected item to the Selected Tables pane.
7. Double-click the link line between the Company table and the BAQReportParameter table.
The Link Options window displays.
8. In the Join Type section, select Left Outer Join and click OK twice to accept the links and return to Crystal
Reports.
The left outer join is needed because all BAQReportParameter fields are used regardless of matches found
in other tables.
9. Click Save and ensure the report name is XXX_MfgParts.rpt (where XXX are your initials).
You are ready to use Crystal Reports to format the report.
Before you begin this workshop, create a new report definition in the BAQ Report Designer and connect the
report definition to an existing business activity query (BAQ). In this workshop, the Manufactured Parts listing
report is designed using custom design tools. You will encounter several windows used with the Standard Report
Creation Wizard, but the main focus is on how to create the report manually in the Design window.
You need to create a report that displays your manufactured parts, listing on-hand quantities. In this report,
group parts by warehouse and by part number.
2. In the Page Header section, select the lower boundary and drag it down to expand the section.
3. In the Field Explorer pane, navigate to the Database Fields > BAQReportResult table.
4. In the BAQReportResult table, select the following fields, drag, and release them in the Details section,
spacing them as necessary.
• Part.PartNum
• Part.PartDescription
• Part.MfgComment
• PartBin.BinNum
• PartBin.OnHandQty
Note There are two ways to insert fields.
The first way is:
2. Drag the field name to the Design area and drop it in the Details
section.
Important If working in a shared database, the .xml file is located in the Reports folder in your
server file directory.
9. Click Save.
Rearrange Fields
Since the report is sorted by part number, there is no need to move this field. However, we want the part
description to display next, followed by the bin number, quantity, and comment field. There are a number of
ways you can rearrange these fields. The steps below demonstrate one way to accomplish this.
1. Drag and drop the guideline attached to the Part.MfgComment field as far to the right as possible.
If you drag and drop the guideline as far to the right as possible, it overlaps other fields while you make
other changes.
2. Drag and drop the guideline attached to the Part.PartDescription field to the left until it almost touches
the Part.PartNum field.
3. Drag and drop the guideline attached to the PartBin.BinNum field to the left until it almost touches the
Part.PartDescription field.
4. Drag and drop the guideline attached to the PartBin.OnhandQty field to the left until it almost touches
the PartBin.BinNum field.
5. Drag and drop the Part.MfgComment guideline from the end of the report to the left to position it next
to the PartBin.OnhandQty field.
6. Reduce the width of the PartNum field and column header and move the other three fields farther to the
left.
7. Click Save.
5. Select the Choose From Existing Field option and search for and select the Warehse.Description field.
6. Select both the Keep Group Together and Repeat Group Header on Each Page check boxes.
The Keep Group Together check box is optional if it fragments the report.
9. Click Save.
1. To resize the group header, press Shift and the left arrow key repeatedly until the field is sized correctly.
You can also grab the middle handle and expand the column with the mouse.
2. Navigate to the Preview sheet to view the report with the new group headings.
To the left of the Preview sheet, note the group tree. The group tree displays all groups established for the
report in a Windows Explorer type format.
4. On the Standard toolbar, click the Toggle Group Tree icon, or from the View menu, select Group Tree
to turn the group tree on and off.
In the gray area to the left of the Preview window, report section identifications such as RH (Report Header)
and GH1 (Group Header 1) display. Right-click an ID to view the available functions for these sections.
8. Navigate to the Preview sheet and examine the subtotals for the various part numbers (Group #1 and #2
values).
The column may not be wide enough to fit all the quantity amounts or subtotals. If the PartBin.OnhandQty
field and column header have not been resized, you can do this now.
9. Click Save.
2. In the Details section, right-click the Part.PartNum field and select Insert > Summary.
The Insert Summary window displays.
7. Click Save.
There are certain elements you can add to a report to increase the presentation quality and make it easier to
read. Crystal Reports's custom report design tools are presentation-enhancing elements that include formatting
total fields with borders, text objects, special fields, graphic images (for example, company logo), lines, and boxes.
In this workshop, add borders to subtotal and grand total fields and insert text objects, such as labels, to clarify
the report data. Crystal Reports has a number of predefined fields, called Special Fields, available for report
management.
Report formatting ensures users can read and interpret the report. The report audience dictates how much time
you spend formatting. Formatting includes using images, charts, lines, and boxes to clearly define important
data.
In this section, locate the part number and warehouse description values in the report. You can add borders in
Design or Preview mode.
1. Verify the Manufactured Parts report is open. If not, use the Crystal Reports startup menu to open it.
3. Navigate to the last page of the report and scroll down to the Group Footer #2 (GF2) sections to display
the subtotals by part number.
4. Navigate to the last page of the report and scroll down to the Group Footer #1 (GF1) sections to display
the subtotals by warehouse name.
The Group Header #2 (GH2) sections contain various Part.PartNum values while the Group Header #1
(GH1) sections contain various Warehse.Description values. Grand total values display in the Report Footer
(RF) section.
4. In the Line style section, in the Top and Bottom fields, select Single.
8. On the last page, in the RF (Report Footer) section, select the bolded grand total to format the third
subtotal.
11. In the Line style pane, in the Bottom field, select Double.
You can use the Format Painter to copy field formats as long as the two fields are exactly the same. Optionally,
you can copy the formats for the distinct count of the part number from the Group Footer 1 to the Group Footer
2.
3. Click the GF1 distinct count subtotal field to apply the new format.
You cannot apply formatting to read only objects and fields.
2. In the Report Header section, drag the bottom boundary down to make room for the new text object.
4. In the Report Header section, click to place the empty text box above the PartNum field.
5. In the empty text box, enter Report Title - XXX Manufactured Parts Listing (where XXX are your initials).
3. In the Alignment field, select Centered to center the title in the text object field.
Text may no longer fit in the text object field. You can resize it in the Design sheet the same way the report fields
were resized.
2. Use the right arrow key to increase the length of the text object field until it is centered over the whole
report.
3. Press the down arrow key to increase the length of the text object field to fit the 12 point font.
4. Click Save.
2. In the Group Footer #1 section, below the Mfg Comment field, add a text object.
4. In the Group Footer #2 section, below the Mfg Comment field, add a text object.
6. In the Report Footer section, below the Mfg Comment field, add a text object.
1. In the Page Header section, right-click the PartNum field and select Edit Text.
Alternatively, double-click a text object field to move the curser into the field for editing.
4. Edit the remaining column header fields and enter the following as the new column header titles.
Enter the following are the new column header titles:
• Part Description
• Bin Number
• On-Hand Quantity
• Manufacturing Comment
Execute the Group Select function to collect all the column headers and apply basic formatting to all of them
at the same time.
The Multiple Selection function is a time-saving device that allows you to format many text objects simultaneously.
Use this function to apply the same font, borders, text alignment, and so on, to more than one text object and
to avoid formatting each text object separately. Once a group of objects is selected in this manner, they can be
deleted, moved, and resized.
2. Click and drag the cursor to the right and down to encompass all column headers.
3. On the Standard toolbar, click the Bold icon to bold all the Part Number column headers.
Verify all column headers are selected.
4. On the Standard toolbar, click the Underline icon to turn off the underline attribute for the headers.
5. Right-click the Part Number column header and select Format Objects while all column headers are
selected.
7. In the Color field, select any dark text color and click OK.
8. Click Save.
You may need to adjust the text alignment in the column headers since they adopt the alignment given to
the column headers in the Format Objects step.
2. In the Title field, enter XXX Parts On-Hand - Custom (where XXX are your initials).
4. Click OK.
8. In the Field Explorer pane, from the Special Fields list, select and drag the following fields into the Report
Header section.
• File Author
• File Path and Name
• Record Selection Formula
• Report Comments
9. Click Save.
1. In the Report Header section, right-click the Report Comments field, and select Format Field.
The Format Editor window displays.
2. Navigate to the Common sheet, and select the Can Grow check box.
3. Click OK.
4. Repeat steps 1 through 3 for the File Path and Name and Record Selection Formula fields.
5. Navigate to the Preview sheet to review the display of these special fields.
7. Click Save.
1. In the Page Header section, select the Page N of M field and relocate it to the center of the Page Footer
section.
2. In the Details section, right-click the Print Date field and select Format Field.
The Format Editor window displays.
3. Navigate to the Date sheet, and in the Style pane, select the Monday, March 1, 1999 format.
4. Click OK.
5. For all special fields, use the Format Editor to change the font style to bold.
Insert a Line
2. In the Page Header section, drag and drop the bottom boundary to leave space to insert a line.
4. Position the resulting pencil cursor above the Page Header bottom boundary marker and just below the
Part Number column header field.
5. Click and drag to the right, drawing a line below all the column headers.
Dashed or dotted lines do not allow width modification, but the single line allows both width and color
modification.
Add Boxes
2. In the Group Header #1 section, drag and drop the bottom boundary to add more space for the group
boxes.
3. Select the Group #1 Name header and move it down two grid lines.
4. In the Group Header #2 section, drag and drop the bottom boundary.
6. In the Group Header #1 section, position the pencil cursor in the upper left corner.
7. Click and drag down to the lower, right corner of the Group Footer #1 section to enclose all the Group
Header #1 sections.
11. Move the Group Name fields to the right for better readability.
12. In the Group Header #2 section, add a border and drop shadow around Group #2 Name.
2. In the Page Header section, drag and drop the bottom boundary down far enough to move the column
headers down and position the company logo above them.
4. Navigate to the file location of your company's logo and click Open.
Note In an Epicor training facility, the instructor provides the location of the logo. Any graphic format
can be added to the report using the Insert Picture steps.
5. In the Page Header section, at the top, drag and drop the resulting outline so the top edge is close to the
left margin.
You can set up sorting, selection criteria, and prompting options for data in Crystal Reports. The BAQ Report
Designer handles optional criteria when you use a business activity query (BAQ) for the report itself. You can
define options when you create the report definition or at the end of the formatting phase in Crystal Reports.
In this workshop, limit the data in the Manufactured Parts Listing report to part type M, establish sort criteria for
the report, and provide filtering choices of part number or warehouse.
Add an Option
Navigate to the BAQ Report Designer.
Menu Path: Executive Analysis > Business Activity Management > General Operations > BAQ Report Designer
Important This program is not available
®
in the Epicor Web Access™ interface. You can launch this program
from an Epicor Smart Client (Windows ) interface.
Note Verify the XXX_MfgParts report (where XXX are your initials) is open.
3. In the Field Label column, verify Type defaults and press Tab.
The field label does not have to match the field name from the table.
7. Click Save.
Add a Filter
Any indexed field in the business activity query (BAQ) is available to use as a filter. This provides an option when
you print the report.
5. Click Save.
Add a Sort
2. In the Sort Options section, in the Name field, enter Part Number\On Hand Quantity.
7. In the Sort Fields section, click New to add one more sort field.
Verify the Part Number\On Hand Quantity sort line remains selected.
Use the Deploy Report feature when the report is ready for access by all team members.
Important Due to necessary database setup and specific data used to add a report to the Main menu,
this workshop can only be performed by one person on a shared database. If you are unable to complete
this workshop, this does not prohibit you from completing the following workshops.
1. In the tree view, navigate to Material Management > Inventory Management and select Reports.
Field Data
Menu ID UD-XXX (where XXX are your initials)
Name XXX Manufactured Parts Listing
This is the report name as it displays in the menu tree.
Security ID SEC247
This can be a new or existing security ID. If you select an existing security ID, it
must be available for at least one other report under the same parent menu.
Icon Report
This selects the standard report icon used in the menu structure.
Program Epicor.Mfg.UIRpt.BAQReport.dll
This defaults in and points to the program you need to run the custom report.
4. Click Save.
Any menu listing change requires a refresh of the database. You can use the Log on as Another User
feature to do this.
7. From the Options menu, select Change User ID and enter manager as both the user name and password.
8. Follow the path from step 1 to the Manufactured Parts Listing report in Menu Maintenance and
double-click the report to view it.
The Manufacturing Parts Listing window displays.
This section reinforces the features discussed in previous sections. New report writing features are reviewed, such
as calculated fields and parameters to determine what information displays in a report.
Formula Editor
The Formula Editor is a point and click tool you can use to build formulas quickly and easily. You can also modify
the content of formulas.
The following are syntax rules for writing formulas in Crystal Reports.
Symbol Rule
{} French brackets, or braces, enclose fields or formulas.
[] Square brackets enclose subscripts or arrays.
() Standard parentheses enclose arguments also called parameters, to a Crystal Reports
function.
“Text” or ‘Text’ Quotation marks tell Crystal Reports to treat the content between the marks as text
or a literal string.
30000 Enter numbers with no punctuation. The .00 is assumed.
// Lines of comments must be preceded by two forward slashes. Always comment your
formulas.
<Enter> Press Enter to break the formula into sentences.
<Tab> Press Tab to indent your formula to make later analysis easier.
The first step to complete a report is to design it in the BAQ Report Designer. In this workshop, create a report
definition for the Direct Labor Report.
Add a Report
Navigate to the BAQ Report Designer.
Menu Path: Executive Analysis > Business Activity Management > General Operations > BAQ Report Designer
Important This program is not available
®
in the Epicor Web Access™ interface. You can launch this program
from an Epicor Smart Client (Windows ) interface.
2. In the Report ID field, enter XXX_DirectLbr (where XXX are your initials).
6. Click Save.
3. Close the report preview and the Direct Labor Report window.
Once you create the report definition, select the Design Crystal Report feature from the Actions menu. At
that point, the data definition provided by the BAQ Report Designer is passed to Crystal Reports.
The Design Crystal Report command opens Crystal Reports and a report template. Although a template displays,
Crystal Reports cannot display a full report since it does not know where to find the underlying query data.
The sample data .xml file, or the report .xml file generated in the EpicorData\<username> server directory
(this path may be different on your system), provides the linked datasource for Crystal Reports. Use the Set
Datasource features to connect Crystal Reports to the report data.
After you set the datasource, the BAQReportResult table is added to the collection of tables the business activity
query (BAQ) provides. This table generates after the BAQ is run and therefore, is separated from the Company
and BAQParameter tables. It is required for the report as it holds all the query data results.
3. In the Replace with section, navigate to and double-click Create New Connection > ADO.Net (xml).
The ADO.Net (xml) window displays.
4. In the File Path field, click the ... (ellipsis) button and browse to the C:\Program
Files\Epicor\EpicorData905\Reports\<username> folder.
This path may be different on your system.
Important If working in a shared database, browse to the \\<server
name>\EpicorData905\Reports\<username> folder. Your path may be different, contact your
system administrator for the correct path.
5. Search for and select the BAQReport-XXX_DirectLabor-XXXXX.xml file (where XXX are your initials and
XXXXX is assigned by the Epicor application) file, and click Open.
6. Click Finish.
8. In the Replace with section, expand the ADO.Net (xml) folder and select the ReportDataSet node.
2. In the Available Data Sources pane, under the ReportDataSet node, double-click the BAQReportResult
table to add it to the Selected Table pane.
Review Links
2. Double-click the link between the Company and the BAQReportParameters tables.
The Link Option window displays.
3. In the Join Types section, select Left Outer Join and click OK.
5. Click Save.
Prior to completing the following workshop, the report definition must be in place. In this workshop, create a
direct labor report.
Your controller wants to know the hours and dollars charged to jobs (labor and burden) by department, per
week, for a given time period. Your tasks in this workshop are to:
• Create formula-based fields.
• Group and summarize data by department, per week.
• Build and use report options through the BAQ Report Designer to limit the scope of the report.
• Deploy the report as a custom menu link in the Epicor application Main menu.
1. In the Report Header section, select the bottom boundary and drag it down to create more space.
2. In the Page Header section, select the Report Title field and drag it to the Report Header section.
3. In the Page Header section, select the Print Date field and drag it to the Report Header section placing
it in the bottom left corner.
4. In the Page Header section, select the Page N of M field and drag it to the Page Footer section placing
it in the bottom right corner.
A formula is a unique mathematical field that is not part of the database. The title begins with the @ sign.
You can create formulas and drag them onto a report. You can also create them after all the fields are in the
Detail section of a report. This workshop creates a formula before the Detail section populates. Once created,
the formula field displays in the Field Editor.
1. In the Field Explorer pane, right-click the x+1 Formula Fields line and select New.
The Formula Name window displays.
3. In the Formula Editor window, in the second column, expand the ReportDataSet (ADO.NET(XML)) >
BAQReportResult table.
5. In the Formula Editor window, in the fourth column, expand the Operators > Arithmetic folder and
double-click the Multiply line.
6. In the BAQReportResult table, in the second column, double-click the LaborDtl.LaborRate field.
The field name drops into the Editor pane.
10. Repeat the previous steps to create a new formula using the following information.
• Name - Burden Cost
• Formula - {BAQReportResult.LaborDtl.BurdenHrs} *
{BAQReportResult.LaborDtl.BurdenRate}.
Insert Fields
You can insert fields in any order. In general, you save time when reports are planned in advance, giving direction
to the design and report building process.
2. Navigate to the Field Explorer > Database Fields > BAQReportResult table.
3. In the BAQReportResult table, select the following fields and insert them in the Details section.
• LaborDtl.PayrollDate
• LaborDtl.JobNum
• LaborDtl.AssemblySeq
• LaborDtl.OprSeq
• LaborDtl.LaborHrs
• LaborDtl.BurdenHrs
5. In the Formula Fields line, select the BurdenCost and LaborCost fields and insert them in the Details
section.
6. Click Refresh.
The Preview sheet displays.
8. Click Save.
2. In the Page Header section, double-click the LaborDtl.PayrollDate field and change the name to Payroll
Date.
Insert Groups
2. In the Available Fields pane, expand the BAQReportResult table, and double-click the JCDept.Description
field to move it to the Group By section.
You can also use the right arrow button.
3. From the BAQReportResult table, double-click the LaborDtl.PayrollDate field to move it to the Group
By section.
4. In the Group By section, select the JCDept.Description field and click the Options button.
The Change Group Options window displays.
5. Navigate to the Options sheet and select the Keep Group Together and Repeat Group Header On Each
Page check boxes.
6. Click OK.
9. Click Save.
The report now has additional report sections identified as Group Headers and Group Footers listed for
the groupings defined.
1. In the Details section, right-click the LaborHrs field and select Insert > Summary.
The Insert Summary window displays.
2. In the Insert Summary window, accept the defaults and select the Add to all group levels check box.
3. Click OK.
4. Repeat this process for the BurdenHrs, Burden Cost, and Labor Cost fields.
This provides summaries for each group as well as a grand total for the LaborHrs field.
5. Verify the columns are wide enough to display all summary data and increase the field widths if necessary.
6. Click Save.
Use the Select Expert to add selection criteria directly to the Crystal report.
Selection criteria can be defined in the BAQ Repot Designer by using the Options field. This limits the data that
comes into the report design. It is often more efficient to use the Select Expert to create the selection criteria in
the report.
Three types of labor exist in the Epicor application: production, setup, and indirect. This workshop uses the Select
Expert to limit the report details to the direct labor type (production and setup).
3. From the Fields listing, select the ReportDataSet (ADO.Net (xml)) > BAQReportResults >
LaborDtl.LaborType field and click OK.
6. Click OK.
7. Click Save.
Insert text objects for the Group Footer and Report Footer sections.
2. In the Group Footer #2 section, place the text object to the right of the Labor Cost formula.
3. In the Text Object field, enter Totals for the Week Beginning: .
Include a space behind the colon. Leave the cursor inside the text object field.
4. Navigate to the Field Explorer > Database Fields > BAQReportResult table.
5. In the BAQReportResult table, select and drag the LaborDtl.PayrollDate field in the text object and drop
it behind the colon.
The cursor displays as a page symbol until it is dropped in the text object field. Resize if needed.
7. In the Group Footer #1 section, place a text object to the right of the formula.
9. Navigate to the Field Explorer > Database Fields > BAQReportResult table.
10. In the BAQReportResult table, select and drag the JCDept.Description field in the text object and drop
it behind the colon.
11. From the Insert menu, select Text Object, and place it in the Report Footer section.
3. Click Save.
Sorting, selecting record criteria, and filtering for specific data are considered options. You can use Crystal Reports
features to create these options. The BAQ Report Designer handles optional criteria when a business activity
query (BAQ) is used for the report itself. You can design options at the time you create the report definition or
at the end of the Crystal Reports formatting process.
The controller has requested the data be available by job department as well as payroll date. In this workshop,
establish options for the Direct Labor report.
Navigate to the BAQ Report Designer.
Menu Path: Executive Analysis > Business Activity Management > General Operations > BAQ Report Designer
Important This program is not available
®
in the Epicor Web Access™ interface. You can launch this program
from an Epicor Smart Client (Windows ) interface.
Note Verify the XXX_DirectLbr report (where XXX are your initials) is open.
Add Options
4. In the Compare Operator field, select >= (greater than or equal to).
9. In the Compare Operator field, select <= (less than or equal to).
Add a Filter
3. In the Filter Label and Tab Label fields, accept the defaults.
4. Click Save.
Add a Sort
7. Click Save.
After you design the report, place it in the Main menu. Use the Deploy BAQ Report option to move the current
BAQ report to the network. The program moves the report from the Local Reports Directory to the Server
Reports Directory on the server.
When you save a new BAQ report, the tool automatically creates a style and a data definition for the report.
Use Report Style Maintenance to identify the different styles available for printing user-customizable reports
and forms. Use this program to define variations on each report available for users to select throughout the Epicor
application.
To create variations for each report, first create a report data definition in Report Data Maintenance. Once
variations on each report are defined, make the report available for specific companies. Use this program to
define your reports and forms designed in Crystal Reportsand SQL Server Reporting Services (SSRS). For more
information on the report definitions, refer to the Report Data Maintenance topics.
You use this functionality to create alternate styles users can select on report windows. You can also use Report
Style Maintenance to define alternate styles that generate automatically when data matches specific criteria you
define. You set up alternate style criteria using Alternate Report Style Maintenance.
Tip To create a new application report, you must purchase the Software Developers Kit (SDK). You create
all other report variations using a third party report writer (like Crystal Reports), Report Data Maintenance,
Report Style Maintenance, and Alternate Report Style Maintenance.
Menu Path
Navigate to this program from the Main Menu:
• System Management > Company Maintenance > Report Style
Important This program is not available
®
in the Epicor Web Access™ interface. You can launch this program
from an Epicor Smart Client (Windows ) interface.
Use Report Data Maintenance to create and edit data definitions for custom reports and duplicate system
reports for later editing. You can use this program to define variations for each report and make them available
to specific companies.
When you create a new report, define its main attributes and select the tables and fields to display. To customize
an existing report, first create a copy of the report. You can add fields to display on the report or remove fields
and tables. Any database table can be added to a new or existing report; this allows specific information to
display.
Report Data Maintenance gives you access to all the tables in the database and allows you to define parent and
child table relationships and display related information from any table. You can also define criteria that limits
the data that displays.
Report Data Maintenance does not change the report's layout. It only defines the data that displays on the report.
After you modify a report's fields and tables, open the report in one of the available report writers (Crystal
Reports, Financial Report Designer, BarTender or SQL Server Reporting Services -SSRS) and customize
the layout.
Once you customize the report's layout, use Report Style Maintenance to indicate which companies can use the
custom report or report variation.
Important
If the report is a system report or a BarTender label, you cannot directly change its data definition. You
can use the Actions > Duplicate Report command to make a customizable copy.
For more information, refer to the Report Data Maintenance > Duplicate Report topic in the Application
Help.
Example
System and Custom Reports are located in the <servername>\Epicor\Epicor905\Server\repo
rts folder (check with your System Administrator for the correct path).
Tip If an error displays when you try to run a report that has a new definition, open the report in an .xml
viewer to locate the issue. The .xml viewer you use allows you to view the data in a grid format, as you
can more easily review the .xml data records.
You can also use an .xml viewer to help identify the cause of some errors. It is especially useful for constraint
errors that occur within the .xml; these errors happen because the data does not match the schema
constraints.
Menu Path
Navigate to this program from the Main Menu:
• System Management > Company Maintenance > Report Data Definition
Important This program is not available
®
in the Epicor Web Access™ interface. You can launch this program
from an Epicor Smart Client (Windows ) interface.
In this workshop, make the Direct Labor report available as a menu option in the Epicor application. For additional
assistance, refer to the Select a Custom Report topic in the Application Help.
2. To the Save As message, click Yes to confirm you want to replace the existing report.
Important Due to necessary database setup and specific data used to add a report to the Main menu,
this workshop can only be performed by one person on a shared database. If you are unable to complete
this workshop, you cannot complete the Workshop - Deploy and Publish a Report - Test the Report
from the Menu.
1. In the tree view, navigate to Production Management > Job Management and select Reports.
Field Value
Menu ID UD XXXX (where XXXX are the last four digits of your phone number)
Name Direct Labor Report XXX (where XXX are your initials)
This is the report name as it displays on the menu tree.
Field Value
Security ID SEC247
This can be a new or existing security ID. If you select an existing security ID, it
should be available for at least one other report under the same parent menu.
Icon Report
This selects the standard report icon the menu structure uses.
Program Epicor.Mfg.UIRpt.BAQReport.dll
This field defaults in and points to the program you need to run the custom report
and defaults in.
3. Navigate to Production Management > Job Management > Reports and double-click the Direct Labor
Report XXX (where XXX are your initials) created in the previous workshop.
The Report Definition window displays reflecting the choices you made for options, sorts, and filters in the
BAQ Report Designer.
8. Exit the BAQ report preview and the Direct Labor report.
Many standard Crystal Reports forms are found in the individual Epicor application modules. You can modify
these forms, as well as standard Crystal reports, with Crystal Reports if the forms or reports do not meet your
needs. Utilize and apply all the Crystal Reports basics you have learned so far to modify forms.
In this section, you will learn how to change the standard Crystal Reports Purchase Order form. The principles
you apply to modify this form are applicable to when you modify any Crystal Reports forms in the Epicor application.
At the end of this section, you will be able to:
• Locate the Crystal Reports forms within the Epicor application.
• Determine the location where the database files are created.
• Open and save forms with a new name.
• Modify selected forms.
• Attach modified forms as the Epicor application default report format.
Dataset Location
When a user runs a Crystal Reports form, the Epicor application generates a number of .xml dataset files and
other related files. These files are extracted from the main Progress database tables and are actually used to
produce the desired form. These files are usually generated and located in the
EpicorData905\Reports\<username> folder on the server. The Epicor application creates the last segment of
the path statement equal to the user who generated or ran the report.
Note The .xml dataset locations vary, depending on your unique installation. Check with your network
administrator or IS manager for specific information regarding your application. For purposes of this course,
your instructor will confirm the dataset location.
When you print a purchase order, it generates the POHeader, PODetail, PORel, POMisc, SidLabls, and OrMisc
tables. These tables contain the data required for the purchase order (PO) just printed. This data is then stored
in a uniquely named file in the EpicorData905\Reports\<username> folder on the server with an .xml extension,
for example, PURCHASE ORDERXXXXX.xml. When you print another PO, another unique .xml file is created in
your folder.
Before you can modify the Crystal Reports PO form, at least one PO must be run so the source files generate and
you can preview your work as you proceed. In addition, you must preview specific PO form(s) to test the impact
and accuracy of a desired change.
rarely used and including all of them hinders printing performance. Most tables in the application allow you to
add custom fields as necessary. These fields are labeled Character01, Character02, and so on. These fields are
excluded by default.
If you need a custom or excluded field in a Crystal Reports form, you must create a new Report Definition where
you include the field(s) in the definition. You must then define this definition as an additional report style through
Report Style entry. After you define the report style, you can select it when you print a form or report. This creates
the .xml file that contains the desired field(s) in the dataset.
There are many ways to modify the standard purchase order form. This workshop walks you through a method
that uses the Report Data Definition to add an additional database field to the defined dataset.
Your company wants to modify the existing purchase order form to include the company logo. In addition, they
want to suppress closed lines on updated purchase orders (POs). It is not uncommon in your business to issue
blank orders that are subject to change. When a change occurs, you must resubmit an updated PO that uses the
same PO number to the supplier. The standard PO form does not suppress closed lines, which can confuse your
suppliers as they occasionally refill these lines.
4. In the File name field, enter XXX_POForm.rpt (where XXX are your initials).
Important If working in a shared database, save the file to the following location
\\<servername>\Epicor\Epicor905\server\reports\POForm.rpt.
5. Click Save.
3. In the Report Def ID field, enter POFrmXXX (where XXX are your initials).
4. In the Description field, enter XXX Modified Purchase Order (where XXX are your initials).
5. Click OK.
7. In the tree view, select the Report Data > Modified Purchase Order > Report Table > PODetail table.
The Included Report Fields and Excluded Report Fields sections populate.
8. In the Excluded Report Fields column, select the OpenLine field and use the left arrow button to move
it to the Included Report Fields section.
4. In the Description field, enter XXX Modified Purchase Order (where XXX are your initials).
6. In the Data Definition field, select POFrmXXX (where XXX are your initials).
7. In the Report Location field, enter reports/XXX_POForm.rpt (where XXX are your initials).
3. In the Report Style field, select XXX Modified Purchase Order (where XXX are your initials).
5. Close the Purchase Order report and the Purchase Order print window.
3. In the Current Data Source section, select the report > ReportDataSet node.
4. In the Replace with section, expand the Create New Connection > ADO.Net (xml) node.
The ADO.Net (xml) window displays.
6. Click Finish.
7. In the Replace with section, select the Create New Connection > ADO.Net (xml) > ReportDataSet
node.
9. In the Current Data Source section, select the Subreports > Report Data Set node and click Update to
synchronize the subreports dataset.
10. In the Current Data Source section, expand the ReportDataSet > Properties line and note the file path
to verify the properties of each ReportDataSet, validating both sections point to the above .xml file.
11. In the Replace with section, right-click the ReportDataSet node, select Properties, and verify the file
path.
2. In the Page Header c section, drag and drop the bottom boundary down far enough to move the column
headers down and position the company logo above them.
4. Navigate to the file location of your company's logo and click Open.
Note In an Epicor training facility, the instructor provides the location of the logo. Any graphic format
can be added to the report using the Insert Picture steps.
5. Drag and drop the resulting outline so the top edge is at the top of the Page Header c section close to the
left margin.
7. In the File name field, enter XXX_POFormMod.rpt (where XXX are your initials) and click Save.
4. Navigate to the Common sheet and to the right of the Suppress (No Drill-Down) option, click the x+2
formula button.
The Format Formula Editor - Suppress (No Drill-Down) window displays.
5. In the second column, expand the ReportDataSet (ADO.Net (xml)) > PODetail listing.
10. Repeat this process for the Details and Group Footer #2 PODetail.POLine-A section, pasting the same
formula into both Formula Editor windows and click OK.
11. Preview the report to verify the closed lines do not display.
Once you modify a form or report, it can be set up in the Epicor application as the default. Prior to printing a
form, the application allows you to select the form to use. The form defined as the default form is selected unless
indicated otherwise.
Workshop - Establish the New Purchase Order Form as the System Default
In this workshop, establish the new purchase order form as the Epicor application default.
Navigate to Report Maintenance.
Menu Path: System Management > Company Maintenance > Report Style
Important This program is not available
®
in the Epicor Web Access™ interface. You can launch this program
from an Epicor Smart Client (Windows ) interface.
5. In the Report Location field, enter reports/XXX_POFormMod.rpt (where XXX are your initials).
Confirm the path to the location of the saved, modified purchase order (PO) form. The named report differs
from the above saved report name. Select the correct saved report name as named in the previous workshop.
6. Click Save.
7. In the Company List section, in the Valid column, verify the Epicor Education check box is selected to
assure the form is valid for this company.
8. In the Default column next to the same company, select the Default check box.
The Valid and Default columns enable you to create forms unique to each of your companies. A generic
form may be all you need. You can flag one form as Valid and the other as the Default for all companies.
10. (Optional) Navigate to Purchase Order Entry and print preview purchase order 4055, where XXX_POForm
- Modified (where XXX are your initials) defaults as the report style.
In this section, complete the following workshops which focus on how to create a booked orders report. This is
a review of all the BAQ Report Designer details discussed up to this point.
The report creation activities resemble activities covered in previous sections of this course. At the end of this
section, you will be able to:
• Apply design tools.
• Insert text objects.
• Create and move report sections.
• Sort records on the report.
Add a Report
Navigate to the BAQ Report Designer.
Menu Path: Executive Analysis > Business Activity Management > General Operations > BAQ Report Designer
Important This program is not available
®
in the Epicor Web Access™ interface. You can launch this program
from an Epicor Smart Client (Windows ) interface.
2. In the Report ID field, enter XXX_BookedOrder (where XXX are your initials).
6. Click Save.
Use the Deploy Report feature when the report is ready for access by all team members.
If the entire dataset is not required to design the report, you can use the Generate Sample Data command.
This command creates an .xml file with minimal information.
2. In the dialog box, note the data file path and name _________________________.
3. Click OK.
At this point, the business activity query ran, and Crystal Reports can use the data in the .xml file. This is a
good time to examine the data presented to ensure it pulls the query data you expect it to pull.
The Report Definition must be in place prior to completing this workshop. When you select Design Crystal Report
from the BAQ Report Designer Actions menu, the report becomes available to format. When the sample data
.xml file is created, it links to a datasource unknown to Crystal Reports and saves into the Sample Reports folder.
This .xml file only contain a sampling of the true data from the business activity query (BAQ).
This report demonstrates how to set the datasource and display the full record count. After you test the report
function, an .xml file is created in the C:\Program Files\Epicor\Epicor905\server\reports\<username>
directory. Retrieving the data from this directory provides an .xml datasource with complete data. Use the .xml
file generated here to see the full record count of data to design a new Crystal report from a BAQ.
Maximize the BAQ Report Designer.
Select Datasources
3. In the Replace with section, double-click the Create New Connection > ADO.Net (xml) node.
The Datasource File Path window displays.
4. In the File Path field, search for and select the C:\Program
Files\Epicor\EpicorData905\Reports\<Manager> folder.
Important If working in a shared database, navigate to the \\<server
name>\EpicorData905\Reports\<username> folder. This path may be different on your system.
5. Select the BAQ Report -XXX_BookOrder-XXXXX.xml (where XXX are your initials) file and click Open.
The XXXXX in the file name represents a value assigned by the Epicor application.
8. In the Replace with section, select the ADO.Net (xml) > ReportDataSet node.
2. In the Available Data Sources pane, under the ReportDataSet node, double-click the BAQReportResult
table to add it to the Selected Table pane.
Review Links
2. Double-click the link between the Company and the BAQReportParameters tables.
The Link Option window displays.
3. In the Join Types section, select Left Outer Join and click OK.
5. Click Save.
1. In the Page Header section, press and hold Ctrl and select the Report Title, Print Date, and Page N of
M fields.
2. Press Delete.
Add a Formula
1. In the Field Explorer pane, right-click the x+1 Formula Fields line and select New.
The Formula Name window displays.
3. In the Formula Editor window, in the second column, expand the ReportDataSet (ADO.Net (xml)) >
BAQReportResult table.
5. In the Formula Editor window, in the fourth column, expand the Operators > Arithmetic folder and
double-click Multiply.
8. Click Save.
Insert Fields
1. In the Field Explorer pane, expand the Database Fields > BAQReportResult table.
2. In the BAQReportResult table, select the following fields and insert them into the Details section in the
following order.
• OrderDtl.PartNum
• BookDtl.BookDate
• BookDtl.OrderNum
• BookDtl.OrderLine
• BookDtl.BookType
• BookDtl.SellingBookQty
• BookDtl.BookValue
3. From the Field Explorer > x+1 Formula Fields line, select the Gross Margin formula, and drop it into
the Details section of the report.
4. Click Refresh.
The Preview sheet displays.
6. Click Save.
Insert Groups
Add groups for the ProdGrup.Description and Customer.Name fields to make the report easier to read.
3. In the Available Fields pane, expand the BAQReportResult table and double-click the
ProdGrup.Description field to move it to the Group By section.
4. In the Group By list, select ProdGrup.Description and click the Options button.
The Change Group Options window displays.
5. In the Change Group Options window, navigate to the Options sheet and select the Keep Group
Together and Repeat Group Header On Each Page check boxes.
6. Click OK.
Add subtotals and a grand total for the BookDtl.BookValue and Gross Margin columns.
2. In the Details section, right-click the BookDtl.BookValue field and select Insert > Summary.
The Insert Summary window displays.
3. In the Insert Summary window, select the Add to all group levels check box and click OK.
5. Verify the columns are wide enough to display all the summary data, and increase the field width(s) if
necessary.
6. Click Save.
The current Page Header section is split to hold more data, as space is needed for a special field(s) and company
logo.
3. At the top of the display, click Insert twice to add Page Header c.
The new Page Header c section displays below the column header items. The next step allows you to
change this without having to individually move the column header fields.
4. At the top of the window, use the upward arrow to move Header c into the Header b position and click
OK.
You do not see the Page Headers listed as b and c as you would expect. Crystal Reports simply rearranges
the information from Header b to c. Note the column header labels now display in the Header c section,
directly above the group header and detail sections of the report.
2. In the Title field, enter XXX Booked Order List (where XXX are your initials) and click OK.
The title bar in the window now reads Crystal Reports - [XXX Booked Order List] (where XXX are your
initials), reflecting the Report Title field contents instead of the saved file name.
4. In the Special Fields node, select the Report Title field and drag it onto the Page Header a section.
9. In the Page Header a section, drag the bottom boundary down to accommodate the report title or any
other special field(s) in this area.
10. Right-click the Report Title field and select Format Field to format the title field.
The Format Editor window displays.
14. Select the Background check box, select a background color, and click OK.
2. In the Page Header a section, select all the column header fields and drag and release the fields in the
Page Header c section.
3. In the Page Header c section, select and drag the bottom boundary down to create space.
4. Select all the column header fields, and from the Standard toolbar, click the U (Underline) button.
5. On the Standard toolbar, click the B (Bold) button to bold the column header fields.
1. In the Page Header c section, double-click each column header field and modify the field text.
The following are possible header titles:
• Part Num
• Book Date
• Order Num
• Order Line
• Book Type
• Selling Book Qty
• Book Value
• Gross Margin
2. Expand the column header fields from a single line to a double line.
Verify the field is selected, press Shift, and click the down arrow once or twice.
When you use the down arrow to expand the column header, the lines break at the spaces between the
words. This minimizes the need to expand the width.
5. Right-click one of the column headers fields and select Align > Bottoms.
6. Click Save.
Insert a Line
Insert a solid line below the column headers and change the column width and color.
7. Click OK.
8. Click Save.
4. Drop Epicor Logo into the Page Header a section and size the logo as desired.
9. Click Save.
2. Drop the text object field into the Group Footer #2 section and position it to the left of the subtotal fields.
3. In the Text Object field, enter Totals for: (include a space at the end).
4. In the Field Explorer pane, expand the Group Name Fields node and select Group #2 Name:
BAQReportResult.Customer.Name.
5. Drag and drop the field into the text object and resize the field as necessary.
The group name displays after the entered text. A symbol that looks like a piece of paper with a plus sign
on it displays.
6. Repeat this process for the Group Footer #1 and Group #1 Name: ProdGrup.Description field.
7. From the Insert menu, select Text Object and insert the text box in the Report Footer section.
8. In the Text Object field, enter Grand Totals: (include a space at the end).
11. In the Line Style pane, in the Left, Right, Top, and Bottom fields, select Double.
Sorting, selecting record criteria, and prompting for data are considered options. If a report is generated directly
in Crystal Reports, options are created using Crystal Reports features. The BAQ Report Designer handles optional
criteria when a business activity query is used for the report itself. You can design options at the time you create
the report definition or at the end of the Crystal Report formatting phase.
The Booked Order Report shows orders booked within a certain date range and is sorted by order number, order
line, and booked type.
Maximize the BAQ Report Designer.
Note Verify the XXX_BookedOrder (where XXX are your initials) report displays.
Add Options
3. In the Field Label column, enter Beginning Book Date and press Tab.
The field label does not have to match the field name from the table.
4. In the Compare Operator field, select >= (greater than or equal to).
8. In the Field Label column, enter Ending Book Date and press Tab.
The field label does not have to match the field name from the table.
9. In the Compare Operator field, select <= (less than or equal to).
Add Filters
You can only use indexed fields from the business activity query as a filter. In this section, filter by Customer
Number and Product Group.
2. In the Save As message, click Yes to confirm you want to replace the existing report.
3. Record the path where the report was placed for future reference __________________________________
.
2. In the Beginning Book Date field, enter the date two years before today.
4. Navigate to the Filter > Group sheet and click the Group button.
The Search Form window displays.
5. In the Search Form window, search for and select Fabricated and click OK.
This section addresses a number of additional reporting functions that use the Epicor application and Crystal
Reports.
At the end of this section, you will be able to:
• Create and use conditional formatting formulas.
• Use the highlighting tool to format fields.
• Use the Section Expert tool to format report sections.
• Use the Group Sort Expert feature.
• Export reports into different formats for report distribution.
In this workshop, apply conditional formatting to the Booked Order List report.
The objective of this workshop is to enable the Booked Order List report to display a customer’s booked orders
over a period of time in purple, if the total exceeds $50,000.00 and in red, if the total is less than $1,000.00. To
do this, you must use conditional formatting on the Group #2 Name: Customer.Name field in Group Header #2.
This is based on the SUM of the BookDtl.BookValue field in Group Footer #2.
Maximize Crystal Reports.
Note Verify the XXX Booked Order List (where XXX are your initials) report is open.
2. From the tree view, expand the XXX Booked Order List > Fabricated (where XXX are your initials) line.
4. In the Group Header #2 (GH2) section, right-click the customer name, and select Format Field.
The Format Editor window displays.
5. Navigate to the Font sheet, and next to the Color field, click the x+2 button.
The Format Formula Editor - Font Color window displays.
7. In the second column, expand the Report Fields node, and double-click the Group #2:
BAQReportResult.Customer.Name-A:Sum of BAQReportResult.BookDtl.BookValue field.
8. In the fourth column, expand the Operations > Comparison folder and double-click the Greater or equal
(x >= y) line.
9. In the Editor pane, after the >= (greater than or equal to) sign, enter 5000 (without any commas or decimal
points).
11. In the new row, enter Then to create the first formula condition.
12. In the third column, expand the Functions > Color Constants listings and double-click the Purple line.
14. In the new row, enter Else if to enter the second formula condition.
15. In the second column, in the Report Fields listing, select the Group #2:
BAQReportResult.Customer.Name-A:Sum of BAQReportResult.BookDtl.BookValue field once more.
16. In the fourth column, expand the Operations > Comparison folder and double-click the Less or equal
(x <= y) line.
17. In the Editor pane, after the <= (less than or equal to) sign, enter 1000.
20. In the third column, expand the Functions > Color Constants listings and double-click the Red line.
You have conditionally formatted an attribute property that can be set many different ways. Formatting an
attribute property requires an if-then-else formula; if something is true, then a format is applied, else some other
format (or none) is applied.
Highlighting Expert
Highlighting is an alternative to conditional formatting. The following are considerations to be aware of when
deciding between highlighting and conditional formatting:
• Highlighting overrides both absolute formatting and conditional formatting.
• Highlighting allows you to set the font color, background color, and border style all in one place.
• You can only apply highlighting to number or currency fields.
• You can use the Undo button on the Standard toolbar to undo highlighting.
• The Highlighting tool uses a simple fill-in-the-blank sheet instead of writing a formula.
In this workshop, use the Highlighting Expert in Crystal Reports as an alternative to conditional formatting.
Use the Highlighting Expert to format the sum of the BookDtl.BookValue field in Group Footer #2 with similar
parameters used to conditionally format the Group #2 Name field.
Any Sum of BookDtl.BookValue sum greater than $100,000.00 must have a double box around it, any
BookDtl.BookValue sum greater than $50,000.00 must have a purple font color, and any BookDtl.BookValue
sum less than $100.00 must have a red font color.
Maximize Crystal Reports.
Note Verify the XXX Booked Order List report (where XXX are your initials) report is open.
2. In the Group Footer #2 (GF2) section for Edwards International, right-click the Sum of
BookDtl.BookValue field and select Highlighting Expert.
The Highlighting Expert window displays.
4. In the Item editor pane, in the Value of: fields, enter this field is greater than or equal to 100000 and
press Enter.
7. In the Item editor section, in the Value of: fields, enter this field is greater than 50000 and press Enter.
10. In the Item editor section, in the Value of: fields, enter this field is less than or equal to .01 and press
Enter.
11. In the Font color field, select Red and click OK.
The Section Expert is a powerful and flexible tool for formatting different sections of the report. Some of the
options available in the Section Expert window under the Common sheet include:
• Free-Form Placement - This option allows you to place objects anywhere on your report without having to
adhere to the grid layout; this is subject to the effect of the Snap to Grid option.
• Hide (Drill-Down OK) - This option allows you to prevent an area or section of your report from printing
but still allows users to double-click a summary field to show underlying data.
• Suppress (No Drill-Down) - This option prevents a section of your report from printing and disallows the
drill-down capability in the summary field. You can write a Boolean (on or off) formula to make this command
conditional.
• Print at Bottom of Page - This option forces whatever is in a section to print as low on the page as possible.
It can also be made conditional with a Boolean formula.
• New Page Before and New Page After - These options are used with Group Headers and Group Footers.
They force a page break just before or just after entering the section to which this setting is applied.
• Reset Page Number After - This option is typically applied to a Group Footer, and it causes the page number
to return to one after the section is complete. This command can also be made conditional with a formula.
• Keep Together - This option prevents data from a single record from spreading over two pages. Write a
Boolean formula to make this option conditional.
• Suppress Blank Section - This option prevents a section of a report from printing if all the fields in that
section are blank.
• Underlay Following Sections - This option is typically used to make a company logo a watermark. It allows
any object(s) in a section to flow into the next while allowing objects from the next section to print on top of
the first.
• Format with Multiple Columns - This option only displays if you highlight Details in the Sections pane of
this window, or if in Preview or Design mode, you right-click D or Details in the gray area to the left of your
report. It allows you to create a report that shows the details in column format, which works well when you
create a simple phone list, for example.
The option available in the Section Expert > Color sheet allows you to select a color as a background for any
of the report sections.
Insert a page break so the data for each product group starts on a separate page.
3. Click Options.
The Change Group Options window displays.
4. Navigate to the Options sheet, clear the Keep Group Together check box, and click OK.
9. In the Common sheet, select the New Page After check box and click OK.
See the Formula FAQs in the course Appendix for information on how to write a conditional formula to
prevent grand totals from printing on a page by themselves.
Set the background color on each odd numbered Detail section of the report. This process can make a report
easier to read as each detail line has alternating background colors.
2. In the vertical gray margin, right-click one of the Details (D) lines and select Section Expert.
The Section Expert window displays.
4. Next to the Background Color field, click the x+2 formula button.
The Format Formula Editor – Background Color window displays.
7. In the third column, expand the Functions > Math list and double-click the Remainder line.
8. In the third column, expand the Functions > Print State list.
9. Between the Remainder parentheses and before the comma, insert RecordNumber.
This creates the required numerator argument for the Remainder function.
10. After the comma, enter 2, the required Denominator argument for the function, and position the cursor
outside the parentheses.
11. In the fourth column, expand the Operators > Comparisons list and double-click Not equal (x<>Y).
12. In the Editor pane, after the <> sign, enter 0 (zero).
14. Enter Then to begin the formula result if the condition is true.
15. In the third column, expand the Functions > Color Constants list and double-click Aqua.
17. Enter Else to begin the formula result if the condition is false.
18. In the third column, from the Functions > Color Constants list, double-click NoColor.
The Group Sort Expert tool allows you to sort groups in a report based on a performance measure. With the
Group Sort Expert tool, you can easily create these reports:
• Top N - Top specified number of groups shown individually, listed from highest to lowest
• Bottom N - Bottom specified number of groups shown individually, listed from lowest to highest
• Sort All - Sorts all groups in the report in ascending or descending order as specified
This workshop shows you how to use the Group Sort Expert tool in Crystal Reports.
In this workshop, you will accomplish the following:
• Sort all product group totals.
• Highlight only the top two product group totals. All other product group data is combined into a group labeled
Other Groups.
• Report on only the top two product groups. All other product group data is excluded from the report.
2. In the File name field, enter XXX_BookOrderTopN.rpt (where XXX are your initials).
3. Click Save.
Sort Totals
7. Click Save.
Highlight the top two product group totals. All other product group data is combined into a group labeled Other
Groups.
The report grand totals do not change with this Top N/Group Sort.
6. Click OK.
7. Click Save.
Report only the top two product groups. All other product group data is excluded from the report.
3. Click OK.
4. Preview the report, and use the Top N option of your choice to save it.
Your grand totals have not changed, even though you have excluded all other customer groups from your
report. This is because Crystal Reports makes two passes through the data and calculates and saves totals
as it reads each record on the first pass through the data. The current grand total is saved with each record.
Thus, the automatic grand total that displays in the Report Footer reflects the records selected and read,
not the groups that actually display.
Your choices at this point are:
• Suppress the grand totals and avoid the inevitable questions.
• Describe the grand totals more fully, for example, the grand totals include order amounts from customer
groups not shown.
• Make use of Running Totals, which calculate when the report prints rather than when the records selected
are read. Running Totals are discussed in the next section.
Running Totals
This workshop demonstrates how to create a running total on the BookDtl.BookValue field and other fields.
Maximize your XXX_Booked Order List (where XXX are your initials) report, or re-open it.
2. In the Field Explorer pane, right-click the Running Total Fields line and select New.
The Create Running Total Field window displays.
3. In the Available Tables and Fields section, select the Report Fields >
BAQReportResult.BookDtl.BookValue field.
4. Click the right arrow button to move it to the Field to summarize field.
7. In the Reset section, select the Never option and click OK.
8. Repeat this process for the Gross Margin formula field and the BookDtl.OrderNum field.
For the BookDtl.OrderNum running total, in the Type of summary field, select Distinct Count.
10. Right-click each running total field respectively and insert it into the Report Footer section below the Grand
Total fields; under the appropriate column.
12. Click Save and remain in Crystal Reports for the next workshop.
Export Reports
Exporting is distributing a report to a disk file or through email. Crystal Reports allows you to export reports in
many popular spreadsheet, database, word processor, HTML, and data interchange formats.
The following workshop illustrates file export capabilities in Crystal Reports. You can export the Booked Order
List report from the previous workshops.
4. Accept the default prompts and click OK to export the report to Microsoft Excel.
In Microsoft Excel, the Book Order report displays in xls format.
6. Repeat this process to export to other applications such as Microsoft Word®, Adobe® Acrobat ®, and
HTML 4.0.
Conclusion
Appendix
This section contains Crystal Reports frequently asked questions about formulas.
Adding Crystal Reports formulas can enhance report writing processes. Some questions commonly asked are
explained below.
Parameter Data
Date Range
"From: " + ToText (Minimum({?DateRange}))+"To: " +
ToText(Maximum({?DateRange}))
Where? DateRange is your parameter
Number Range
"From: " + ToText (Minimum({?NumberRange}),0,"")+"To: " +
ToText(Maximum({?NumberRange}),0,"")
Where? NumberRange is your parameter
String Range
"From: " + Minimum({?StringRange})+ "To: " + Maximum({?StringRange})
Where? StringRange is your parameter.
Create a formula thus;- For Crystal Reports Version 9, substitute Cstr for ToText. ToText and Cstr are
interchangeable in Crystal Reports version 10.0.
IF LENGTH( TRIM( {Signature Field} ) ) = 0 THEN "Howard Low" ELSE {Signature Field}
3. How do I convert the LaborHed ClockOutTime and ClockInTime fields, which are numbers (for
example, 1450) to regular time (for example, 2:30)?
Answer: Create a new formula field called ClockOut. To convert ClockInTime, substitute the ClockInTime
field in the formula below.
NumberVar nbrTime:= IIF(not(IsNull({LaborHed.ActualClockOutTime})) AND
{LaborHed.ActualClockOutTime}<25 AND
{LaborHed.ActualClockOutTime}>0,{LaborHed.ActualClockOutTime},0); NumberVar nbrHour :=
nbrTime; NumberVar nbrMinute := Remainder(nbrHour,1) * 60; NumberVar nbrSecond :=
Remainder(nbrMinute,1) * 60; nbrHour := truncate(nbrHour); nbrMinute := truncate(nbrMinute);
nbrSecond := truncate(nbrSecond); nbrHour := IIF(nbrHour<0 OR nbrHour>=24,0,nbrHour); //
protect for the 0->24 data in DB, should only be 0.00 -> 23.99 cTime(nbrHour,nbrMinute,nbrSecond);
4. How do I prevent grand totals from printing on a single page of the report when formatting a
report with a page break per group?
Answer: Write a conditional formula Not OnLastRecord on the new page after Property.