Sei sulla pagina 1di 121

Epicor ERP

Crystal Reports Course


9.05.702
Disclaimer
This document is for informational purposes only and is subject to change without notice. This document and its
contents, including the viewpoints, dates and functional content expressed herein are believed to be accurate as of its
date of publication. However, Epicor Software Corporation makes no guarantee, representations or warranties with
regard to the enclosed information and specifically disclaims any applicable implied warranties, such as fitness for a
particular purpose, merchantability, satisfactory quality or reasonable skill and care. As each user of Epicor software is
likely to be unique in their requirements in the use of such software and their business processes, users of this document
are always advised to discuss the content of this document with their Epicor account manager. All information contained
herein is subject to change without notice and changes to this document since printing and other important information
about the software product are made or published in release notes, and you are urged to obtain the current release
notes for the software product. We welcome user comments and reserve the right to revise this publication and/or
make improvements or changes to the products or programs described in this publication at any time, without notice.
The usage of any Epicor software shall be pursuant to an Epicor end user license agreement and the performance of
any consulting services by Epicor personnel shall be pursuant to Epicor's standard services terms and conditions. Usage
of the solution(s) described in this document with other Epicor software or third party products may require the purchase
of licenses for such other products. Where any software is expressed to be compliant with local laws or requirements
in this document, such compliance is not a warranty and is based solely on Epicor's current understanding of such laws
and requirements. All laws and requirements are subject to varying interpretations as well as to change and accordingly
Epicor cannot guarantee that the software will be compliant and up to date with such changes. All statements of
platform and product compatibility in this document shall be considered individually in relation to the products referred
to in the relevant statement, i.e., where any Epicor software is stated to be compatible with one product and also
stated to be compatible with another product, it should not be interpreted that such Epicor software is compatible
with both of the products running at the same time on the same platform or environment. Additionally platform or
product compatibility may require the application of Epicor or third-party updates, patches and/or service packs and
Epicor has no responsibility for compatibility issues which may be caused by updates, patches and/or service packs
released by third parties after the date of publication of this document. Epicor® is a registered trademark and/or
trademark of Epicor Software Corporation in the United States, certain other countries and/or the EU. All other
trademarks mentioned are the property of their respective owners. Copyright © Epicor Software Corporation 2013.
All rights reserved. No part of this publication may be reproduced in any form without the prior written consent of
Epicor Software Corporation.

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

Epicor ERP | 9.05.702 3


Contents Crystal Reports Course

Add a Report Grouping Criterion..............................................................................................30


Create Report Summaries.........................................................................................................30
Deploy the BAQ Report...........................................................................................................................32
Workshop - Deploy the BAQ Report................................................................................................32
Download Report...................................................................................................................................32
Copy BAQ Report...................................................................................................................................32
Export BAQ Report.................................................................................................................................32
Import BAQ Report.................................................................................................................................33
Database Concepts...............................................................................................................34
Identify Table and Field Names.......................................................................................................................34
Field Help Technical Details.....................................................................................................................36
Workshop - Use the Field Help.........................................................................................................36
Customization Tools...............................................................................................................................38
Workshop - Reference Customization Tools.....................................................................................38
Activate Developer Mode.........................................................................................................38
Identify Table and Field Names.................................................................................................38
Deactivate Developer Mode......................................................................................................39
Data Dictionary Viewer...........................................................................................................................40
Workshop - Use the Data Dictionary Viewer.....................................................................................41
Table Linking.................................................................................................................................................42
Dataset Relationships Tracker..................................................................................................................43
Workshop - Display the Dataset Relationships Tracker......................................................................43
Join Types...............................................................................................................................................44
Custom Report Design Tools................................................................................................46
Workshop - Create a Parts List Business Activity Query...................................................................................46
Select and Sort Columns.........................................................................................................................47
Workshop - Define Manufactured Parts Report..............................................................................................49
Verify Report Option Paths......................................................................................................................49
Enter the BAQ Report Header.................................................................................................................49
Test the Report Form..............................................................................................................................49
(Optional) Generate Sample Data............................................................................................................50
Design a Crystal Report...........................................................................................................................50
Add a Report Table.................................................................................................................................51
Workshop - Create a Manufactured Parts Listing Report.................................................................................53
Insert and Resize Fields...........................................................................................................................53
Rearrange Fields.....................................................................................................................................54
Establish Groups for a Report..................................................................................................................54
Modify the Group Header Preview..........................................................................................................55
Insert a Summary for a Numeric Field......................................................................................................55
Insert a Summary for a Text Field............................................................................................................56
Presentation Quality Custom Reports.................................................................................57
Workshop - Add Presentation Quality Formatting to Custom Reports.............................................................57
Review the Report Subtotals...................................................................................................................57
Format the Subtotal Borders...................................................................................................................57

4 Epicor ERP | 9.05.702


Crystal Reports Course Contents

(Optional) Copy the Field Format............................................................................................................58


Insert Text Objects..................................................................................................................................58
Format the Report Title...........................................................................................................................59
Resize Text Objects.................................................................................................................................59
Insert Group Footer Text Objects.............................................................................................................60
Rename Column Headers.......................................................................................................................60
Format Column Headers.........................................................................................................................60
Insert Special Fields.................................................................................................................................61
Resize and Format Special Fields.............................................................................................................62
Perform Additional Report Formatting....................................................................................................62
Insert a Line............................................................................................................................................62
Add Boxes..............................................................................................................................................63
Insert a Company Logo...........................................................................................................................63
Workshop - Define Options for a Manufactured Parts Listing..........................................................................65
Add an Option........................................................................................................................................65
Add a Filter.............................................................................................................................................65
Add a Sort..............................................................................................................................................66
Test the Report.......................................................................................................................................66
Add the Report to the Main Menu..........................................................................................................67
Direct Labor Reports.............................................................................................................69
Workshop - Define the Direct Labor Report....................................................................................................70
Add a Report..........................................................................................................................................70
Test the Report.......................................................................................................................................70
Workshop - Prepare for Crystal Formatting.....................................................................................................71
Select the Datasource.............................................................................................................................71
Add the BAQReportResult Table.............................................................................................................72
Review Links...........................................................................................................................................72
Workshop - Create a Direct Labor Report.......................................................................................................73
Rearrange Default Fields.........................................................................................................................73
Add a Formula Field................................................................................................................................73
Insert Fields.............................................................................................................................................74
Format the Column Headings.................................................................................................................75
Insert Groups..........................................................................................................................................75
Insert Group Summaries and Grand Totals..............................................................................................76
Use the Select Expert..............................................................................................................................76
Insert Text Objects..................................................................................................................................77
Insert Presentation Quality Detail............................................................................................................77
Save and Exit the Report.........................................................................................................................78
Workshop - Define Direct Labor Report Options.............................................................................................79
Add Options...........................................................................................................................................79
Add a Filter.............................................................................................................................................80
Add a Sort..............................................................................................................................................80
BAQ Report Deployment......................................................................................................81
Report Style Maintenance..............................................................................................................................81

Epicor ERP | 9.05.702 5


Contents Crystal Reports Course

Report Data Maintenance..............................................................................................................................81


Workshop - Deploy and Publish a Report.......................................................................................................83
Deploy the Report...................................................................................................................................83
Add the Report to a Menu......................................................................................................................83
Test the Report from the Menu...............................................................................................................85
Crystal Reports Forms Modification....................................................................................86
Workshop - Modify the Purchase Order Form.................................................................................................87
Add a Purchase Order Form....................................................................................................................87
Add a Report Definition..........................................................................................................................88
Add a Report Style..................................................................................................................................88
Create the XML File................................................................................................................................89
Set the Datasource Location...................................................................................................................89
Insert a Company Logo...........................................................................................................................90
Suppress Closed Lines on the Modified PO Form.....................................................................................91
Establish the Modified Form as the System Default.........................................................................................92
Workshop - Establish the New Purchase Order Form as the System Default.............................................92
Create a Booked Orders Report...........................................................................................93
Workshop - Define the Booked Orders Report................................................................................................93
Add a Report..........................................................................................................................................93
Test the Report.......................................................................................................................................93
(Optional) Generate Sample Data............................................................................................................94
Workshop - Prepare for Crystal Formatting.....................................................................................................95
Select Datasources..................................................................................................................................95
Add the BAQReportResult Table.............................................................................................................96
Review Links...........................................................................................................................................96
Workshop - Create a Booked Orders Report...................................................................................................97
Delete Default Fields...............................................................................................................................97
Add a Formula........................................................................................................................................97
Insert Fields.............................................................................................................................................98
Insert Groups..........................................................................................................................................98
Add Subtotals and a Grand Total............................................................................................................99
Add a Page Header Section.....................................................................................................................99
Insert a Report Title...............................................................................................................................100
Format Column Headers.......................................................................................................................101
Edit Column Header Field Names..........................................................................................................101
Insert a Line..........................................................................................................................................102
Insert a Company Logo.........................................................................................................................102
Insert Descriptive Text...........................................................................................................................103
Workshop - Define Booked Order Report Options........................................................................................104
Add Options.........................................................................................................................................104
Add Filters............................................................................................................................................104
Deploy the Report.................................................................................................................................105
Test the Report.....................................................................................................................................105
Miscellaneous Reporting Activities...................................................................................106

6 Epicor ERP | 9.05.702


Crystal Reports Course Contents

Conditional Formatting Formulas.................................................................................................................106


Workshop - Use Conditional Formatting in Crystal Reports....................................................................107
Add a Colored Formula.................................................................................................................107
Highlighting Expert......................................................................................................................................109
Workshop - Use the Highlighting Expert in Crystal Reports....................................................................110
Section Expert Tool......................................................................................................................................111
Workshop - Use the Section Expert Tool in Crystal Reports....................................................................111
Add Page Breaks...........................................................................................................................111
Color Odd Numbered Lines...........................................................................................................112
Group Sort Expert Tool................................................................................................................................114
Workshop - Use the Group Sort Expert Tool..........................................................................................114
Copy the Booked Order List Report................................................................................................114
Sort Totals.....................................................................................................................................114
Format Product Groups.................................................................................................................115
Report Product Groups..................................................................................................................115
Running Totals.............................................................................................................................................116
Workshop - Create a Running Total......................................................................................................116
Export Reports.............................................................................................................................................117
Workshop - Export Reports...................................................................................................................117
Conclusion...........................................................................................................................118
Appendix.............................................................................................................................119
Crystal Reports Frequently Asked Questions about Formulas........................................................................119

Epicor ERP | 9.05.702 7


Crystal Reports Course Crystal Reports Course

Crystal Reports Course

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.

Upon successful completion of this course, you will be able to:


• Name the Main menu components in Crystal Reports.
• List attributes of the Design and Preview sheets.
• Set the Crystal Reports defaults.
• Use an existing BAQ as the datasource.
• Review the purpose of the BAQ Report Designer and how to create a user interface for a report.
• Use the design functionality in the BAQ Report Designer.
• Transfer a BAQ Report Designer report into a Crystal report.
• Explore ways to identify tables and field names.
• Use the data dictionary viewer and the dataset relationship dashboard.
• Identify different join types.
• Use Custom Design tools to design reports.
• Group report data.
• Set up subtotals and grand totals.
• Use the Formula Editor to create calculated fields.
• Format reports for presentation.
• Attach a report to the Epicor application menu.
• Create conditional formatting.
• Export and add a report to the Epicor application menu.
• Modify standard Crystal Reports forms.

8 Epicor ERP | 9.05.702


Crystal Reports Course Before You Begin

Before You Begin

Read this topic for information you should know in order to successfully complete this course.

Audience

Specific audiences will benefit from this course.


• System Administrator
• IT/Technical Staff

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.

Epicor ERP | 9.05.702 9


Before You Begin Crystal Reports 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).

4. From the Main menu, select the Main Plant.

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

10 Epicor ERP | 9.05.702


Crystal Reports Course Crystal Reports Overview

Crystal Reports Overview

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.

Crystal Reports Main Window


Navigate to the Main window in Crystal Reports to demonstrate and discuss the menu elements.
Menu Bar
Crystal Reports menu options vary depending on where you are in the report design process. The File, View, and
Help menus are the available options on the main sheet of this program. Other menu selections available in the
design phase of a custom report include the Edit, Insert, and Format menus.
Standard Toolbar
Commands frequently accessed from the menu are grouped in the Standard toolbar. This toolbar remains on
the window and can be turned off using the toolbars command from the View menu.
Note Tool tips display if the mouse hovers over the toolbar icon. These tips provide a brief description of
the function of the icon.

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.

Print Preview Window


Crystal Reports includes several sample reports of various features included in the product. Follow these steps to
open a sample report.

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.

2. From the View menu, select Print Preview.

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

Epicor ERP | 9.05.702 11


Crystal Reports Overview Crystal Reports Course

Report Design Sheet


The Design sheet is where most of the initial work is done when creating a report. It designates and labels various
sections of the report. You can do the initial formatting, place objects and specify sorting, grouping, totaling
needs, and so forth.
Using the same sample report, navigate to the Design sheet. The report design components primarily relate to
textual elements of a report - the header, footer, and details sections. The Design sheet is composed of the
following sections which are discussed in depth throughout the course.
Report Header
Any object in the Report Header section only prints on the first page of a report. The report date and the company
logo are placed here. Additional fields such as Report Comments, File Path, and Name can also print here.
Page Header
Data or objects in the Page Header section print at the top of every page. Column headings print in this section
by default.
Details
Report data fields are in the Details section. The number of data fields can be adjusted as needed for the report.
If there are 1,000 records on your report, there are 1,000 detail sections.
Report Footer
Data, such as grand totals, is commonly placed in the Report Footer section. All items in this section print only
once on the last page of the report.
Page Footer
The Page Footer section has all items that need to print or display at the bottom of every page in the report. This
is a good place to include page numbers and information such as the company address and phone number.

Field and Report Explorer


The Field Explorer and Report Explorer are combined in a window that docks by default on the right side of the
report area. This explorer tool can be undocked to float or can be closed and opened via the Menu bar or the
Field or Report Explorer buttons in the Standard toolbar.
From the View menu, select both Field Explorer and Report Explorer to review the following components of
the sample report.
Field Explorer
Use the Field Explorer to insert, delete, or modify report fields. It is available on both the Design and Preview
sheets.
The Field Explorer displays a tree view of databases and special fields you can add to a report. It also includes
formula, parameter, and group name fields used in the report. A toolbar is available on the Field Explorer to
insert, delete, edit, and rename existing fields.
Report Explorer
The Report Explorer tree view displays report sections and lists report objects in each section.
Any item you select in the tree view is selected in the report (in either Design or Preview mode).
You can select the object in the Report Explorer to modify report fields and objects. Right-click an item to display
a menu that contains the actions you can carry out on that item. For example, if you right-click a text object, the
menu contains options to edit the text, format the text font or color, and so forth.
Note You cannot add additional fields and report objects while you use the Report Explorer, but you can
delete additional fields and report objects.

12 Epicor ERP | 9.05.702


Crystal Reports Course BAQ Report Designer

BAQ Report Designer

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.

Process Flow for the BAQ Report Designer


The following process flow chart provides a visual overview of the BAQ Report Designer process. This process is
used to begin most reports in the Epicor application.

• Create a BAQ: A BAQ is the data foundation for Crystal Reports and dashboards. Create a BAQ using the
BAQ Report Designer.

Epicor ERP | 9.05.702 13


BAQ Report Designer Crystal Reports Course

• 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.

Action Menu Features


• BAQ Report Options - Lists the local paths to use with the BAQ Report Designer.
• Test Report Form - Displays and allows you to test the interface for the current BAQ report.
• Generate Sample Data - Runs the current BAQ report to generate data.
• Design Crystal Report - Displays the current BAQ report in Crystal Reports.
• Deploy BAQ Report - Moves the current BAQ report to the network.
• Download Report - Downloads the .rpt file for the current BAQ report to your local drive.
• Copy BAQ Report - Makes a duplicate .rpt file for the current BAQ report.
• Export BAQ Report - Moves the current BAQ report to any specified location.
• Import BAQ Report - Pulls a BAQ report into the Epicor application.

BAQ Report Examples


Several standard BAQ reports are available in the Epicor application, they include the following:
• Rebate Contract Summary
• Rebate Contract Transactions
• Employee Efficiency
• Resource Group Efficiency
Note Use the BAQ Report Designer to create and customize these reports. You can link to user-defined
fields in the Report Parameters table which allows you to pass additional information to Crystal Reports,
increasing Crystal Reports efficiency when designing report layouts.

14 Epicor ERP | 9.05.702


Crystal Reports Course BAQ Report Designer

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)

Sample Data Directory C:\_BAQ Reports\Reports\SampleData


Local Reports Directory C:\_BAQ Reports\Reports\

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.

Workshop - Define BAQ Report Paths

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 Crystal Reports

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.

1. From the Actions menu, select BAQ Report Options.


The BAQ Report Options window displays.

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.

3. Remain in BAQ Report Options.

Epicor ERP | 9.05.702 15


BAQ Report Designer Crystal Reports Course

Setup BAQ Report Options

Setup the Sample Data and Local Reports directory.


The report options guide the Epicor application through the interaction with Crystal Reports. The paths defined
in this workshop represent the paths where you save the reports and sample data files.

1. In the Sample Data Directory field, click the ellipsis button (...).
The Browse For Folder window displays.

2. Search for and select the following path C:\_BAQReports\Sample Data.

3. In the Local Reports Directory field, click the ellipsis button (...).
The Browse For Folder window displays.

4. Search for and select the following path C:\_BAQReports\Reports.


If this path is not found, use Windows Explorer to create a directory with the same name.

5. Verify the Copy Report Locally check box is selected.


The .rpt file is copied to the local machine when it is created.

6. Click Apply.

7. Remain in the BAQ Report Designer for the next workshop.

16 Epicor ERP | 9.05.702


Crystal Reports Course BAQ Report Designer

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.

BAQ Report Additional Details

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

Workshop - Define Report Details

In this workshop, define the report details. These details provide the report ID and description referenced by the
Epicor application.

1. From the New menu, select New Report Definition.

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.

3. In the Description field, enter Time Entry Report.

4. In the BAQ ID field, search for and select zEmployeeEfficiency.


The BAQ ID is the name of the BAQ used as the basis for creating a new report.

Epicor ERP | 9.05.702 17


BAQ Report Designer Crystal Reports Course

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.

5. In the Form Title field, enter Time Entry Report.

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.

7. Remain in the BAQ Report Designer for the next workshop.

18 Epicor ERP | 9.05.702


Crystal Reports Course BAQ Report Designer

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.

Workshop - Add Option Fields

In this workshop, convert fields from the selected business activity query into an input field for report criteria.

Add Option Field 1

Add an input field so the start date displays in the report.


Note Any field in the BAQ is available as an option field.

1. Navigate to the Option Fields sheet.

2. From the New menu, select New Option Field.

3. In the Option Field field, select LaborDtl.ClockInDate and press Tab.


The Field Label, Compare Operator, and Data Type fields populate.

4. Enter or verify the following information:

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.

Epicor ERP | 9.05.702 19


BAQ Report Designer Crystal Reports Course

Add Option Field 2

1. From the New menu, select New Option Field.

2. In the Option Field field, select LaborDtl.ClockInDate and press Tab.


The Field Label, Compare Operator, and Data Type fields populate.

3. Enter or verify the following information:

Field Data
FieldLabel Enter End Date
Compare Operator <= (less than or equal)
Data Type date
Order 2

4. Click Save.

5. Remain in the BAQ Report Designer for the next workshop.

20 Epicor ERP | 9.05.702


Crystal Reports Course BAQ Report Designer

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.

Workshop - Define 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

1. Navigate to the Filters sheet.

2. From the New menu, select New Filter.

3. In the Filter field, select LaborDtl.JCDept and press Tab.


The Filter Label and Tab Label fields populate.

4. Accept the defaults and click Save.

Add Filter 2

1. From the New menu, select New Filter to add another filter.

2. In the Filter field, select LaborDtl.ResourceID and press Tab.


The Filter Label and Tab Label fields populate.

3. Accept the defaults and click Save.

4. Remain in the BAQ Report Designer for the next workshop.

Epicor ERP | 9.05.702 21


BAQ Report Designer Crystal Reports Course

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.

Workshop - Label Sorts

In this workshop, define sort orders to use in the BAQ report.

Add Sort Option 1

1. Navigate to the Sorts sheet.

2. From the New menu, select New Sort.

3. In the Sort Options section, in the Name field, enter Resource\Department.

4. Select the Resource\Department line.

5. In the Sort Fields section, click the New button.

6. In the Sort Fields grid, enter or select the following information:

Field Data
Sort Field LaborDtl.ResourceID
Order 10

7. Verify the Ascending check box is selected.

8. Click Save.

22 Epicor ERP | 9.05.702


Crystal Reports Course BAQ Report Designer

Add Sort Option 2

1. In the Sort Options section, verify the Resource\Department line is selected.

2. In the Sort Fields section, click the New button.

3. In the Sort Fields grid, enter or select the following information:

Field Data
Sort Field LaborDtl.JCDept
Order 20

4. Verify the Ascending check box is selected.

5. Click Save.

6. Remain in the BAQ Report Designer for the next workshop.

Epicor ERP | 9.05.702 23


BAQ Report Designer Crystal Reports Course

The BAQ Report Designer Actions Menu

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.

Test Report Form

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.

Creating an .xml Datasource

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.

Workshop - Test the BAQ Report

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.

1. From the Actions menu, select Test Report Form.


The Time Entry Report window displays.

2. Navigate to the Filter sheet.


The Dept and Resource ID sheets display as the filters.

3. Navigate to the Selection sheet.


The Selection sheet options are determined by the settings created in earlier workshops.
The Report Options pane displays the option fields. The Filter Summary pane displays the filters.

4. In the Enter Start Date field, enter the date one year before today.

24 Epicor ERP | 9.05.702


Crystal Reports Course BAQ Report Designer

5. In the Enter End Date field, verify today's date defaults.

6. Click Print Preview.


Once the Time Entry BAQ report displays, the Epicor application creates a new datasource .xml file. This file
can be used if the report requires the full data rather than the sample data created in the next workshop.
Note The .xml file is created in the Reports\<username> folder located in the server file directory.

7. Close the BAQ report and the Time Entry Report window.

8. Remain in the BAQ Report Designer for the next workshop.

Epicor ERP | 9.05.702 25


BAQ Report Designer Crystal Reports Course

Generate Sample Data

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.

Workshop - Generate Sample Data

In this workshop, generate sample data to use when designing the layout in Crystal Reports.

Create a Sample Data File

1. From the Actions menu, select Generate Sample Data.


The interface between the Epicor application and Crystal Reports requires that a background temporary
.xml file is created. Once created, it becomes the datasource for the Crystal Report. The Generate Sample
Data function creates the xml file.
When the data is generated, the Sample Data window displays.

2. In the Sample Data window, note the path and the name of the data .xml file
________________________________.

3. Click OK to confirm the sample data is created successfully.


The BAQ executes and the data is generated into the .xml file available to Crystal Reports. It is recommended
to check the number of records pulled in by the initial execution of the BAQ. The data displays once the
report is deployed.

4. Minimize the BAQ Report Designer.

Review the Sample Data File

Use Windows Internet Explorer to review the xml sample data file created in the previous workshop.

1. Navigate to the C:\_BAQReports\Sample Data folder.


Note Your location may be diferent on your computer. It is based on the path noted in the Sample
Data Directory field in the BAQ Report Options window.

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.

3. Review the report structure.

26 Epicor ERP | 9.05.702


Crystal Reports Course BAQ Report Designer

The report details are grouped into the following sections:


• RptLables - For the report labels
• BAQReportParameter - For the report parameters
• Company - For the current company details
• BAQReportResult - For the report results
• Additional information to construct the report

4. Exit Windows Internet Explorer.

Epicor ERP | 9.05.702 27


BAQ Report Designer Crystal Reports Course

Design Crystal Report

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.

Workshop - Set Up the Crystal Report

In this workshop, set up the Crystal Reports functionality to format the Time Entry report.

Set Datasource Location

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.

1. Maximize the BAQ Report Designer.

2. From the Actions menu, select Design Crystal Report.


Crystal Reports displays with a report template ready.

3. From the Database menu, select Set Datasource Location.


The Set Datasource Location window displays.

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.

6. In the ADO.Net (XML) window, click Finish.


In the Set Datasource Location window, the Current Data Source section summarizes the report details.

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.

28 Epicor ERP | 9.05.702


Crystal Reports Course BAQ Report Designer

9. Click Update.

10. Click Close.


The connection to the new datasource is made; however, not all tables are included in the dataset.

Set Up Available Datasources

Add the BAQReportResult table to the report.

1. From the Database menu, select Database Expert.


The Database Expert window displays.

2. From the Available Data Sources pane, expand the Create New Connection > ADO.Net (XML) >
ReportDataSet node.

3. From the ReportDataSet node, select the BAQReportResult table.

4. Click the right arrow (>) to add the table to the Selected Tables pane.

5. Navigate to the Links sheet.

6. In the Links sheet, double-click the line between the Company table and the BAQReportParameter table.
The Link Options window displays.

7. In the Join Type pane, select Left Outer Join.


The left outer join is needed because all BAQReportParameter fields are used regardless of matches found
from the other tables.

8. Click OK.

9. In the Database Expert window, click OK.

10. Click Save.

11. When asked to overwrite the report with the latest report format, click Yes.

Epicor ERP | 9.05.702 29


BAQ Report Designer Crystal Reports Course

Add Report Fields

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.

1. From the View menu, select Field Explorer.


The Field Explorer pane displays.

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

Add a report grouping criterion to group the report by Job Cost Department.

1. From the Report menu, select Group Expert.


The Group Expert window displays.

2. In the Available Fields pane, select BAQReportResult > JCDept.Description.

3. Click the right arrow (>) to move the selected field to the Group By section.

4. Click OK to create the group.


Two new sections called Group Header #1 and Group Footer #1 are added to the sections of the report.

5. Click Save.

Create Report Summaries

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.

2. Accept the default values and click OK.


By default, the grand total summary is added to the Report Footer section.

30 Epicor ERP | 9.05.702


Crystal Reports Course BAQ Report Designer

3. Repeat steps 1 and 2 to add summaries to the LabHrsDirect and BurDirectHrs fields.

4. Click Save.

5. Click Print Preview.


The Preview sheet displays.

6. Review the report.

7. If necessary, navigate to the Design sheet, make adjustments and preview the report again.

8. Exit Crystal Reports.

9. Remain in the BAQ Report Designer for the next workshop.

Epicor ERP | 9.05.702 31


BAQ Report Designer Crystal Reports Course

Deploy the BAQ Report

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.

Workshop - Deploy the BAQ Report

This workshop demonstrates how to use the Deploy BAQ Report functionality.

1. From the Actions menu, select Deploy BAQ Report.


The .rpt file is placed on your reports\Custom Reports folder in your server reports directory. To make this
BAQ report available to other users within your company, place it on the Epicor Main menu.

2. In the Save As message, click Yes to confirm you want to replace existing report.

3. Note the path where the report is copied ___________________________________.

4. In the File Copied window, click OK.

5. Exit the BAQ Report Designer.

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.

Copy BAQ Report

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.

Export BAQ Report

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.

32 Epicor ERP | 9.05.702


Crystal Reports Course BAQ Report Designer

Import BAQ Report

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.

Epicor ERP | 9.05.702 33


Database Concepts Crystal Reports Course

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

Identify Table and Field Names

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.

34 Epicor ERP | 9.05.702


Crystal Reports Course Database Concepts

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.

2. Where do I enter part information on parts? - Part Maintenance.

3. What is a part bin? - A place in a warehouse that holds parts.

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.

Epicor ERP | 9.05.702 35


Database Concepts Crystal Reports Course

Field Help Technical Details

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.

Workshop - Use the Field Help

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

1. From the Help menu, select Field Help.


In the tree view pane, the Field Help sheet displays. It automatically opens in an undocked position.

2. Place the cursor in the Field Help sheet header and click the push pin icon to dock the Field Help window.

3. Place the cursor in the Description field.

4. In the Field Help sheet, click Technical Details.


You can adjust the Field Help width to see the fields properly.

36 Epicor ERP | 9.05.702


Crystal Reports Course Database Concepts

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>.

6. Record the table and field _____________________.


Note Data is often stored in multiple places, and table selection depends on the purpose of the query.
This example presents a part's listing with a part bin location.

7. Navigate to the Part > Plants > Warehouses > Bin Information > Detail sheet and place the cursor in
the Bin field.
Record the table and field ________________________.

8. Exit Part Maintenance.

Epicor ERP | 9.05.702 37


Database Concepts Crystal Reports Course

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.

Workshop - Reference Customization Tools

In this workshop, reference the Customization Tools.

Activate Developer Mode


Developer mode is not available unless the user has customization permission. With this permission, you can
modify any sheet or window. Grant these privileges with caution.
Navigate to User Account Maintenance.
Menu Path: System Management > Company Maintenance > User

1. In the User ID field, search for and select System Manager (MANAGER).

2. Navigate to the Options sheet.

3. Verify the Customize Privileges check box is selected.

4. Click Save and exit User Account Maintenance.

5. From the Main menu, select Options > Developer Mode.


In the Standard toolbar, notice the Developer Mode icon has an orange background when Developer
mode is active.

Identify Table and Field Names


Navigate to Customer Shipment Entry.
Menu Path: Material Management > Shipping / Receiving > General Operations > Customer Shipment Entry

1. In the Select Customization window, click OK to accept the defaults and open the program.

2. Navigate to the Header > Detail sheet.

3. From the Tools menu, select Customization.


The Customization Tools Dialog window displays.

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.

38 Epicor ERP | 9.05.702


Crystal Reports Course Database Concepts

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.

7. Review the same information for the Pack ID field.

8. Close the Customization Tools Dialog window, and do not save changes.

9. Close the Customer Shipment Entry window.

Deactivate Developer Mode

1. From the Main menu, select Options > Developer Mode.

2. Notice the Developer Mode icon no longer has an orange background.

Epicor ERP | 9.05.702 39


Database Concepts Crystal Reports Course

Data Dictionary Viewer

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

40 Epicor ERP | 9.05.702


Crystal Reports Course Database Concepts

Workshop - Use the 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

1. In the Table field, enter OrderHed and press Tab.


Information populates in the Tables sheet, the Fields sheet, and the tree view.

2. In the Description field, review the table description.

3. In the Indexes grid, view the IndexFields column.

4. In the Display Format pane, select Alphabetic.


This option sorts fields alphabetically.

5. Navigate to the Fields > Detail sheet.

6. In the Field Name field, select DiscountPercent.

7. Review the information and click Clear.

8. Exit the Data Dictionary Viewer.

Epicor ERP | 9.05.702 41


Database Concepts Crystal Reports Course

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.

Table Link Requirements


Table link requirements involve linking from one table to another. The from table is the primary table, while the
to table is the lookup table where records are looked up by the primary table. For example, if the Quote is the
primary table, the querying or reporting tool chronologically goes field by field through the Quote table and
searches for matching records in the second table, which can be customers, until all fields are evaluated.

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.

42 Epicor ERP | 9.05.702


Crystal Reports Course Database Concepts

Dataset Relationships Tracker

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.

Dataset Relationships Grid


To display the data for all records that link to this tracker, click the Refresh All button. The tracker retrieves all
linked records, starting with the first record, and displays the datasets in the Dataset Relationships Grid.

Workshop - Display the Dataset Relationships Tracker

This workshop demonstrates how to use the Dataset Relationships Tracker.


Navigate to Dataset Relationships.
Menu Path: System Management > Dataset Relationships

1. Navigate to the Dataset Relationships sheet.

2. On the Standard toolbar, click Clear.

3. In the Parent Data Table field, enter OrderDtl.

4. In the Child Data Table field, enter OrderRel.

5. Click Refresh to populate the Dataset ID field and Dataset Relationships.


Note When you select the Refresh button, all related tables populate in the Dataset Relationships
pane.

6. In the Dataset Relationships pane, view the relationship between the OrderDtl and OrderRel tables.
Record the join fields _______________________________________.

7. Exit Dataset Relationships.


If an Advanced Search does not return a dataset, the tables do not directly relate. This does not mean you
cannot join them. Use the Data Dictionary Viewer to determine probable join fields.

Epicor ERP | 9.05.702 43


Database Concepts Crystal Reports Course

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.

Left Outer Joins


The data output from a left outer join includes all the records in which the linked field value in both tables is an
exact match. It also includes a row for every record in the primary, or left, table in which the linked field value
has no match in the lookup table. When there is no exact match, Crystal Reports or the query fills in the record
fields with empty values. The following diagram shows this relationship:

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.

Right Outer Joins


Right outer joins are not supported by the Epicor application, but you will see this join as an inactive option in
Crystal Reports. A right outer join works in exactly the same way as a left outer join, but in reverse. The report
output from a right outer join includes all the records in which the linked field value in both tables is an exact
match. It also includes a row for every record in the lookup, or right, table in which the linked field value has no
match in the primary table. The following diagram shows this relationship:

44 Epicor ERP | 9.05.702


Crystal Reports Course Database Concepts

Again, this join is not available for either queries or custom Crystal reports. However, other applications you use
may support this join type.

Epicor ERP | 9.05.702 45


Custom Report Design Tools Crystal Reports Course

Custom Report Design Tools

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.

Workshop - Create a Parts List Business Activity Query


In this workshop, create a business activity query (BAQ) to retrieve a part listing with a specific part bin and
warehouse location. This workshop introduces elements such as manual field insertion, multiple groups, subtotals,
and grand totals.
Navigate to the Business Activity Query Designer.
Menu Path: System Management > Utilities > Business Activity Query
Important This program is not available
®
in the Epicor Web Access™ interface. You can launch this program
from an Epicor Smart Client (Windows ) interface.

1. Click New to create a new query.

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.

4. Select the Shared check box.


The Shared check box indicates this query is available to all users. Use the Global check box in multi-company
situations to indicate you can share this query between all companies.

5. Navigate to the Phrase Build sheet and maximize the window.

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.

46 Epicor ERP | 9.05.702


Crystal Reports Course Custom Report Design Tools

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.

15. Populate the Parent/Child relationships as follows:

Parent Table-Part Bin Child Table-Warehse


Company Company
WarehouseCode WarehouseCode

16. Click Save.

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.

Select and Sort Columns

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.

1. Navigate to the Display sheet to view the available columns.

2. Expand the Part table to display the fields.


Fields display in the schema order unless you select the Sort columns alphabetically button to alphabetize
the field listing.

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:

Table Name Field Name


Part PartNum
Company
PartDescription
PartHeight
PartLength
PartWidth

Epicor ERP | 9.05.702 47


Custom Report Design Tools Crystal Reports Course

Table Name Field Name


MfgComment
TypeCode
Part Bin BinNum
Company
OnHandQty
WarehouseCode
Warehse Company
Description
WarehouseCode

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.

8. Navigate to the Analyze sheet and click the Analyze button.


In the Query Execution Messages pane, Syntax is OK displays.

9. Click the Test button to execute and display the query results.

10. Click Save.

11. Exit the BAQ Report Designer.

48 Epicor ERP | 9.05.702


Crystal Reports Course Custom Report Design Tools

Workshop - Define Manufactured Parts Report

This workshop shows how to define BAQ Report Definitions for the new report.

Verify Report Option Paths


Navigate to 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.

1. From the Actions menu, select BAQ Report Options.

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

3. Verify the Copy Report Locally check box is selected.

4. Click Apply.

Enter the BAQ Report Header

1. From the New menu, select New Report Definition.

2. In the Report ID field, enter XXX_MfgParts (where XXX are your initials).
This automatically populates the Crystal Report field.

3. In the Description field, enter Manufacturing Parts Listing.

4. In the BAQ ID field, enter or browse for the EPIC06-XXXPartsList query (where XXX are your initials).

5. In the Form Title field, enter Manufacturing Parts Listing.

Test the Report Form

1. From the Actions menu, select Test Report Form.


This opens the standard report parameter selection options as determined by settings created in the above
steps. This function actually generates an .xml file that is used later on as the datasource within Crystal
Reports.

2. From the Standard toolbar, click Print Preview.


The BAQ Report window displays.

Epicor ERP | 9.05.702 49


Custom Report Design Tools Crystal Reports Course

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.

3. Close the report form and exit the report.

(Optional) Generate Sample Data

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.

1. From the Actions menu, select Generate Sample Data.


The interface between the Epicor application and Crystal Reports requires that a background temporary
.xml file be created. Once created, it becomes datasource for the Crystal report. The Generate Sample
Data function creates that xml file. The full record count does not display when you first preview the report
in Crystal Reports. This datasource is then used in Crystal Reports to pull tables and fields for the report.
After data generates, a Sample data was successfully created dialog box displays.

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.

Design a Crystal Report

1. From the Actions menu, select Design Crystal Report.


Crystal Reports displays.

2. From the Database menu, select Set Datasource Location.

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.

50 Epicor ERP | 9.05.702


Crystal Reports Course Custom Report Design Tools

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.

7. In the Current Data Source section, select the ReportDataSet node.

8. In the Replace with section, select the ReportDataSet node.

9. Click Update.

10. In the Set Datasource Location window, click Close.

Add a Report Table

Add the BAQReportResult table to the report tables.


We just connected the datasource to the Crystal Report. The datasource becomes a mini-database of information
and includes three tables: Company, BAQParameters, and BAQReportResult. Specific business activity query
tables (such as Part, Part Bin, and Warehouse) do not display but are incorporated into the BAQReportResult
table.
Crystal Reports reads the datasource and then provides access to the tables and fields inside the datasource for
additional functionality in the report. Every table and field is fair game for use in sorting, formulas and functions,
and other functions such as parameters directly inside Crystal Reports. Following is a brief explanation of the
purpose of each of the three tables:
• Company Table - This table is the highest level in the application database hierarchy. The Company table
includes the Company field, the Company Name, and the language used in the business activity query (BAQ).
Fields from this table are rarely used in Crystal reports, but they are imperative to the foundation of the BAQ
table joins.
• BAQReportParameter Table - This table populates with the Options, Sorts, and Filters defined in the BAQ
Report Designer. For example, there are five fields in this database that actually populate with the filter data
(filter1 through filter5) and are therefore available to use in Crystal Reports for formulas, parameters, and so
on. Also, like all Epicor tables, this table includes many user defined fields.
• BAQReportResult Table - This table populates with the results of the BAQ itself once it is executed. Crystal
Reports reads this table and all fields then display using the table syntax, for example, Part.PartNum;
PartBin.BinNum.
Once the datasource is connected, only the Company and the BAQParameter tables are included in the available
tables. Use the Database Expert to bring in the BAQReportResults table.

1. From the Database menu, select Database Expert.


The Database Expert window displays.

2. Verify the Data sheet displays.

3. In the Available Data Sources pane, navigate to the Create New Connection > ADO.Net (XML) >
ReportDataSet node.

4. From the ReportDataSet node, select the BAQReportResult table.

5. Click the right arrow to move the selected item to the Selected Tables pane.

6. Navigate to the Links sheet to enter link information.

Epicor ERP | 9.05.702 51


Custom Report Design Tools Crystal Reports Course

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.

52 Epicor ERP | 9.05.702


Crystal Reports Course Custom Report Design Tools

Workshop - Create a Manufactured Parts Listing 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.

Insert and Resize Fields


Use the Design sheet to insert and resize fields, column headers, and other objects. When Crystal Reports opens
after the datasource is connected, several fields display in the Page Header section, but they are not necessary
for this report.

1. From the View menu, select Field Explorer.

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:

1. Select the field name and click the Insert button.

2. Place your cursor at the desired location.

3. Click the field to position it in the Details section.

The second way is:

1. Select the field name.

2. Drag the field name to the Design area and drop it in the Details
section.

5. Click Print Preview to view the field.


The linked datasource is the .xml file from the c:\Program
Files\Epicor\EpicorData905\Reports\<username> directory and it displays the entire dataset. This location
may be different in your system.

Epicor ERP | 9.05.702 53


Custom Report Design Tools Crystal Reports Course

Important If working in a shared database, the .xml file is located in the Reports folder in your
server file directory.

6. Navigate to the Design sheet to resize fields.

7. Decrease the BinNum column header and field width.

8. Increase the PartBin.OnHandQty column header and field width.

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.

Establish Groups for a Report


The report is sorted by part number and quantity on-hand, but a preview of the report shows that all the numbers
run together on each page. Further, you cannot easily determine how many of each part number is on hand. In
other words, the report is a sorted listing of database records. There is no useful information for the reader up
to this point.
Creating groups based on the warehouse and part number fields automatically creates a separate grouping of
records for each part number with a heading for each group and a space between the groups. This makes the
report easier to read. In addition, once the report has one or more groups inserted, you can add summaries to
generate useful information.

1. From the Insert menu, select Group.


The Insert Group window displays.

54 Epicor ERP | 9.05.702


Crystal Reports Course Custom Report Design Tools

2. In the grouped by field, select the BAQReportResult > Warehse.Description field.


This field is toward the bottom of the list under the BAQReportResult section. When you print the report,
the records are sorted and grouped by this selection.

3. Navigate to the Options sheet.

4. Select the Customize Group Name Field check box.

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.

7. Click OK to return to the Design window.

8. Repeat this process for the BAQReportResult.Part.PartNum field.

9. Click Save.

Modify the Group Header Preview

A group header automatically generates for each grouping you create.

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.

3. Within the group tree, click a warehouse or a part number.

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.

Insert a Summary for a Numeric Field

1. Navigate to the Design sheet.

2. In the Details section, right-click the PartBin.OnhandQty field.

3. Select Insert > Summary.


The Insert Summary window displays.

4. In the Choose the field to summarize field, verify BAQReportResult.PartBin.OnHandQty displays.

5. In the Calculate this summary field, verify Sum displays.

Epicor ERP | 9.05.702 55


Custom Report Design Tools Crystal Reports Course

6. Select the Add to all group levels check box.

7. Click OK to insert the summaries into the report.

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.

Insert a Summary for a Text Field


The subtotals inserted so far are a special type of summary. You can summarize any field in various ways based
on the field type. In this section of the workshop, summarize the Part.PartNum field with a distinct count.

1. Navigate to the Design sheet.

2. In the Details section, right-click the Part.PartNum field and select Insert > Summary.
The Insert Summary window displays.

3. In the Choose the field to summarize field, verify BAQReportResult.Part.PartNum displays.

4. In the Calculate this summary field, select Distinct count.

5. Select the Add to all group levels check box.

6. Click OK to insert the summaries into the report.

7. Click Save.

56 Epicor ERP | 9.05.702


Crystal Reports Course Presentation Quality Custom Reports

Presentation Quality Custom Reports

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.

Workshop - Add Presentation Quality Formatting to Custom Reports

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.

Review the Report Subtotals

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.

2. Click Print Preview to view the report.


The Preview sheet displays.

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.

Format the Subtotal Borders

Format the subtotals with borders to increase visibility.

1. Select one of the GF2 (Part.PartNum) sections.

2. From the Format menu, select Format Field.


The Format Editor window displays. You can also right-click a bolded subtotal to format it.

3. Navigate to the Border sheet.

Epicor ERP | 9.05.702 57


Presentation Quality Custom Reports Crystal Reports Course

4. In the Line style section, in the Top and Bottom fields, select Single.

5. Select the Tight Horizontal check box.

6. Click OK to return to the Preview sheet.

7. Repeat steps 1 through 6 for a bolded description in the D (Part.Description) section.

8. On the last page, in the RF (Report Footer) section, select the bolded grand total to format the third
subtotal.

9. From the Format menu, select Format Field.


The Format Editor window displays.

10. Navigate to the Border sheet.

11. In the Line style pane, in the Bottom field, select Double.

12. Select the Tight Horizontal check box.

13. Click OK to return to the Preview sheet.

14. Click Save and preview the report.

(Optional) Copy the Field Format

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.

1. Click on a GF2 distinct count subtotal from the PartBin.OnHandQty column.

2. On the Standard toolbar, click the Format Painter icon.


The cursor looks like a paint brush when it hovers over the field to be format painted.

3. Click the GF1 distinct count subtotal field to apply the new format.
You cannot apply formatting to read only objects and fields.

Insert Text Objects


Add text objects in the Design window. You can select Text Object from the Insert menu to insert them.
There are many ways to use text objects in a report. Some examples include, but are not limited to, the following:
the report title, comments, special column headings, report selection formulas, and the print date and time.

1. Navigate to the Design sheet.

2. In the Report Header section, drag the bottom boundary down to make room for the new text object.

3. From the Insert menu, select Text Object.


You can also select the ab button from the Insert toolbar to insert a text object.

58 Epicor ERP | 9.05.702


Crystal Reports Course Presentation Quality Custom Reports

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).

6. Click outside the text box to lock in the text.

Format the Report Title

1. Right-click the title text object and select Format Text.


The Format Editor window displays.

2. Navigate to the Paragraph sheet to set up paragraph details.

3. In the Alignment field, select Centered to center the title in the text object field.

4. Navigate to the Border sheet.

5. In the Left, Right, Top, and Bottom fields, select Single.

6. Select the Drop Shadow check box.

7. In the Border field, select any border color.

8. Select the Background check box and any background color.

9. Navigate to the Font sheet.

10. In the Style field, select Bold.

11. In the Size field, select 12.

12. Click OK to complete the text object formatting.

Resize Text Objects

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.

1. Click the text object field and press Shift.

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.

Epicor ERP | 9.05.702 59


Presentation Quality Custom Reports Crystal Reports Course

Insert Group Footer Text Objects


The Group Footer sections require information in order to properly identify the summaries and subtotals added
previously.

1. Navigate to the Design sheet.

2. In the Group Footer #1 section, below the Mfg Comment field, add a text object.

3. In the text object field, enter Warehouse Totals:.

4. In the Group Footer #2 section, below the Mfg Comment field, add a text object.

5. In the text object field, enter Part Totals:.

6. In the Report Footer section, below the Mfg Comment field, add a text object.

7. In the text object field, enter Grand Total:.

Rename Column Headers


Column headers are also text objects; you can edit them on the Design sheet as if they were inserted as text
objects in the report.

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.

2. In the PartNum field, change the header title to Part Number.

3. Click outside the object to lock in the text.

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

Format Column Headers

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.

1. Place the cursor above the Part Number column header.

60 Epicor ERP | 9.05.702


Crystal Reports Course Presentation Quality Custom Reports

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.

6. Navigate to the Font sheet.

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.

Insert Special Fields


Insert fields from the Special Fields list in the Field Explorer pane.

1. From the File menu, select Summary Info.


The Document Properties window displays.

2. In the Title field, enter XXX Parts On-Hand - Custom (where XXX are your initials).

3. In the Comments field, enter Manufactured parts with on-hand quantity.

4. Click OK.

5. Navigate to the Design sheet.

6. Expand the bottom boundary of the Report Header section.

7. In the Field Explorer pane, expand the Special Fields list.


Only insert the Total Page Count or Page N of M fields when the design is complete. Page on Demand,
which Crystal Reports uses to present Page 1, is disabled when these are added. This causes Crystal Reports
to rerun the entire report to recalculate the total page count every time any modification is made to the
design, slowing the report preview process dramatically.

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.

Epicor ERP | 9.05.702 61


Presentation Quality Custom Reports Crystal Reports Course

Resize and Format Special Fields

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.

6. If necessary, increase the width of the fields.

7. Click Save.

Perform Additional Report Formatting

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.

6. Preview the report.

Insert a Line

1. Navigate to the Design sheet.

2. In the Page Header section, drag and drop the bottom boundary to leave space to insert a line.

3. From the Insert menu, select 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.

6. Right-click the line object and select Format Line.


The Format Editor window displays.

7. In the Style field, verify Single displays and click OK

62 Epicor ERP | 9.05.702


Crystal Reports Course Presentation Quality Custom Reports

Dashed or dotted lines do not allow width modification, but the single line allows both width and color
modification.

8. Click Save and preview the report.

Add Boxes

1. Navigate to the Design sheet.

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.

5. From the Insert menu, select Box.

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.

8. Right-click the selected box and select Format Box.


The Format Editor window displays.

9. In the Style field, verify Single defaults.

10. Click OK.

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.

13. Click Save and preview the report.

Insert a Company Logo

Insert a company logo into the Page Header section.

1. Navigate to the Design sheet.

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.

3. From the Insert menu, select Picture.

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.

Epicor ERP | 9.05.702 63


Presentation Quality Custom Reports Crystal Reports Course

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.

6. Click Save and preview the report.

7. Exit Crystal Reports.

8. Return to the BAQ Report Designer.

64 Epicor ERP | 9.05.702


Crystal Reports Course Presentation Quality Custom Reports

Workshop - Define Options for a Manufactured Parts Listing

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.

1. From the New menu, select New Option Field.


The Options Field sheet displays.

2. In the Option Field column, select Part.TypeCode and press Tab.

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.

4. In the Compare Operator field, verify the = (equal sign) defaults.

5. In the Option Field field, enter M.

6. In the Order field, enter 1.

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.

1. From the New menu, select New Filter.


The Filters sheet displays.

2. In the Filter column, select Part.PartNum and press Tab.

3. In the Filter Label field, accept the default Part.


The filter label does not have to match the field name from the table.

4. Repeat steps 1 through 3 to enter a second filter for Warehse.WarehouseCode.

Epicor ERP | 9.05.702 65


Presentation Quality Custom Reports Crystal Reports Course

5. Click Save.

Add a Sort

1. From the New menu, select New Sort.


The Sort sheet displays.

2. In the Sort Options section, in the Name field, enter Part Number\On Hand Quantity.

3. In the Sort Fields section, click New.


Verify the Part Number\On Hand Quantity sort line remains selected.

4. In the Sort Field field, select the Part.PartNum field.

5. In the Order field, enter 10 to make this the primary sort.

6. Verify the Ascending check box is selected.

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.

8. In the Sort Field field, select the PartBin.OnHandQty field.

9. In the Order field, enter 20.

10. Clear the Ascending check box.


This is a quantity field, and you want the highest Part Bin On Hand Quantity first.

11. Click Save.

Test the Report


Use the Test Report Form feature to view the basic report with no data. At the time the preview displays, a
sample file is generated which can be used as a datasource.

1. From the Actions menu, select Test Report Form.


The Manufacturing Parts Listing window displays.

2. From the File menu, select Print Preview.


The BAQ Report window displays.

3. Close the report and the Booked Orders Report window.

4. Minimize BAQ Report Designer.

Use the Deploy Report feature when the report is ready for access by all team members.

66 Epicor ERP | 9.05.702


Crystal Reports Course Presentation Quality Custom Reports

Add the Report to the Main Menu


Reports are made available to all users by adding the report to a menu item.
You must determine menu placement and security before you add a report to the Main menu. The System
Administrator can help determine the security group. You can also look at the security group for an existing
report of similar content in Menu Maintenance to determine the appropriate group.
Navigate to Menu Maintenance.
Menu Path: System Management > Utilities > Menu Maintenance
Important This program is not available
®
in the Epicor Web Access™ interface. You can launch this program
from an Epicor Smart Client (Windows ) interface.

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.

2. From the New menu, select New Menu.

3. Enter the following information:

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.

Order Sequence 170


Order sequences are numbered by 10s. In this menu, 170 places the custom
report as the last item on the menu list.

Program Type BAQ Report


Select this from the selection list.

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.

Report XXX_MfgParts (where XXX are your initials)


Click the Report button to browse for your report.

4. Click Save.

Epicor ERP | 9.05.702 67


Presentation Quality Custom Reports Crystal Reports Course

Any menu listing change requires a refresh of the database. You can use the Log on as Another User
feature to do this.

5. Exit Menu Maintenance and return to the Main menu.

6. From the Main menu, select Options.

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.

9. Close the Manufacturing Parts Listing window.

68 Epicor ERP | 9.05.702


Crystal Reports Course Direct Labor Reports

Direct Labor Reports

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.

Additional rules include:


• Upper and lower case letters are optional for functions and color names, but when you enter text or literal
strings in your formulas, enter the exact upper and lower case letters.
• Spaces before and after operators such as + and * are optional. If you click an operator in the Formula Editor,
Crystal Reports inserts spaces before and after the operator for readability.
• If you use Crystal Reports XI Enterprise, you can use the Crystal Enterprise Repository to centrally store Crystal
Reports formulas outside the scope of this course. Otherwise, you can copy and paste into a text file to share
formulas. The table and field names must be the same in the two reports for the formula to work in the report
that contains copied data.
The term calculated field is not limited to arithmetic. You can use the Formula Editor to create a field that is not
in the database or can be used in lieu of a database field.
An example is a listing of sort fields or parameter options. For instance, use the Join ( ) command to view a date
field, or response and display the data entered in a listing. Crystal Reports offers many functions of this nature
you can use to create new fields.

Epicor ERP | 9.05.702 69


Direct Labor Reports Crystal Reports Course

Workshop - Define the Direct Labor Report

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.

1. From the New menu, select New Report Definition.

2. In the Report ID field, enter XXX_DirectLbr (where XXX are your initials).

3. In the Description field, enter Direct Labor Report.

4. In the BAQ ID field, search for and select EPIC06-DirectLbr.

5. In the Form Title field, enter Direct Labor Report.

6. Click Save.

Test the Report


The Test Report Form function provides a way to view a report. You must deploy all reports to finalize them and
add them to the Main menu.
You can deploy reports any time once the report is complete. Deployment makes the report available in the
Epicor server for you to attach it to the Main menu.

1. From the Actions menu, select Test Report Form.


The Direct Labor Report window displays.

2. From the File menu, select Print Preview.


The report preview is blank since you did not enter any information.

3. Close the report preview and the Direct Labor Report window.

70 Epicor ERP | 9.05.702


Crystal Reports Course Direct Labor Reports

Workshop - Prepare for Crystal Formatting

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.

Select the Datasource

1. From the Actions menu, select Design Crystal Report.


Crystal Reports displays.

2. From the Database menu, select Set Datasource Location.


The Set Datasource Location window displays.

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.

7. In the Current Data Source section, select the ReportDataSet node.

8. In the Replace with section, expand the ADO.Net (xml) folder and select the ReportDataSet node.

9. Click Update to synchronize to the same .xml datasource.

10. Click Close to accept datasource changes.

Epicor ERP | 9.05.702 71


Direct Labor Reports Crystal Reports Course

Add the BAQReportResult Table

1. From the Database menu, select the Database Expert.


The Database Expert window displays.

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

1. Navigate to the Links sheet.

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.

4. In the Database Expert window, click OK to exit.


You are now ready to use Crystal Reports to format the report.

5. Click Save.

6. Remain in Crystal Reports for the next workshop.

72 Epicor ERP | 9.05.702


Crystal Reports Course Direct Labor Reports

Workshop - Create a Direct Labor Report

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.

Rearrange Default Fields


When a BAQ Report Designer report opens in Crystal Reports, three fields are automatically created and placed
in the Page Header section of the report - Report Title, Print Page, and Page N of M. Complete the following
steps to rearrange these fields.

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.

Add a Formula Field

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.

2. In the Name field, enter Labor Cost and click OK.


The Formula Editor displays.

3. In the Formula Editor window, in the second column, expand the ReportDataSet (ADO.NET(XML)) >
BAQReportResult table.

4. In the BAQReportResult table, double-click the LaborDtl.LaborHrs field.


In the Editor pane, the field name, {BAQReportResult.LaborDtl.LaborHrs}, properly formatted, displays.
Position the cursor in the box behind the field name.

Epicor ERP | 9.05.702 73


Direct Labor Reports Crystal Reports Course

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.

7. Click the x+ 2 check button.

8. To the message that displays, click OK.


The Formula Editor checks the syntax and provides an error message, if necessary.

9. Click Save and close.

10. Repeat the previous steps to create a new formula using the following information.
• Name - Burden Cost
• Formula - {BAQReportResult.LaborDtl.BurdenHrs} *
{BAQReportResult.LaborDtl.BurdenRate}.

11. Click Save and Close.

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.

1. Navigate to the Design sheet.

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

4. Navigate to the Field Explorer > x+1 Formula Fields line.

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.

7. Resize and move fields as necessary


It is easier to move and resize report objects in the Design sheet. For the best results, use the guidelines.

74 Epicor ERP | 9.05.702


Crystal Reports Course Direct Labor Reports

8. Click Save.

Format the Column Headings


By default, Crystal Reports presents the entire field name as the description for column headings. You can edit
these text boxes.

1. Navigate to the Design sheet.

2. In the Page Header section, double-click the LaborDtl.PayrollDate field and change the name to Payroll
Date.

3. Repeat step 2 to change the other fields to more descriptive titles.

Insert Groups

Insert groups to make the report more readable.


Insert two groups into this report, one that groups by job costing department and the other by date.

1. From the Report menu, select Group Expert.


The Group Expert window displays.

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.

7. Repeat steps 4 through 6 for the LaborDtl.PayrollDate field.

8. In the Group Expert window, click OK to return to the Design sheet.

9. Click Save.
The report now has additional report sections identified as Group Headers and Group Footers listed for
the groupings defined.

Epicor ERP | 9.05.702 75


Direct Labor Reports Crystal Reports Course

Insert Group Summaries and Grand Totals


The report displays data grouped by payroll date and department; it is appropriate to set up subtotals and grand
totals by these groups. Subtotals and grand totals are inserted in the Group Footer and Report Footer sections.
The fields to summarize include the following: LaborHrs, Labor Cost, BurdenHrs, and Burden Cost.

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

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).

1. From the Report menu, select Select Expert.


The Select Expert window displays. In this window, define the field to select and then the selection criteria.
Formulas can also be used as selection criteria.

2. Navigate to the <New> sheet.


The Choose Field window displays.

3. From the Fields listing, select the ReportDataSet (ADO.Net (xml)) > BAQReportResults >
LaborDtl.LaborType field and click OK.

4. From the Criteria listing, select is not equal to.


The production and setup labor types are considered direct labor and the indirect labor type is not. Therefore,
it is easier to exclude the one that does not apply. Once the criteria is selected, the values in the field selected
display.

5. From the Field Values listing, select I for indirect.

6. Click OK.

7. Click Save.

76 Epicor ERP | 9.05.702


Crystal Reports Course Direct Labor Reports

Insert Text Objects

Insert text objects for the Group Footer and Report Footer sections.

1. From the Insert menu, select Text Object.

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.

6. From the Insert menu, select Text Object.

7. In the Group Footer #1 section, place a text object to the right of the formula.

8. In the Text Object field, enter Totals for: .

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.

12. In the Text Object field, enter Grand Totals: .

13. Click Save.

Insert Presentation Quality Detail


The report now has proper section labels and is properly grouped. The report must be redefined by applying
presentation quality enhancements. Possibilities include:
• Insert a Report or Page Header section.
• Add Special fields to identify report-specific properties.
• Format subtotals and grand totals with lines or borders.
• Insert a company logo.
• Use lines and boxes to enhance group sections of the report.
• Suppress data as necessary.
Select three of the items from the list to include in your report.

Epicor ERP | 9.05.702 77


Direct Labor Reports Crystal Reports Course

Save and Exit the Report

1. From the View menu, select Preview.


The Preview sheet displays.

2. Review the report information.

3. Click Save.

4. Exit Crystal Reports and return to the BAQ Report Designer.

78 Epicor ERP | 9.05.702


Crystal Reports Course Direct Labor Reports

Workshop - Define Direct Labor Report Options

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

1. From the New menu, select New Option Field.


The Option Fields sheet displays.

2. In the Option Field, select LaborDtl.PayrollDate.

3. In the Field Label field, enter Beginning Payroll Date.


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).

5. In the Order field, enter 1.

6. From the New menu, select New Option Field.

7. In the Option Field field, select LaborDtl.PayrollDate.

8. In the Field Label field, enter Ending Payroll Date.


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).

10. In the Order field, enter 2.

11. Click Save

Epicor ERP | 9.05.702 79


Direct Labor Reports Crystal Reports Course

Add a Filter

1. From the New menu, select New Filter.


The Filters sheet displays.

2. In the Filter field, select JCDept.JCDept.

3. In the Filter Label and Tab Label fields, accept the defaults.

4. Click Save.

Add a Sort

1. From the New menu, select New Sort.


The Sorts sheet displays.

2. In the Name field, enter Job Department.

3. Select the Job Department sort line.

4. In the Sort Fields section, click New.


The Job Department sort line is selected.

5. In the Sort Field field, select JCDept.Description.

6. In the Order field, enter 10.

7. Click Save.

8. Remain in the BAQ Report Designer for the next workshop.

80 Epicor ERP | 9.05.702


Crystal Reports Course BAQ Report Deployment

BAQ Report Deployment

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.

Report Style Maintenance

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.

Report Data Maintenance

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.

Epicor ERP | 9.05.702 81


BAQ Report Deployment Crystal Reports Course

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.

82 Epicor ERP | 9.05.702


Crystal Reports Course BAQ Report Deployment

Workshop - Deploy and Publish a Report

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.

Deploy the Report


The Deploy BAQ Report option makes the new report definition available to the network. It places a new copy,
including all the options defined, into the Reports\Custom Reports directory on the company server. Once you
add the report, you can add it to a menu.
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.

1. From the Actions menu, select Deploy BAQ Report.


Note the directory where the report is placed.

2. To the Save As message, click Yes to confirm you want to replace the existing report.

3. In the File Copied window, click OK to accept the deployment.

4. Exit the BAQ Report Designer.

Add the Report to a Menu


Navigate to Menu Maintenance.
Menu Path: System Management > Utilities > Menu Maintenance
Important This program is not available
®
in the Epicor Web Access™ interface. You can launch this program
from an Epicor Smart Client (Windows ) interface.

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.

2. From the New menu, select New Menu.

3. Enter the following information:

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.

Epicor ERP | 9.05.702 83


BAQ Report Deployment Crystal Reports Course

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.

Order Sequence 170


Order sequences are numbered by 10s. In this menu, 170 places the custom report
as the last item in the menu list.

Program Type BAQ Report


Select this from the field selection list.

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.

Report XXX_DirectLbr (where XXX are your initials)


Cick the Report button to search for and select your report.

4. Click Save and exit Menu Maintenance.

84 Epicor ERP | 9.05.702


Crystal Reports Course BAQ Report Deployment

Test the Report from the Menu


Any time you make a custom menu options, refresh the database. You can log out and log back in or you can
change users.
Important If you were unable to complete the Workshop - Deploy and Publish a Report - Add the
Report to a Menu, you cannot complete this workshop.

1. From the Options menu, select Change User ID.

2. In the Username and Password fields, enter manager.

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.

4. In the Beginning Payroll Date field, enter 01/01/2008.

5. In the Ending Date field, enter today's date.

6. From the File menu, select Print Preview.


The BAQ report displays.

7. Review the BAQ report information.

8. Exit the BAQ report preview and the Direct Labor report.

Epicor ERP | 9.05.702 85


Crystal Reports Forms Modification Crystal Reports Course

Crystal Reports Forms Modification

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.

Form File Location


To modify a form, use Crystal Reports to locate and open the standard form itself. Again, the application stores
these forms in a unique location. That location is X:\Epicor\Epicor905\Server\Reports where X is the location
of your server. For purposes of this course, the server location is on the C: drive.
Note You cannot modify a standard form. After you locate and open the appropriate form, save it using
a unique name. Then modify the new form.
The standard form serves as a starting point for modification and something to go back to should you need
to restart. If you modify the standard form, subsequent patches or releases can overwrite your modification(s).

Report Definition and Report Style Maintenance Programs


When the .xml tables and fields are created by printing the form or report, the application includes the most
commonly used fields and excludes less commonly used ones. These fields exist but are excluded as they are

86 Epicor ERP | 9.05.702


Crystal Reports Course Crystal Reports Forms Modification

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.

Workshop - Modify the Purchase Order Form

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.

Add a Purchase Order Form


Navigate to Crystal Reports.

1. From the File menu, select Open.


The Open window displays.

2. In the Look in field, search for and select C:\Program Files\Epicor


Software\Epicor905\server\reports\POForm.rpt.
Important If working in a shared database, use the following path:
\\<servername>\Epicor\Epicor905\server\reports\POForm.rpt.

3. From the File menu, select Save As.


The Save As window displays.

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.

6. Minimize Crystal Reports.

Epicor ERP | 9.05.702 87


Crystal Reports Forms Modification Crystal Reports Course

Add a Report Definition


Navigate to Report Data Maintenance.
Menu Path: 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.

1. In the Code field, search for and select POForm.

2. From the Actions menu, select Duplicate Report.


The Duplicate Report Definition window displays.
Since the POForm is a system report, it must be duplicated to modify the data definition.

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.

6. Navigate to the Report Table > Excluded Fields sheet.

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.

9. Click Save and exit Report Data Maintenance.

Add a Report Style


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.

1. In the Report ID field, search for and select POForm.

2. Navigate to the Styles > Style Detail sheet.

3. From the New menu, select New Report Style.

4. In the Description field, enter XXX Modified Purchase Order (where XXX are your initials).

5. In the Report Type field, select Crystal.

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).

88 Epicor ERP | 9.05.702


Crystal Reports Course Crystal Reports Forms Modification

8. Accept the remaining defaults.


Use the name you identified in the Report Location field as the report name in Crystal Reports.

9. Click Save and exit Report Maintenance.

Create the XML File


Navigate to Purchase Order Entry.
Menu Path: Material Management > Purchase Management > General Operations > Purchase Order Entry

1. In the PO Number field, enter 4055 and press Tab.

2. From the Action menu, select Print.


The Purchase Order print window displays.

3. In the Report Style field, select XXX Modified Purchase Order (where XXX are your initials).

4. From the File menu, select Print Preview.


The Purchase Order report displays.

5. Close the Purchase Order report and the Purchase Order print window.

6. Exit Purchase Order Entry.

Set the Datasource Location

1. Maximize Crystal Reports.

2. From the Database menu, select Set Datasource Location.


The Set Datasource Location window displays.

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.

5. In the File Path field, navigate to C:\Program Files\Epicor\EpicorData905\Reports\MANAGER\Purchase


OrderXXXXX.XML to locate the .xml file created in the previous section of this workshop.
The XXXXX in the file name represents a value assigned by the Epicor application.
Important If working in a shared database, navigate to the \\<server
name>\EpicorData905\Reports\<username> folder and select the purchase order .xml file based
on the date and time created.

6. Click Finish.

7. In the Replace with section, select the Create New Connection > ADO.Net (xml) > ReportDataSet
node.

8. Click Update to synchronize the report datasets.

Epicor ERP | 9.05.702 89


Crystal Reports Forms Modification Crystal Reports Course

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.

12. In the Set Datasource Location window, click Close.

13. From the Database menu, select Verify Database.


The Verify Database window displays.

14. In the message boxes regarding the database, click OK.

15. Click Print Preview to review the form modifications.

16. Click Save.


The included OpenLine field now displays in the Field Explorer pane as a database field in the PODetail
table.

Insert a Company Logo

1. Navigate to the Design sheet.

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.

3. From the Insert menu, select Picture.


In an Epicor training facility, the instructor provides the location of the logo. Any graphic format can be
added to the report.

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.

6. From the File menu, select Save As.


The Save As window displays.

7. In the File name field, enter XXX_POFormMod.rpt (where XXX are your initials) and click Save.

90 Epicor ERP | 9.05.702


Crystal Reports Course Crystal Reports Forms Modification

Suppress Closed Lines on the Modified PO Form

1. Navigate to the Design sheet.


There are multiple Group Header #2 and Group Footer #2 report sections assigned as groups by
PODetail.POLine. These are the sections that must be suppressed when you close a purchase order (PO)
line, as well as the Details section.
The Epicor application closes a PO line when all line releases are received complete or when you manually
close it. The Epicor application then applies a closed status to the release or line. In the database, the Epicor
application uses logical fields called PORel.OpenRelease and PODetail.OpenLine to indicate this status.
If a PO release is open, then OpenRelease = True. If a PO release is closed, then OpenRelease = False. If
a PO line is closed, then PODetail.OpenLine = False otherwise, PODetail.OpenLine = True if it is still
open. Although you can use the PODetail.OpenLine or PORel.OpenRelease fields to suppress the line,
use the PODetail.OpenLine field as a closed line, unless it is suppressed, so it displays a Closed status.
The Report Data Definition is the query definition for the report and holds all the tables and fields in the
standard form. This form includes the PORel.OpenRelease field which is already part of the defined tables.
Suppression can be done using this field in the formula as well.

2. From the Report menu, select Section Expert.


The Section Expert window displays.

3. In the Sections column, select Group Header #2: PODetail.POLine-A.

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.

6. In the PODetail listing, double-click the OpenLine field.

7. After the PODetail.OpenLine field, enter = false.


The formula reads as follows: {PODetail.OpenLine} = false.

8. Copy this formula.


It is used to suppress data in other sections.

9. Click Save and close.


The x+2 formula button next to the Suppress (No Drill-Down) option displays in red in the Section Expert
window. The formula just added to the Group Header #2: PODetail.POLine-A section to suppress data
also suppresses data through all the Group Header #2a – subsections.

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.

12. Click Save and exit Crystal Reports.

Epicor ERP | 9.05.702 91


Crystal Reports Forms Modification Crystal Reports Course

Establish the Modified Form as the System Default

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.

1. In the Report ID field, search for and select POForm.

2. Navigate to the Styles > Style Detail sheet.

3. From the Tree menu, select XXX POForm – Modified.

4. In the Report Type field, select Crystal.

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.

9. Click Save and exit Report Maintenance.

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.

92 Epicor ERP | 9.05.702


Crystal Reports Course Create a Booked Orders Report

Create a Booked Orders Report

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.

Workshop - Define the Booked Orders Report

In this workshop, create a Report Definition for a Booked Orders 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.

1. From the New menu, select New Report Definition.

2. In the Report ID field, enter XXX_BookedOrder (where XXX are your initials).

3. In the Description field, enter Booked Orders Report.

4. In the BAQ ID field, search for and select EPIC06-BookOrders.

5. In the Form Title field, enter Booked Orders Report.

6. Click Save.

Test the Report


Use the Test Report Form feature to view the basic report with no data. At the time the preview displays, a
sample file is generated which can be used as a datasource.

1. From the Actions menu, select Test Report Form.


The Manufacturing Parts Listing window displays.

2. From the File menu, select Print Preview.


The BAQ Report window displays.

Epicor ERP | 9.05.702 93


Create a Booked Orders Report Crystal Reports Course

3. Close the report and the Booked Orders Report window.

4. Minimize BAQ Report Designer.

Use the Deploy Report feature when the report is ready for access by all team members.

(Optional) Generate Sample Data

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.

1. From the Actions menu, select Generate Sample Data.


The interface between the Epicor application and Crystal Reports requires that a background temporary
.xml file be created. Once created, it becomes datasource for the Crystal report. The Generate Sample
Data function creates that xml file. The full record count does not display when you first preview the report
in Crystal Reports. This datasource is then used in Crystal Reports to pull tables and fields for the report.
After data generates, a Sample data was successfully created dialog box displays.

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.

94 Epicor ERP | 9.05.702


Crystal Reports Course Create a Booked Orders Report

Workshop - Prepare for Crystal Formatting

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

1. From the Actions menu, select Design Crystal Report.


Crystal Reports displays.

2. From the Database menu, select Set Datasource Location.


The Set Datasource Location window displays.

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.

6. In the Datasource File Path window, click Finish.

7. In the Current Data Source section, select the ReportDataSet node.

8. In the Replace with section, select the ADO.Net (xml) > ReportDataSet node.

9. Click Update to synchronize to the same .xml datasource.

10. Click Close to accept datasource changes.

Epicor ERP | 9.05.702 95


Create a Booked Orders Report Crystal Reports Course

Add the BAQReportResult Table

1. From the Database menu, select the Database Expert.


The Database Expert window displays.

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

1. Navigate to the Links sheet.

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.

4. In the Database Expert window, click OK to exit.


You are now ready to use Crystal Reports to format the report.

5. Click Save.

6. Remain in Crystal Reports for the next workshop.

96 Epicor ERP | 9.05.702


Crystal Reports Course Create a Booked Orders Report

Workshop - Create a Booked Orders Report

In this workshop, create a booked orders report.


Your objective is to produce a report that shows orders booked within a certain date range, summarized by
product group and customer name. Your boss decided the report must show an order book date, order and line
numbers, book type, selling quantity, customer name, part number, and product group description. You can
determine the tables to use to create and finish the report.
The final report also needs a Gross Margin field. This field does not exist in the database and must calculate and
display in the report. The gross margin is assumed to be 35%.

Delete Default Fields


By default the interchange between the BAQ Report Designer and Crystal Reports places a Report Title, Print
Date, and Page N of M fields into the Report Header section.
Navigate to Crystal Reports.

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

Add a formula to calculate gross margin.

1. In the Field Explorer pane, right-click the x+1 Formula Fields line and select New.
The Formula Name window displays.

2. In the Name field, enter Gross Margin, and click OK.


The Formula Workshop - Formula Editor window displays.

3. In the Formula Editor window, in the second column, expand the ReportDataSet (ADO.Net (xml)) >
BAQReportResult table.

4. Double-click the BookDtl.BookValue field.


The field name {BAQReportResult.BookDtl.BookValue}, properly formatted, drops into the Editor pane.

5. In the Formula Editor window, in the fourth column, expand the Operators > Arithmetic folder and
double-click Multiply.

6. After the Multiply entry, enter .35 to finish the formula.

7. Click Save and close.


The formula name now displays under the x+1 Formula Fields line in the Field Explorer pane.

8. Click Save.

Epicor ERP | 9.05.702 97


Create a Booked Orders Report Crystal Reports Course

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.

5. If necessary, resize and move the fields.

6. Click Save.

Insert Groups

Add groups for the ProdGrup.Description and Customer.Name fields to make the report easier to read.

1. Navigate to the Design sheet.

2. From the Report menu, select Group Expert.


The Group Expert window displays.

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.

7. Repeat this process for the Customer.Name field.

8. In the Group Expert window, click OK to return to the Design sheet.


The Group Header #1 and Group Header #2 sections display.

98 Epicor ERP | 9.05.702


Crystal Reports Course Create a Booked Orders Report

9. Click Save and preview the report.

Add Subtotals and a Grand Total

Add subtotals and a grand total for the BookDtl.BookValue and Gross Margin columns.

1. Navigate to the Design sheet.

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.

4. Repeat this process for the Gross Margin field.

5. Verify the columns are wide enough to display all the summary data, and increase the field width(s) if
necessary.

6. Click Save.

Add a Page Header Section

The current Page Header section is split to hold more data, as space is needed for a special field(s) and company
logo.

1. Right-click in the Page Header section and select Section Expert.


The Section Expert window displays.

2. In the Sections column, select Page Header if it is not already selected.

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.

5. Click OK to close the Section Expert.

Epicor ERP | 9.05.702 99


Create a Booked Orders Report Crystal Reports Course

Insert a Report Title

Insert a report title in Page Header a.

1. From the File menu, select Summary Info.


The Document Properties window displays.

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.

3. In the Field Explorer pane, expand the Special Fields node.

4. In the Special Fields node, select the Report Title field and drag it onto the Page Header a section.

5. Right-click the Report Title field and select Format Field.


The Format Editor window displays.

6. Navigate to the Font sheet.

7. In the Size field, select 14.

8. In the Style field, select Bold and click OK.

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.

11. Navigate to the Border sheet.

12. In the Top and Bottom fields, select Single.

13. Select the Drop Shadow check box.

14. Select the Background check box, select a background color, and click OK.

15. Click Save and preview the report.

100 Epicor ERP | 9.05.702


Crystal Reports Course Create a Booked Orders Report

Format Column Headers

1. Navigate to the Design sheet.

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.

Edit Column Header Field Names

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.

3. Align the bottoms of the column headers.

4. Select all the column header fields.

5. Right-click one of the column headers fields and select Align > Bottoms.

6. Click Save.

Epicor ERP | 9.05.702 101


Create a Booked Orders Report Crystal Reports Course

Insert a Line

Insert a solid line below the column headers and change the column width and color.

1. From the Insert menu, select Line.


The cursor becomes a pencil.

2. Draw a line below all the column headers.

3. Right-click the line and select Format Line.


The Format Editor window displays.

4. In the Style field, select Single.

5. In the Width field, select any hairline size.

6. In the Color field, select any color.

7. Click OK.

8. Click Save.

Insert a Company Logo


Use any graphic file for the following exercise.
Note The steps that follow are specific to an Epicor training facility environment. If not in a training facility,
you can use any company logo.

1. From the Insert menu, select Picture.


The Open window displays.

2. Browse to the file location where the Epicor logo is saved.


Ask the instructor for the Epicor logo file location.

3. Select the Epicor Logo file and click Open


The cursor becomes a rectangle.

4. Drop Epicor Logo into the Page Header a section and size the logo as desired.

5. Right-click the logo and select Format Graphic.


The Format Editor window displays.

6. Navigate to the Picture sheet.

7. In the Scaling section, enter the width and height.

8. Click OK to exit the Format Editor window.

9. Click Save.

102 Epicor ERP | 9.05.702


Crystal Reports Course Create a Booked Orders Report

Insert Descriptive Text

1. From the Insert menu, select Text Object.

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).

9. Right-click the Grand Totals field and select Format Text.


The Format Editor window displays.

10. Navigate to the Border sheet.

11. In the Line Style pane, in the Left, Right, Top, and Bottom fields, select Double.

12. Navigate to the Font sheet.

13. In the Style field, select Bold and click OK.

14. Click Save and preview the report.

15. Minimize Crystal Reports.

Epicor ERP | 9.05.702 103


Create a Booked Orders Report Crystal Reports Course

Workshop - Define Booked Order Report Options

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

1. From the New menu, select New Option Field.


The Option Fields sheet displays.

2. In the Option Field column, select BookDtl.BookDate and press Tab.

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).

5. In the Order field, enter 1.

6. From the New menu, select New Option Field.

7. In the Option Field column, select BookDtl.BookDate and press Tab.

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).

10. In the Order field, enter 2.

11. Click Save.

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.

1. From the New menu, select New Filter.


The Filters sheet displays.

104 Epicor ERP | 9.05.702


Crystal Reports Course Create a Booked Orders Report

2. In the Filter column, select Customer.CustNum and press Tab.

3. From the New menu, select New Filter.

4. In the Filter column, select BookDtl.ProdCode and press Tab.

5. Accept the defaults and click Save.

Deploy the Report

1. From the Actions menu, select Deploy BAQ Report.

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 __________________________________
.

4. Click OK to accept the deployment.


Now that the report is deployed, you can use the Test Report Form command to view the report with all
its data. This path is important if this report is going to be published to the Main menu.

Test the Report

1. From the Actions menu, select Test Report Form.


The Booked Orders Report window displays.

2. In the Beginning Book Date field, enter the date two years before today.

3. In the Ending Book Date field, verify today's date displays.

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.

6. Click Print Preview.

7. Close the report and the Booked Orders Report window.

8. Minimize the BAQ Report Designer.

Epicor ERP | 9.05.702 105


Miscellaneous Reporting Activities Crystal Reports Course

Miscellaneous Reporting Activities

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.

Conditional Formatting Formulas

In this section, continue to design the Booked Order List report.


While you format various report objects, many of the properties on the various Format Editor tabs have blue x+2
icons beside them. If a property has such an icon beside it, you can conditionally format that property.
Conditional Formatting is the use of a formula to format a field based on a specified condition. The condition
can be based on the field being formatted or any other available field.

106 Epicor ERP | 9.05.702


Crystal Reports Course Miscellaneous Reporting Activities

Workshop - Use Conditional Formatting in Crystal Reports

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.

Add a Colored Formula

1. Click Print Preview.


The Preview sheet displays

2. From the tree view, expand the XXX Booked Order List > Fabricated (where XXX are your initials) line.

3. From the Fabricated line, select Edwards International.


In the Preview pane, the page that contains information about Edwards International displays.

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.

6. In the Editor pane, enter If.


If there is text in the window, delete it.

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).

10. Press Enter twice and optionally press Tab to indent.

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.

13. Press Enter twice and optionally press Tab to indent.

14. In the new row, enter Else if to enter the second formula condition.

Epicor ERP | 9.05.702 107


Miscellaneous Reporting Activities Crystal Reports Course

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.

18. Press Enter twice and optionally press Tab to indent.

19. In the new row, enter Then.

20. In the third column, expand the Functions > Color Constants listings and double-click the Red line.

21. Verify the formula.


If Sum ({BAQReportResult.BookDtl.BookValue}, {BAQReportResult.Customer.Name})
>= 5000 Then crPurple Else if Sum ({BAQReportResult.BookDtl.BookValue},
{BAQReportResult.Customer.Name}) <= 1000 Then crred.

22. Click the x+2 check button.


The Crystal Reports window displays.

23. In the no errors found message, click OK.

24. Click Save and close.


Note that when the x+2 formula button has a formula behind it, its color changes from blue to red.

25. In the Format Editor window, click OK.

26. Click Save.

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.

108 Epicor ERP | 9.05.702


Crystal Reports Course Miscellaneous Reporting Activities

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.

Epicor ERP | 9.05.702 109


Miscellaneous Reporting Activities Crystal Reports Course

Workshop - Use the Highlighting Expert in Crystal Reports

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.

1. Navigate to the Preview sheet.

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.

3. In the Items list pane, click New.

4. In the Item editor pane, in the Value of: fields, enter this field is greater than or equal to 100000 and
press Enter.

5. In the Border field, select Double box.

6. In the Items list pane, click New.

7. In the Item editor section, in the Value of: fields, enter this field is greater than 50000 and press Enter.

8. In the Font color field, select Purple.

9. In the Items list pane, click New.

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.

12. Click Save.

110 Epicor ERP | 9.05.702


Crystal Reports Course Miscellaneous Reporting Activities

Section Expert Tool

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.

Workshop - Use the Section Expert Tool in Crystal Reports

In this workshop, use the Section Expert tool in Crystal Reports.

Add Page Breaks

Insert a page break so the data for each product group starts on a separate page.

1. From the Report menu, select Group Expert.


The Group Expert window displays.

2. In the Group By section, select the BAQReportResult.ProdGrup.Description – A group.

3. Click Options.
The Change Group Options window displays.

Epicor ERP | 9.05.702 111


Miscellaneous Reporting Activities Crystal Reports Course

4. Navigate to the Options sheet, clear the Keep Group Together check box, and click OK.

5. Repeat this process for the BAQReportResult.Customer.Name – A group.

6. In the Group Expert window, click OK to return to the report.

7. From the Report menu, select Section Expert.


The Section Expert window displays.

8. In the Sections pane, select Group Footer #1: ProdGrup.Description – A.

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.

10. Click Save and review the report.

Color Odd Numbered Lines

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.

1. Navigate to the Preview sheet.

2. In the vertical gray margin, right-click one of the Details (D) lines and select Section Expert.
The Section Expert window displays.

3. Navigate to the Color sheet.

4. Next to the Background Color field, click the x+2 formula button.
The Format Formula Editor – Background Color window displays.

5. In the Editor pane, delete the text in green.

6. In the Editor pane, enter If.

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).

13. Press Enter twice.

112 Epicor ERP | 9.05.702


Crystal Reports Course Miscellaneous Reporting Activities

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.

16. Press Enter twice.

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.

19. Verify the formula.


If Remainder (RecordNumber,2) <>0 Then crAqua Else crNoColor

20. Click Save and close.

21. In the Selection Expert window, click OK to return to the report.

22. Click Save and preview the report.

23. Remain in Crystal Reports for the next workshop.

Epicor ERP | 9.05.702 113


Miscellaneous Reporting Activities Crystal Reports Course

Group Sort Expert Tool

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

Workshop - Use the Group Sort Expert Tool

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.

Copy the Booked Order List Report

1. From the File menu, select Save As.


The Save As window displays.

2. In the File name field, enter XXX_BookOrderTopN.rpt (where XXX are your initials).

3. Click Save.

Sort Totals

Sort all product group totals.

1. Navigate to the Preview sheet.

2. From the Report menu, select Group Sort Expert.


The Group Sort Expert window displays.

3. Navigate to the ProdGrup.Description sheet.

4. In the For this group sort field, select All.

5. In the based on field, select Sum of BookDtl.BookValue.

6. Select the Descending check box and click OK.

7. Click Save.

114 Epicor ERP | 9.05.702


Crystal Reports Course Miscellaneous Reporting Activities

Format Product Groups

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.

1. From the Report menu, select Group Sort Expert.


The Group Sort Expert window displays.

2. Navigate to the ProdGrup.Description sheet.

3. In the For this group field, select Top N.

4. In the Where N is field, enter 2.

5. Select the Include others, with the name check box.

6. Click OK.

7. Click Save.

Report Product Groups

Report only the top two product groups. All other product group data is excluded from the report.

1. From the Report menu, select Group Sort Expert.


The Group Sort Expert window displays.

2. Clear the Include others, with the name check box.

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.

5. Remain in Crystal Reports for the next workshop.

Epicor ERP | 9.05.702 115


Miscellaneous Reporting Activities Crystal Reports Course

Running Totals

Use a Running Total field to accumulate or increment values in a report.


Similar to subtotals and grand totals, the Running Total field can be placed in various sections of a report to
accumulate values. It is created using the Field Explorer tool and placed anywhere on a report as if it were a
database field. There are additional ways to enter running totals into a report. The steps identified in the following
workshop are the suggested steps.

Workshop - Create a Running Total

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.

1. Navigate to the Preview sheet.

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.

5. In the Type of summary field, verify sum displays.

6. In the Evaluate section, select the For each record option.

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.

9. Navigate to the Design sheet.

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.

11. Assign a descriptive label.

12. Click Save and remain in Crystal Reports for the next workshop.

116 Epicor ERP | 9.05.702


Crystal Reports Course Miscellaneous Reporting Activities

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.

Workshop - Export Reports

In this workshop, export reports from Crystal Reports.


Navigate to the Booked Order List report.

1. From the File menu, select Export > Export Report.


The Export window displays.

2. In the Format field, select Microsoft® Excel® 97-2000 (XLS).

3. In the Destination field, select Application and click OK.


The Excel Format Option window displays.

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.

5. In Microsoft Excel, review the report and exit.

6. Repeat this process to export to other applications such as Microsoft Word®, Adobe® Acrobat ®, and
HTML 4.0.

7. From the File menu, select Export > Export Report.


The Export window displays.

8. In the Format field, select Report Definition (TXT).


This produces a text document that describes the various formulas in the report and every object inserted
in the report sections. It can become very long, but some useful information is available to the current
designer or anyone who wants to analyze the report design.

9. In the Destination field, select Application.

10. Click OK and review the report and exit.

11. Exit Crystal Reports.

Epicor ERP | 9.05.702 117


Conclusion Crystal Reports Course

Conclusion

Congratulations! You have completed the Crystal Reports course.

118 Epicor ERP | 9.05.702


Crystal Reports Course Appendix

Appendix

This section contains Crystal Reports frequently asked questions about formulas.

Crystal Reports Frequently Asked Questions about Formulas

Adding Crystal Reports formulas can enhance report writing processes. Some questions commonly asked are
explained below.

1. How do I show a range parameter in my report?


Answer: If you have a range parameter, it does not display if you drag it into the report. You can use a
parameter field in a formula field, which you can then place on your report. Below are formulas that convert
various field types used as range parameters.

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.

2. How do I back-fill a field with a comment if a field is empty/null?


Example 1:
This example assumes the empty/null field is warehse.description. You can replace this in the formula with
the table.field name that is pertinent to your report.
Create a new formula field called WhseDesc.
If is null ({warehse.description}) then "Warehouse Code Not Found" else {Warehse.Description}
Example 2:
Conditional signature lines are an example of where you can use this, with an option to also show a generic
statement or name when none is available or unnrdessary. Crystal Reports differentiates between null and
empty. One of the options in Crystal Reports is to convert nulls to a default value.
Under Report Options, verify the Convert option is set. To determine an empty field, the formula is LENGTH(
TRIM( {Field Name} ) ) = 0. Equals EMPTY. Use this formula if the field is empty and a default signature
is used.

Epicor ERP | 9.05.702 119


Appendix Crystal Reports Course

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.

120 Epicor ERP | 9.05.702


Additional information is available at the Education and
Documentation areas of the EPICweb Customer Portal. To access
this site, you need a Site ID and an EPICweb account. To create an
account, go to http://support.epicor.com.

Potrebbero piacerti anche