Epicor.instructor

102
Epicor 9 Crystal Reports Course Instructor

Transcript of Epicor.instructor

Page 1: Epicor.instructor

Epicor 9Crystal Reports Course

Instructor

Page 2: Epicor.instructor

Disclaimer

Copyright © 2008 by Epicor Software Corporation. All rights reserved. Printed in the United Statesof America. No part of this publication may be reproduced in any form without the prior writtenconsent of Epicor Software Corporation. Epicor, Vantage, and Vista are registered trademarks ofEpicor Software Corporation. All other trademarks are property of their respective owners. Microsoftproduct screen shots reprinted with permission from Microsoft Corporation. Epicor SoftwareCorporation makes no representations or warranties with respect to the contents of this documentand specifically disclaims any implied warranties of merchantability, satisfactory quality or fitnessfor any particular purpose. The contents of this document are believed to be current and accurateas of its date of publication. Changes to this document between reprintings and other importantinformation about the software product are made or published in release notes, and you are urgedto obtain the current release notes for the software product. We welcome user comments and reservethe right to revise this publication and/or make improvements or changes to the products or programsdescribed in this publication at any time without notice. The usage of any Epicor Software shall bepursuant to an Epicor end user license agreement and the performance of any consulting servicesby Epicor personnel shall be pursuant to Epicor's standard services terms and conditions.

ED84690

90521-900-9226-583503

9.04.503

Page 3: Epicor.instructor

Contents

Crystal Reports Course................................................................8Before You Begin.......................................................................10

Audience.................................................................................................10Prerequisites...........................................................................................10Setup.....................................................................................................10

Crystal Reports Overview..........................................................12Setup Review............................................................................15

Workshop - Access Crystal Reports and Define Report Defaults.......................15Open Crystal Report Options.............................................................15Set up Layout .................................................................................15Set up Reporting .............................................................................15Set up Numbers ..............................................................................15Set up Dates...................................................................................16Sort Fields and Tables.......................................................................16

Overview...................................................................................18Create a BAQ Report................................................................................20BAQ Report File Locations..........................................................................20

Workshop - Define BAQ Report Paths..................................................21BAQ Report Header Detail.........................................................................22

Workshop - Define Report Header Detail.............................................23Optional Fields.........................................................................................24

Workshop - Add Option Fields............................................................25Filters.....................................................................................................25

Workshop - Define Filters..................................................................26Sorts......................................................................................................27

Workshop - Label Sorts.....................................................................27The BAQ Report Designer Actions Menu.......................................................28

Test the BAQ Report.........................................................................29Generate Sample Data......................................................................29Design Crystal Report.......................................................................30Deploy the BAQ Report.....................................................................30

Crystal Standard Report Wizard................................................32Workshop - Define Early-Late Job Report.....................................................32

Verify the Report Option Paths...........................................................32Enter the BAQ Report Header............................................................33Establish an Option Field...................................................................33Test the Report Form........................................................................33Generate Sample Data......................................................................34Design a Crystal Report....................................................................34

Workshop -Create a Report Using the Crystal Report Wizard..........................34

Crystal Reports Course | TOC | iii

Page 4: Epicor.instructor

Access the Standard Report Wizard....................................................34Select Data Sources.........................................................................34Select the Tables..............................................................................35Review the Links..............................................................................35Review the Fields.............................................................................35Review the Optional Choices..............................................................36Save the Report...............................................................................36Resize Field Lengths.........................................................................36Move the Fields...............................................................................37Insert a Field...................................................................................37Add a Report Title............................................................................37

Database Concepts....................................................................39Identify Table and Field Names...................................................................39

Using the Online Technical Field Help..................................................40Customization Tools.........................................................................41Data Dictionary Viewer.....................................................................43

Table Linking...........................................................................................44Dataset Relationships Tracker............................................................45Join Types.......................................................................................47

Custom Report Design Tools.....................................................49Workshop - Define Manufactured Parts Report in Vantage..............................49

Verify the Report Option Paths...........................................................49Enter the BAQ Report Header............................................................49Test the Report Form........................................................................50Generate Sample Data......................................................................50Design a Crystal Report....................................................................50Add a Report Table...........................................................................51

Workshop - Create a Manufactured Parts Listing Report.................................52Insert and Resize Fields....................................................................52Rearrange the Fields........................................................................53Enter Report Groups.........................................................................53Modify the Group Header Preview.......................................................54Insert Summary for a Numeric Field...................................................54Insert Summary for a Text Field.........................................................55Deploy the Report............................................................................55

Add Presentation Quality to Custom Reports.............................56Workshop - Add Presentation Quality Formatting to Custom Reports...............56

Format Total Borders........................................................................56Format the Subtotal Borders..............................................................56Copy Field Format............................................................................57Insert Text Objects...........................................................................57Format the Report Title.....................................................................57Resize Text Objects..........................................................................58Insert Group Footer Text Objects........................................................58

iv | Crystal Reports Course | TOC

Page 5: Epicor.instructor

Rename Column Headers..................................................................58Format Column Headers...................................................................58Insert Special Fields.........................................................................59Resize and Format Special Fields........................................................60Perform Additional Report Formatting.................................................60Insert a Line...................................................................................60Add Boxes......................................................................................60Insert Company Logo.......................................................................61

Workshop - Defining Options for Manufactured Parts Listing...........................61Add an Option.................................................................................62Add a Filter.....................................................................................62Add a Sort......................................................................................62Test and Preview the Report..............................................................62

Create a Direct Labor Report.....................................................64Workshop - Define the Direct Labor Report..................................................65

Add a Report...................................................................................65Test and Preview the Report..............................................................65Generate Sample Data......................................................................65

Workshop - Prepare for Crystal Formatting..................................................65Select Data Sources.........................................................................66Add the Report Result Table...............................................................66Review the Links..............................................................................66

Workshop - Create a Direct Labor Report.....................................................66Re-arrange Default Fields..................................................................67Add a Formula.................................................................................67Insert Fields....................................................................................68Format the Column Headings.............................................................68Insert Groups..................................................................................68Insert Group Summaries and Grand Totals..........................................69Insert Text Objects...........................................................................69Insert Presentation Quality Detail.......................................................70Save and Exit the Report..................................................................70

Workshop - Defining Options for Direct Labor Report.....................................70Add Options....................................................................................70Add a Filter.....................................................................................71Add a Sort......................................................................................71

Deploy the BAQ Report..............................................................72Workshop - Deploy and Publish a Report.....................................................72

Deploy the Report............................................................................72Add the Report to Menu....................................................................72Test the Report From the Menu..........................................................73

Modify Existing Crystal Reports Forms......................................75Workshop - Modify the Purchase Order Form................................................76

Add a PO Form................................................................................76

Crystal Reports Course | TOC | v

Page 6: Epicor.instructor

Add a Report Definition.....................................................................76Add a Report Style...........................................................................77Create the XML File..........................................................................77Set the Database Location.................................................................77Insert a Company Logo.....................................................................78Suppress Closed Lines on the PO Form...............................................79

Establish the Modified Form as the System Default.......................................80Workshop - Establish the New Purchase Order Form as the System Default.80

Independent Workshop: Create a Booked Orders Report..........81Workshop - Define the Booked Orders Report...............................................81

Add a Report...................................................................................81Test and Preview the Report..............................................................81Generate Sample Data......................................................................81

Workshop - Prepare for Crystal Formatting..................................................82Select Data Sources.........................................................................82Add the Report Result Table...............................................................82Review the Links..............................................................................83

Independent Workshop - Create a Booked Orders Report...............................83Delete the Default Fields...................................................................83Add a Formula.................................................................................83Insert Fields....................................................................................84Insert Groups..................................................................................84Add Subtotals and a Grand Total........................................................85Add a Page Header Section...............................................................85Insert a Report Title.........................................................................85Format Column Headers...................................................................86Edit the Column Header Field Names..................................................86Insert a Line...................................................................................87Insert a Company Logo.....................................................................87Insert Descriptive Text......................................................................87

Workshop - Defining Options for Booked Order Report...................................88Add Options....................................................................................88Add Filters......................................................................................88Add Sorts.......................................................................................89Deploy the Report............................................................................89Test the Report................................................................................89

Miscellaneous Reporting Activities............................................90Conditional Formatting Formulas................................................................90

Workshop - Use Conditional Formatting in Crystal Reports.....................90Conditionally Format Fields Using the Highlighting Tool..................................91

Workshop - Use the Highlight Expert in Crystal Reports.........................92Format Report Sections Using the Section Expert Tool...................................92

Workshop - Use the Section Expert Tool in Crystal Reports....................93Group Sort Expert Tool..............................................................................94

vi | Crystal Reports Course | TOC

Page 7: Epicor.instructor

Workshop - Use the Group Sort Expert Tool.........................................94Running Totals.........................................................................................96

Workshop - Create a Running Total ....................................................96Export Reports into Different Formats for Purposes of Report Distribution........97

Workshop - Export Reports................................................................97

Conclusion................................................................................98Appendix...................................................................................99

Group Sort Expert Tool..............................................................................99Workshop - Use the Group Sort Expert Tool.........................................99

Crystal Reports Frequently Asked Questions about Formulas........................100

Crystal Reports Course | TOC | vii

Page 8: Epicor.instructor

Crystal Reports Course

This course is designed as an introduction to Crystal Reports writing. The student will learn todesign and create new reports using both Crystal Reports and the system's BAQ Report Designer,as well as modify existing Crystal forms. In addition, fundamentals of relational databaseconcepts such as tables, table relationships, records and field types will be discussed.

Crystal Reports is a powerful reporting tool that helps you design flexible, high-quality reports,virtually from any data source including XML and OLAP. Extensive formatting options meanscomplete control over how data is presented. These design and formatting options includegrouping, sorting, field highlighting, and field summarization.

Epicor 9 has an integral relationship with Crystal Reports through its Business Activity Query(BAQ) technology. The data that is to be pulled into a Crystal Report is gathered using a BAQ.The BAQs for this course are pre-defined and therefore there will be no discussion on how tobuild a BAQ.

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

• Name the components of the Crystal Reports Designer main menu.• List the attributes of the Design and Preview screens.• Set Crystal Report defaults.• Gain a basic understanding of how to use an existing BAQ as the data source.• Review the purpose of the BAQ Report Designer and how you create a report's user interface.• Become familiar with the design functionality available in the BAQ Report Designer.• Understand the steps to transfer your BAQ Report Designer report into Crystal Reports• Understand ways to identify tables and field names.• Describe the usage of the data dictionary viewer and the dataset relationship dashboard.• Identify the different types of joins.• Design Crystal Reports using the Standard Report Wizard.• Design reports using Custom Design tools.• Group report data.• Set up subtotals and grand totals.• Use the Formula Editor to create calculated fields.• Format reports for presentation.• Attach a completed report to the Vantage menu system.• Create conditional formatting.• Export reports and attach a report to a system menu.• Modify the standard Crystal Report forms.

Epicor Software

8 | Crystal Reports Course | Crystal Reports Course

Page 9: Epicor.instructor

Instructor Note

Introductions

• Introduce yourself to the group and have students introduce themselves to the group.• Review housekeeping items (location of restrooms, break/lunch arrangements, etc.).• Explain that the course is informal, however, cell phones should be shut off and IMcommunication is only permitted during scheduled breaks and the lunch hour.

• Stress importance of asking questions, stopping instructor when something is unclear,and taking notes.

Expectations

• Review any expectations students submitted prior to class.• Ask students if they have any additional expectations and list them on theflipchart/whiteboard.

• Identify any expectations that are covered in another course or discuss them off-line.

Learning Roadblocks

• Ask students what roadblocks can get in the way of meeting the learning objectives andrecord these on the whiteboard/flipchart.

• Explain that both the facilitator and students must try to avoid learning roadblocks and totell each other when they arise.

• Ask students if they have questions about the learning roadblocks.

Epicor Software

Crystal Reports Course | Crystal Reports Course | 9

Page 10: Epicor.instructor

Before You Begin

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

AudienceSpecific audiences will benefit from this course.

• System Administrator• IT/Technical Staff

PrerequisitesBefore you begin this course, be sure you understand the prerequisite knowledge contained inother valuable courses.

• Navigation Course - This course introduces the navigational aspects of the system's userinterface. Designed for a hands-on environment, general navigation principles and techniquesare available at each of the interface levels of system, module, and program within theapplication. Workshops focus on each of these levels and guide you through each navigationalprinciple introduced.

• BAQ and Advanced Dashboard Course - The Business Activity Query (BAQ) programallows the user to create personalized queries and copy standard queries so they can bemodified. Once a query is created, it can be viewed through the Dashboard interface. Thequeries can also be exported as .xml or ASCII files which allow the user to view and editthird party applications. Queries can be created that are only available for the user, or theycan be shared queries available to everyone in the company.

• Recommended Industry Knowledge:

• Exposure to other database report generator programs• Fundamental knowledge of relational database concepts such as table relationships,records, and field types.

• Understanding of the functionality of the current release of the business software application

SetupSetup is required before you begin this course.

• The Epicor 9 release must be installed and operational in a training environment.• The workshops contained in this course were written using the Education Database EpicorUSA (EPIC03) company. To ensure successful results, you must complete all workshopslogged into the same database and company. You may need to contact a manager for helpto ensure the database is properly installed.

• Determine if the database is installed on the client server ("networked-environment") orinstalled locally.

Epicor Software

10 | Crystal Reports Course | Before You Begin

Page 11: Epicor.instructor

A networked-environment exists when one education database is installed on the client serverand all trainees are accessing that server at the same time. Some issues can arise duringapplication training within a networked-environment.

• Successive Self-Paced Training: Because some courses share the same datarequirements (part numbers, inventory transactions, and group IDs), a clean or restoredcopy of the data is required after each time a student completes a course. The educationdatabase can easily be restored at any time to provide fresh data for subsequent trainingsessions.

• Concurrent Self-Paced or Classroom Training: Sometimes more than one student istraining on the same course at the same time. If these multiple users have access to asingle installation of the same education data, any data that is created or updated duringthis training may affect on-going training efforts.

Instructor Note

The following setup is needed to instruct this course:

• Use the following settings for this course:

Default Epicor900Database

managerLogin

managerPassword

EPIC03 - Epicor USACompany

• Depending on what phase this course is taught (implementation, upgrade, refresher),some of the above setup may not be necessary. If teaching this session during theimplementation phase, you may wish to add codes applicable to the company's businesswhen demoing or ask students to add codes applicable to their company's business asthey complete the workshops.

It is highly recommended to review the account that will be used for training to verify allcodes and constants are appropriate based on the workshops and to familiarize yourselfwith the course.

• At times the Facilitator Notes suggest the instructor complete each workshop, and thenask students to complete the workshop. If a small number of students are in class, youmay prefer to do the workshops together.

• Open a system session to navigate to programs within the course. Use the Alt + Tab keysto navigate between the course and system session.

• Verify documentation (e.g., program and field help) execute on your PC and the student'sPC's.

• If training in a networked environment, please read the Networked Environment Guidelinesdocument prior to training. This document is available as a Shared Document on theEPICweb.

Epicor Software

Crystal Reports Course | Before You Begin | 11

Page 12: Epicor.instructor

Crystal Reports Overview

Crystal Reports delivers tools for integrating dynamic content from the system database intopowerful reports. This section focuses on the components found in the Crystal Reports' windows- addressing the features and functionalities of these components.

Crystal Reports Main Screen

Instructor Note

Navigate to the Crystal Reports main screen. Demonstrate and discuss the various elementsof the Crystal Reports main screen.

Menu Bar

The Crystal Reports menu bar options depend upon whether you are at the main screen or havestarted to design a new report. File, View and Help are available from the main screen. Othermenu selections become available in the design phase of a custom report, such as Edit, Insertand Format.

Standard Toolbar

Many of the commands frequently accessed from the menu have been conveniently groupedon the Standard toolbar. The toolbar remains on the screen and can be turned off using theToolbars command on the View menu.

Note Tool tips appear if the mouse hovers over any icon on the toolbar. These tipsprovide a brief description of the icon's function.

Formatting Toolbar

The Formatting toolbar is below the Standard toolbar, and it enables you to format one or moreselected objects on a report. Simply select the object(s), and then select one or more of theformat options from that toolbar.

Insert Toolbar

The Insert toolbar provides easy access to the Crystal Report functions that insert new itemsinto the report. These include: Text Objects, Groups, Summaries, Sub-reports Lines, Boxes,Pictures and more.

Expert Toolbar

Crystal Reports provides a number of advanced functionalities via the expert tools or wizards.These include the following experts: Database, Group, Sort, Section, Formula Workshop, SelectExpert and more.

Print Preview Window

The components of this window work much the same way as any Windows print preview mode.The specifics of each of the following components will be discussed later in this course, but arelisted here for purposes of recognition and discussion.

• Design and preview tabs• Close Preview Window button• Beginning of Report and Page Back buttons• Page Forward and End of Report buttons• Group Tree display area

Epicor Software

12 | Crystal Reports Course | Crystal Reports Overview

Page 13: Epicor.instructor

• Report Sections display area• Actual report preview area

Instructor Note

1. Navigate to a sample report.

C:\Program Files\Business Objects\Crystal Reports11.5\Samples\en\Reports\Feature Examples\Running Totals Group.rpt.

2. Open the report in a Print Preview window.3. Explain to students that components of this window are discussed in detail later as reportsare written.

Report Design Window

The components of this window are related primarily to the textual elements of a report - theheaders, footers and details.

Instructor Note

1. Click the Design tab to open the Report Design window.2. Tell students that the components of this window will be described at this time, but willbe discussed in greater detail later in the course when designing a report.

Report Header

Any object that is placed in the Report Header prints only on the first page of a report. This isoften where the report date and the company logo are placed. Additional special fields such asReport Comments, File Path and Name may also be printed here.

Page Header

Data or objects that are placed in the Page Header print at the top of every page. Columnheadings print in this section by default.

Details

When selecting the data fields to be included in the report, place them in the Details area. Thesize of these fields may be adjusted as needed for the report. Keep in mind, if there are 1,000records on your report, there will be 1,000 detail sections.

Report Footer

Data such as grand totals are typically placed in the Report Footer as items in this section printone time on the last page of the report.

Page Footer

If items need to print or appear at the bottom of every page, place it in the Page Footer. Thismay be another place to put page numbers and information such as the company address andphone number.

Field and Report Explorer

The Field Explorer and Report Explorer are combined in a window docked by default to the rightside of the report area. This explorer tool can be undocked to float or closed and opened viathe Menu bar or the Field or Report Explorer buttons on the Standard toolbar.

Epicor Software

Crystal Reports Course | Crystal Reports Overview | 13

Page 14: Epicor.instructor

Instructor Note

Navigate to the Field Explorer window and then the Report Explorer and demonstrate thecomponents outlined for each below.

Field Explorer

The Field Explorer is used to insert, delete, or modify fields for your report and is available onboth the Design and Preview tabs.

It displays a tree view of Database fields and Special fields that can be added to a report aswell as Formula, Parameter, and Group Name fields that are defined for use in the report. Atoolbar is available on the Field Explorer to insert, delete, edit, and rename existing fields.

Report Explorer

The Report Explorer displays a tree view of the sections in your report and lists the reportobjects contained in each section.

Within each section, the report's fields and objects are listed. Any item selected in the tree viewwill be selected in the report (in either Design or Preview modes).

Report fields and objects can be modified by selecting them in the Report Explorer. When youright-click on an item, a menu that contains the actions that can be carried out on the itemdisplays. For example, if you right-click on a text object, the menu will contain the options toedit the text, to format its font or color, and so forth.

Note You cannot add additional fields or report objects when using the Report Explorer,but you can delete them.

Epicor Software

14 | Crystal Reports Course | Crystal Reports Overview

Page 15: Epicor.instructor

Setup Review

Before designing a Crystal Report in this course, several Crystal Reports' defaults must first beset. Some of these defaults change the layout and operation of Crystal Reports. Others changethe formatting of some fields in the rest of your reports.

Instructor Note

This workshop has to be completed once you have opened Crystal - with no report in focus.Explain that this is to lay the default look and feel of Crystal - most of the same options areavailable at the report level as well. Some are best left to the field level, like can grow.

Workshop - Access Crystal Reports and Define Report DefaultsThis workshop demonstrates how to access Crystal Reports and define report defaults.

Open Crystal Report Options

1. From the Start menu, navigate to Crystal Reports.

Open Crystal Reports for Epicor.

2. From the File menu, select Options.

The Options window is used to modify settings that apply to the reporting environmentcreating system defaults that can be overridden on a report by report basis.

Set up Layout

1. Verify you are on the Layout sheet.2. Set up the Design View section.

Select the check boxes:

• Guidelines• Grid

3. In the Grid options section, verify the Snap to Grid check option is selected.

Set up Reporting

1. Select the Reporting sheet.2. Clear the Save Data with Report check box.

By default, Crystal Reports has the Save Data With Report options enabled. The purposeof this is to execute, or refresh, the query inside of Crystal on demand while formattingthe report. This course uses the BAQ Report Designer to define the Crystal Reports andtherefore, the query execution is controlled at the BAQ Report Designer level.

Set up NumbersThe numbers sheet is used to customize how numbers display on the report.

Epicor Software

Crystal Reports Course | Setup Review | 15

Page 16: Epicor.instructor

1. Select the Fields sheet.2. Click Number.

The Format Editor opens.3. Select the Number sheet.

The Custom Style window opens.4. On the lower left of the screen, click Customize5. Select the Use Accounting Format check box, then clear it.

Negatives will now display as (123) rather than -123. You could also change such formattingfeatures as the number of decimal places to display, and how many decimal places to roundto.

6. Verify the Allow Field Clipping check box is cleared.The “####” will be printed when a column is not set wide enough to print an entire value.If it selected, this feature would only print as many digits as the field width would allow,starting from the right side of the field. Thus 1,010,000 might display as 10,000, forexample.

7. To customize the currency symbol., select the Currency Symbol sheet.8. Verify the Enable Currency Symbol check box is selected.

When you select the Use Accounting Format check box on the Number sheet, the EnableCurrency Symbol check box and Floating option is selected automatically. Floating optionspositions the symbol to the left of the number value displayed. Fixed option positions thesymbol at the far left side of each number displayed.

9. In the Currency Symbol field, enter a dollar sign.10. Clear the Enable Currency Symbol check box11. Click OK once to exit the Custom Style window.12. In the Format Editor window, click OK to save the new default Number field format and

close the window.

Set up Dates

1. On the Fields sheet, click Date.The Format Editor opens.

2. To Customize dates, select the Date sheet.3. On the lower left of the screen, click Customize

The Custom Style window opens.4. In the Month field, select 035. In the Day field, select 016. Click OK once to exit the Custom Style window.7. In the Format Editor window, click OK to save the new default Date field format and close

the window.

Sort Fields and Tables

1. Select the Database sheet.2. In the Tables and Fields section, select Sort Tables Alphabetically and Sort FieldsAlphabetically.This action simplifies the table and field selection process.

3. Click OK to save new defaults.

Epicor Software

16 | Crystal Reports Course | Setup Review

Page 17: Epicor.instructor

The option changes take effect when the next time a report is designed, or if a report is currentlybeing designed. Some of them might take effect when the next field is inserted. There is noeffect on any work that you have already done.

Epicor Software

Crystal Reports Course | Setup Review | 17

Page 18: Epicor.instructor

Overview

The BAQ Report Designer enables you to turn a Business Activity Query (BAQ) into aCrystal Report. You create these personalized queries through Business Activity Query; youdesign each query to pull in a customized set of information from your database.

Before you create the BAQ report, you must first create the Business Activity Query. This BAQmust contain the Company column within its table; if the Company column is not present, theBAQ report will not work properly. After you finish creating the BAQ, you will then select it onyour report.

The BAQ Report Designer is the intermediary step between creating BAQ and formatting finalizedCrystal Report. The purpose of the BAQ Report Designer is to allow you to design a BAQ Reportuser interface directly from your Business Activity Queries.

Important In order to effectively use the BAQ Report Designer, you should have solidknowledge of both Business Activity Queries and Crystal Reports.

The reports you create through this tool are flat reports; they are restricted to only pullingdata from the table defined on their selected BAQs.

Note The selected BAQ can be new, a standard BAQ that has been modified, or simply,a standard BAQ. In addition, each BAQ used in the BAQ Report Designer must have aCompany column. This course uses a standard BAQ to complete the workshops.

Process Flow for BAQ Report Designer

The process flow of the BAQ Report Designer is comprised of:

• Creating a BAQ, whether from a standard BAQ, BAQ you create, or modified BAQ• Pulling your BAQ into the BAQ Report Designer, designing the report's interface, and sendingit to Crystal Reports

• Working on the report layout in Crystal Reports• Placing BAQ Report interface on the Main Menu for others to access

Epicor Software

18 | Crystal Reports Course | Overview

Page 19: Epicor.instructor

BAQ Report Examples

There are several standard BAQ reports already in the system:

Epicor Software

Crystal Reports Course | Overview | 19

Page 20: Epicor.instructor

• Employee Efficiency Report• Rebate Transactions• Resource Group Efficiency• Rebate Contract Summary

Note These reports were created using the BAQ Report Designer, so you have the abilityto customize them as needed. You can link to user defined fields in the Report Parameterstable as well. This allows you to pass additional information to Crystal Reports, expandingthe power of Crystal when you are designing report layouts.

The standard BAQ Report interface for the Employee Efficiency Report is a good example toreference as you progress through the course, as this report was created using the BAQ ReportDesigner.

The Employee Efficiency report is located under the following:

Menu Path: Production Management ➤ Job Management ➤ Reports ➤ EmployeeEfficiency

The Employee Efficiency report summarizes labor details. You can filter this report bydepartments, employees, or both. Also note this report only displays labor data for the datesyou select.

Create a BAQ ReportYou must first define your directory paths and review the key menu features available whendesigning a report's user interface. Then use the BAQ Report Designer to select the BusinessActivity Query (BAQ) as the base for a report. Also define the option fields, filters, and sort byoptions to appear on the report interface.

Menu Path: Executive Analysis➤ Business Activity Management➤ General Operations➤ BAQ Report Designer

Note The reports you create using the BAQ Report Designer tool are flat reports, whichmeans they are restricted to only pulling data from the table(s) defined on their selectedBAQs.

BAQ Report File LocationsBefore you create reports with the BAQ Report Designer, you must define the local paths touse with this tool.

The BAQ Report Options ensure the report exports to Crystal Reports, is saved locally for easyretrieval, and generates sample data for testing prior to completion.

You need to define the local paths that will be used to save the report files. You must definethree paths -- the Crystal Reports Executable, the Sample Data Directory, and the LocalReports Directory. When you first create a report, the BAQ report designer will automaticallyplace the .rpt report file within the Local Reports Directory.

Epicor Software

20 | Crystal Reports Course | Overview

Page 21: Epicor.instructor

Instructor Note

Review the help information for these fields:

• Crystal Reports Executable• Sample Data Directory• Local Reports Directory

Examples of paths are:

• C:\Program Files\Business Objects\Crystal Reports 11.5\crw32.exe for Crystal ReportsExecutable

• C:\Documents and Settings\All Users\ApplicationData\Epicor\Vantage\8.03.304\VN10T\shared\Reports\SampleData for Sample DataDirectory

• C:\Documents and Settings\All Users\ApplicationData\Epicor\Vantage\8.03.304\VN10T\shared\Reports for Local Reports Directory

Note The path statements above should not be considered recommended pathstatements as they are only examples.

Be sure to select the Copy Report Locally check box so the BAQ Report Designer creates aduplicate copy of each BAQ report as a backup.

Instructor Note

Review the help information for the Copy Report Locally check box.

Additional Information

There are also read-only fields for the Server Reports Directory and the BAQ ReportTemplate.

Instructor Note

Review the help information for these fields:

• Server Reports Directory• BAQ Report Template

Workshop - Define BAQ Report PathsPath locations are usually defined once for all BAQ Report Designer reports. The paths indicatedbelow are examples; you may wish to organize your BAQ reports differently.

Set up BAQ Crystal ReportsNote The instructor will lead you to the correct path, if not already identified. The BAQReport Designer is used in future workshops and can be minimized. , so keep thisprogram open; your Report Options are the same as you define them here.

1. Click the Actions menu and select the BAQ Report Options command.2. In the Crystal Report Executable field, enter the path for Crystal Report Designer.

a) Click the Browse (...) button.b) Browse for the executable file for Crystal Report Designer.Usually it is crw32.exe.

Epicor Software

Crystal Reports Course | Overview | 21

Page 22: Epicor.instructor

Instructor Note

The classroom machines should all be set up with this Crystal Report Executable path:

C:\Program Files\Business Objects\Crystal Reports 11.5\crw32.exe.

These paths are per User ID, so the directories and the Crystal paths may vary foreach user.

c) Click Apply.

3. From the Actionsmenu, select the Design Crystal Report option to verify that the CrystalReport Executable path is correct.If the path is correct, Crystal Reports opens.

4. Exit Crystal Reports.

Set up BAQ Reports OptionsThe Report Options defined guide the system through the interaction between Epicor and CrystalReports. The paths defined in this workshop represent the paths used in a classroomenvironment. These paths may be modified to the local workstation environment as necessary.

1. Click the Actions menu and select the BAQ Report Options command.2. In the Sample Data Directory path field, click the Ellipsis (...) button. .

In the classroom, browse for the path c:\_BAQReports\Sample Data. It is recommendthe same directory be created on the workstation.

3. Click the Actions menu and select the BAQ Report Options command.4. In the Local Reports Directory path field, click the Ellipsis (...) button.

In the classroom, browse for the path c:\_BAQReports\Reports. It is recommend thesame directory be created on the workstation.

5. Verify that the Copy Report Locally check box is selected.Note that this copies the .rpt file to the local machine when it is first created. To copy locallyonce the report is defined and deployed to the server, modify the Form Title; the reportwill copy locally again.

6. Click Apply.

Instructor Note

The classroom machines should all be set up with these paths:

• Sample Data Directory

C:\_BAQReports\Sample Data.

• Local Reports Directory

C:\_BAQReports\Reports.

In a network environment, these paths should be entered by User ID.

BAQ Report Header DetailUse the BAQ Report Designer - Detail sheet to define the primary details of your BAQ report.This sheet allows you to set up the report's identifier and description. Also select the BusinessActivity Query (BAQ) that will be used as the base query for this report.

Epicor Software

22 | Crystal Reports Course | Overview

Page 23: Epicor.instructor

From the New menu, use the New Report Definition option to create a new BAQ report.

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

Report ID is the identifier for the BAQ report. The Report ID will become your Crystal Report(.rpt) file name.

Instructor Note

Review the help information for these fields:

• BAQ ID• Report ID• Description• Form Title

Example In the Employee Efficiency Report, the BAQ ID is zEmployeeEfficiency, theReport ID and the Crystal Report file are EmplEff, and the Description and the Form Titleare Employee Efficiency Report.

Instructor Note

Explain that the Employee Efficiency Report will be used as the basis for set up discussions.Each report in this course requires the same setup.

Demo

Point out the fields as they are discussed.

1. From the New menu, select New Report Definition to create a new BAQ report.2. In the Report ID field, enter EmplEff. Note that this populates the Crystal Report field.3. In the BAQ ID field, search for and select zEmployeeEfficiency.4. Enter Employee Efficiency Report as the Description and the Form Title.5. Click Clear.

Explain that you will go through these in further detail in a later workshop.

Workshop - Define Report Header DetailThis workshop demonstrates how to define Report Header Detail.

If you closed the program, navigate to BAQ Report Designer.

Menu Path: Executive Analysis➤ Business Activity Management➤ General Operations➤ BAQ Report Designer

1. Click New and select New Report Definition.2. On the Detail sheet, enter the BAQ Report Header information.3. In the Report ID field, enter APInvOpen and press Tab

The Crystal Reports (.rpt) field is automatically populated.4. In the Description field, enter Open AP Invoice Report5. In the BAQ ID field, enter or browse for the standard report Open AP Invoice Report

(zAPInvHeadOpen).6. In the Form Title field, enter Labor Hours Report.7. Click Save.

The steps completed to this point include the path locations and the report definition. Thesesteps will always have to be completed before you begin any BAQ Report Designer/CrystalReport. Other field definitions (Options, Sorts, and Filters) should always be part of your

Epicor Software

Crystal Reports Course | Overview | 23

Page 24: Epicor.instructor

report plan; however, they may be defined before the report is formatted using CrystalReports, or after. Refer to the Strategy Sheets in the Appendix for planning guidelines.

Instructor Note

Note that students should be able to use the standard report zAPInvHeadOpen to completethis workshop.

Optional FieldsThe BAQ Report Options enable you to set up the main user input fields for the report. Thesefields allow users to define the BAQ data that will display when the report is generated. Forexample, you can use this sheet to define the From and To date range fields users can select.

Use the New Option Field option from the New menu to add new user input fields to the BAQreport.

When you have selected the query on the BAQ Report Designer - Detail sheet, use the OptionFields sheet to turn any field on the selected BAQ into an input field. You can then enter theField Label for the option field and the Compare Operator that defines what data will bedisplayed in the report.

Instructor Note

Review the help information for these fields:

• Option Field• Field Label• Compare Operator• Data Type• Default• Order

Example In the Employee Efficiency Report, the To and From date range fields areoption fields.

Instructor Note

Demo

Bring the Employee Efficiency Report interface up and point out the To and From fieldsin the Report Options section as examples of option fields.

In the BAQ Report Designer, click Report ID and click Search. Select EmplEff. This bringsup the standard BAQ for the Employee Efficiency Report.

Point out the columns as they are discussed.

1. Click the Option Fields sheet and compare what is seen here to what appears on theactual report interface as To and From.

2. From the New menu, select New Option Field to create a new option field.3. Click Option Field to show the available options.

Explain that you will go through these in further detail in a later workshop.

Epicor Software

24 | Crystal Reports Course | Overview

Page 25: Epicor.instructor

Workshop - Add Option FieldsThis workshop shows how to turn fields on the selected BAQ into an input field for report criteria.

If you closed the program, navigate to BAQ Report Designer.

Menu Path: Executive Analysis➤ Business Activity Management➤ General Operations➤ BAQ Report Designer

Note Any field in the BAQ is available as an Option Field.

Instructor Note

Note that students should be able to use the standard report zAPInvHedOpen to completethis workshop.

1. Select the Option Fields sheet.2. Enter an option field.

a) Click New and select New Option Field.b) Point the cursor to the empty cell of the Option Field column.The down arrow of the drop down menu appears.

c) In the Option Field field, select APInvHed.InvoiceDate.

d) Click the empty cell of the Field Label column to populate it.e) Change the Field Label from Invoice Date to Enter Start Date.f) In the Compare Operator field, select the Greater Than or Equal To option (>=).g) Verify the Data Type is date.h) In the Order field (last column of the grid), enter 1.

3. Enter another option field.a) Click New and select New Option Field.b) Point the cursor to the empty cell of the Option Field column.The down arrow of the drop down menu appears.

c) Click the empty cell of the Field Label column to populate it.d) In the Option Field field, select APInvHed.InvoiceDate.e) Change the Field Label from Invoice Date to Enter End Date.f) In the Compare Operator field, select the Less Than or Equal To option (<=).g) Verify the Data Type is date.h) In the Order field (last column of the grid), enter 2.

4. Click Save.

FiltersThe Filters sheet enables you to define the various filters that will be available on the BAQreport's Filter tab. These items restrict the records that will print on a report. Filters can limitreports to only display items related to a single record or a range of records.

Use the New Filter option from the New icon to add new filters to the report.

Epicor Software

Crystal Reports Course | Overview | 25

Page 26: Epicor.instructor

Instructor Note

Review the help information for these fields:

• Filter• Filter Label• Tab Label

Example In the Employee Efficiency Report, the Employee and Dept options are filters.

Instructor Note

Demo

Bring the Employee Efficiency interface up and point out the Employee and Dept optionson the Filter tab as examples of filters.

Point out the columns as you discuss them.

1. Click on the Filters sheet and compare what you see here to what appears on the actualreport interface as Type Code.

2. From the New menu, select New Filter to create a new filter (using thezEmployeeEfficiency BAQ from the previous demonstration).

You can also demonstrate adding new filters by pressing Enter at the end of the last line.

3. Type a slightly different Filter Label and Tab Label to show how these can be changed.

Explain that you will go through these in further detail in a later workshop.

Workshop - Define FiltersThis workshop demonstrates how to define filters.

If you closed the program, navigate to BAQ Report Designer.

Menu Path: Executive Analysis➤ Business Activity Management➤ General Operations➤ BAQ Report Designer

Any indexed field in the BAQ will be available as a filter.

Instructor Note

Note that students should be able to use the standard report zAPInvHedOpen to completethis workshop.

1. Select the Filters sheet.2. Add a new filter.

a) Click New and select New Filter.b) Point the cursor to the empty cell of the Filter column.The down arrow of the drop down menu appears.

c) In the Filter field, select APInvHed.VendorNum.d) Click the empty cell of the Filter Label column to populate it.e) For the Filter Label and Tab Label, accept the default values.

3. Add another filter.a) Click New and select New Filter.b) Point the cursor to the empty cell of the Filter column.The down arrow of the drop down menu appears.

Epicor Software

26 | Crystal Reports Course | Overview

Page 27: Epicor.instructor

c) Click the empty cell of the Filter Label column to populate it.d) In the Filter field, select APInvHed.CurrencyCode.e) For the Filter Label and Tab Label, accept the default values.

4. Click Save.

SortsUse the Sorts sheet to design the sort orders that can by used with the current BAQ report.Sort orders indicate the sequence in which the records will be displayed on the report. Thesesort orders will then be displayed on the Sort By list on the report interface.

Use the New Sort option from the New menu to add a sort to the report.

Note Sorts created here are used by the application to limit the data passed to CrystalReports. Remember that grouping inside Crystal is the first sort in Crystal. There maybe times when you want to handle the sort options within Crystal, rather than limit theraw data coming from the application into Crystal.

Instructor Note

Review the help information for these fields:

• Name• Sort Field• Order• Ascending

Example In the Employee Efficiency Report, the Employee\JC Department andJCDepartment\Employee options in the Sort By field are sorts.

Instructor Note

Demo

Point out the fields as you discuss them.

1. From the New menu, select New Sort to create a new sort field (using theEmployee\JCDepartment BAQ from the previous demonstration).

To demonstrate how to add either new sort options or sort fields, press Enter after thelast entry in the section with the same title.

2. Under Sort Options in the Name field, enter Employee\JCDepartment.3. Under Sort Fields, click the New icon and point out that users can designate the SortFields, Order, and whether or not to use an Ascending or Descending sequence foreach sort.

Explain that you will go through these in further detail in a later workshop.

Workshop - Label SortsThis workshop demonstrates how to design sort orders for use in the BAQ report.

If you closed the program, navigate to BAQ Report Designer.

Menu Path: Executive Analysis➤ Business Activity Management➤ General Operations➤ BAQ Report Designer

Epicor Software

Crystal Reports Course | Overview | 27

Page 28: Epicor.instructor

Instructor Note

Note that students should be able to use the standard report zAPInvHedOpen to completethis workshop.

1. Select the Sorts sheet.2. Enter a new sort.

a) Click New and select New Sort.b) Under Sort Options in the Name field, enter Supplier\Date.

3. Enter another sort.a) Click New and select New Sort.b) Under Sort Options in the Name field, enter Date\Supplier.

4. Click Save.

The BAQ Report Designer Actions MenuOnce the report has been defined and "registered" with Epicor 9, it is time to gather the data.A BAQ is used as the data foundation and has to be executed, or "Tested", within the BusinessActivity Query creation program to populate initially. When the BAQ is linked to the report usingthe BAQ Report Designer definition we just discussed, it is then "executed" based on the reportcriteria when the sample data is created. This section will explain how to test the BAQ foraccuracy and then how to generate the sample data. Once you have data, the newly definedreport is passed to Crystal Reports for further formatting.

Design Crystal Report

The Design Crystal Report feature allows you to launch the current BAQ Report in the CrystalReport application. When selected, this command searches for the Crystal Report .exe file inthe Crystal Report Executable path, pulls it into Crystal Reports, and launches the application.

Deploy BAQ Report

The Deploy BAQ Report command copies the current report in focus from your local reportsdirectory as defined earlier up to the Server\Reports\ directory. After this has been done, thereport can be deployed to a menu or executed using the Report Definition screen.

Download Report

This option is used when a copy of the deployed report is to be brought back down to the localreports directory. A selection screen comes up to allow choice of report to bring down.

Copy BAQ Report

This option allows you to create a duplicate of the current BAQ Report (.rpt file). The new copyis saved to the local reports directory as defined in the Report Locations. You would use thisselection when you want to begin modification directly inside Crystal.

Export BAQ Report

This option copies the current .rpt file and exports an exact copy to another location. It isimportant to remember to export the BAQ being used for the report as the query is not becopied as part of the report.

Epicor Software

28 | Crystal Reports Course | Overview

Page 29: Epicor.instructor

Import BAQ Report

Use this program to move a BAQ report back into the manufacturing system. This option requiresthe creation of a new identifier for the report. You will also indicate whether or not this reportcan be edited within the BAQ Report Designer.

Test the BAQ ReportAfter you design your report, you need to test the user interface. Use the Test Report Formcommand 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 are displayed in the Report Options section. Usethe filters by clicking the Filters tab and selecting the records you need; the filter options youselect are then displayed in the Filter Summary section. All the sorts can be selected fromthe Sort By list.

Workshop - Test the BAQ ReportTest the BAQ report's user interface for the report created earlier.

If you closed the program, navigate to BAQ Report Designer.

Menu Path: Executive Analysis➤ Business Activity Management➤ General Operations➤ BAQ Report Designer

Instructor Note

Note that students should be able to use the standard report zAPInvHedOpen to completethis workshop.

1. Click the Actions menu and select the Test Report Form command.

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

2. Review the Selection sheet information for report options (Option Fields) and sorts andreview the Filter sheet for available filters.

3. Close the Report Form.Once the print screen has opened, Epicor creates a new datasource .xml file in theMfgsysdata\Reports\username directory which may also be used if the report requires thefull data rather than the sample data created in the next step.

Generate Sample DataThe Generate Sample Data command enables you to create data you can use to test thecurrent report. It runs the BAQ selected on the current report to generate data. This data issaved to the Sample Data Directory. The data can help to design the final layout of the reportwithin Crystal Reports.

Workshop - Generate Sample DataGenerate sample data to use when designing the layout in Crystal Reports.

If you close the program, navigate to BAQ Report Designer.

Menu Path: Executive Analysis➤ Business Activity Management➤ General Operations➤ BAQ Report Designer

1. Click the Actions menu and select the Generate Sample Data command.

Epicor Software

Crystal Reports Course | Overview | 29

Page 30: Epicor.instructor

The interface between Epicor and Crystal requires that a background "temp" .xml file iscreated. Once created, it becomes the datasource for the Crystal Report. The GenerateSample Data function creates that xml file.After the data is generated, a Sample data was successfully created. dialog box appears.

2. In the dialog box, note the path and the name of the data file (an .xml file).3. Click OK to confirm that the sample data was created successfully.

At this point, you have actually run the BAQ and the data that is generated into the xmlfile is available for Crystal to use. The sample data is designed to present a subset of theactual data - just enough for you to format the Crysal Report. It is always a good idea tocheck the number of records that were pulled by the initiall execution of the BAQ. The fullamount of data will be displayed once the report has been deployed.

Design Crystal ReportAfter you define the report using BAQ Report Designer, you are ready to design the report'slayout using the Crystal Reports application. You can launch this application from the Actionsmenu.

The Design Crystal Report command enables you to launch the current BAQ report withinthe Crystal Report application. This command causes the program to search for the CrystalReport .exe in the Crystal Report Executable path. When it finds this file, Crystal Reportslaunches.

Before you open your BAQ report in Crystal Reports, run the Generate Sample Data commandfrom the Actions menu to generate some sample data you can use with the report.

Workshop - Design the Crystal ReportThis workshop demonstrates the Crystal Report design function.

If you closed the program, navigate to BAQ Report Designer.

Menu Path: Executive Analysis➤ Business Activity Management➤ General Operations➤ BAQ Report Designer

Note This command is run only to demonstrate the Crystal Report design function. Inthis course, we focus on designing the BAQ Report interface in the system. For additionalinformation, refer to the Crystal Reports course.

1. Click the Actions menu and select the Design Crystal Report command.Crystal Report launches.

2. In the Crystal Report application from the Filemenu, select Exit to close the report window.

Deploy the BAQ ReportAfter you design the report, you can place it on the Main Menu. Use the Deploy BAQ Reportcommand to move the current BAQ report to the network. The program moves the report fromthe 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 definitionfor the report.

The style defines how this report will appear when it is displayed and printed. You can edit thesestyles in Report Style Maintenance.

Both Report Style and Report Data Definition are located under System Management - CompanyMaintenance.

Epicor Software

30 | Crystal Reports Course | Overview

Page 31: Epicor.instructor

Workshop - Deploy the BAQ ReportThis workshop shows how to use the Deploy BAQ Report functionality.

If you close the program, navigate to the BAQ Report Designer program.

Menu Path: Executive Analysis➤ Business Activity Management➤ General Operations➤ BAQ Report Designer

1. Click the Actions menu and select the Deploy BAQ Report command.If necessary, confirm all your actions in the appearing dialog boxes.

The .rpt file is placed in the Server Reports Directory on your server. You can now makethis BAQ report available to other users within your company by placing it on the MainMenu.

2. Verify that the report exists in Report Style Maintenance.

Menu Path: System Management ➤ Company Maintenance ➤ Report Style

3. Exit BAQ Report Designer.

Epicor Software

Crystal Reports Course | Overview | 31

Page 32: Epicor.instructor

Crystal Standard Report Wizard

Crystal Reports comes with several Report Creation Wizards that will walk you through thesteps to build a report. Our focus will be on the using the Standard Report Wizard as it relatesto building reports inside of Epicor.

Reports may be deployed by attaching to Epicor menu which will be discussed in a futureworkshop.

Instructor Note

Review the business case before completing the workshop. If the class size is small, completethe workshop before asking students to complete the workshop. If the class size is large, askstudents to complete the workshop as you complete the workshop. In either case, fully discussthe steps as they are completed.

Standard Report Wizard

Standard Report Wizard will step you through the various decisions required to lay the foundationof a basic report. The steps included are table selection, linking, selection criteria, grouping andtemplate usage. BAQ Report Designer reports are not a good candidate for the standard wizardas most of the steps are pre-defined by the BAQ Report Designer program.

Cross-Tab Report Wizard

Cross-Tab Report Wizard is used to define a report that takes a row of data and makes it acolumn. As an example, this type of report would be used to create a sales report that showstotal sales by Region - all the data comes from row information. More information is availablein Crystal Reports Help for this type of report which is beyond the scope of this course.

Mailing Labels Report Wizard

Mailing Labels Report Wizard is used to create a report that is printed on labels.

OLAP (Online Analytical Processing)

OLAP (Online Analytical Processing) is a data-mining type function. This type of report requiresdata built using the Crystal Enterprise OLAP features and is beyond the scope of this course.

Workshop - Define Early-Late Job ReportEven though we plan to generate this report using the Crystal Report Standard Wizard, thedatasource has to be created first. Each report requires a new report definition inside the BAQReport Designer. This workshop shows how to define BAQ Report Definitions for the new report.

Verify the Report Option Paths

Navigate to BAQ Report Designer.

Menu Path: Executive Analysis➤ Business Activity Management➤ General Operations➤ BAQ Report Designer

1. Verify the report paths are correct.

Epicor Software

32 | Crystal Reports Course | Crystal Standard Report Wizard

Page 33: Epicor.instructor

Verify the paths are correct for:

• Crystal Report Executiable• Sample Data• Local Reports Directory

2. Verify the Sample Data path is correct.3. Verify the Copy Report Locally check box is selected.

Enter the BAQ Report Header

1. Click New and select New Report Definition.2. In the Report ID field, enter EarlyLate (no spaces).

This automatically populates the Crystal Reports (.rpt) field.

3. In the Description field, enter Early-Late Jobs Report.4. In the BAQ ID field, serach for and select EPIC03-EarlyLate.5. In the Form Title field, enter Early-Late Jobs Report.6. Click Save.

Establish an Option Field

This report is to display records for incomplete jobs. An option field is used to limit the jobselection to those that are not flagged as complete.

1. Click New and select New Option Field.2. In the Option Field field, select JobHead.JobComplete and press Tab.3. In the Field Label field, enter Complete and press Tab.4. Verify the Compare Operator is =.5. Accept the default entry in the Data Type field.6. In the Option Field field, enter False to limit the jobs to those not completed.7. Click the Save icon.

Test the Report Form

1. Click the Actions menu and select the Test Report Form command.

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

2. Select the Print Preview icon from the Standard Toolbar to view.3. Review the Selection sheet information for report options (Option Fields) and sorts and

review the Filter sheet for available filters.4. Close the Report form.

Once the print screen has opened, Epicor creates a new datasource .xml file in theMfgsysdata\Reports\username directory which may also be used if the report requires thefull data rather than the sample data created in the next step.

Epicor Software

Crystal Reports Course | Crystal Standard Report Wizard | 33

Page 34: Epicor.instructor

Generate Sample Data

1. Click the Actions menu and select the Generate Sample Data command.The interface between Epicor and Crystal requires that a background temp .xml file iscreated. Once created, it becomes the datasource for the Crystal Report. The GenerateSample Data function creates that xml file. You do not see the full record count when thereport is first previewed inside Crystal Reports. This datasource is then used inside CrystalReports to pull tables and fields for the report.After the data is generated, a Sample data was successfully created. dialog box appears.

2. In the dialog box, note the path and the name of the data file (an .xml file).3. Click OK to confirm that the sample data was created successfully.

At this point, you have actually run the BAQ and the data that is generated into the xmlfile is available for Crystal to use. This is a good time to glance at the data being presentedto make sure it has pulled the query data you expected it to pull.

Design a Crystal Report

Note In order to demonstrate the Crystal Wizard, we will not use this feature at thistime. We will access the sample data file as a datasource within the wizard.

1. Click the Actions menu and select the Design Crystal Report command.Crystal Report launches.

2. In the Crystal Report application from the Filemenu, select Exit to close the report window.3. Click Save and exit the program.

Workshop -Create a Report Using the Crystal Report WizardThis workshop shows how to design reports using the Crystal Report Wizard.

BUSINESS CASE: Your Production Manager would like to have a report that shows the earlyor late status in days of all released production jobs currently scheduled. The report needs toshow any linked customer orders and the part they are ordering.

Access the Standard Report Wizard

1. From the Start menu, navigate to Crystal Reports.2. In the New Reports section of the Start Page, click Standard Report Wizard.

If the Crystal Reports Start Page does not come up when entering Crystal Reports, simplyclick on the New icon from the Standard Toolbar to begin the Standard Report Wizard.

Select Data Sources

1. In the Available Data Sources section, navigate to Create New Connection > ADO.Net(xml) and double-click it.The datasource file path window will open.

2. In the File path field, browse to the Sample Data folder.3. Select just created EarlyLate_Date.xml file and click Open.

Epicor Software

34 | Crystal Reports Course | Crystal Standard Report Wizard

Page 35: Epicor.instructor

4. In the File Path window, click Finish.

Select the Tables

1. In the Available Data Sources section, navigate to Create New Connection > ADO.Net(xml) > ReportDataSet.

Since we did not use the Design Crystal Report feature, the Crystal Standard Report Wizardrequires us to select the tables for the report.

2. Double-click BAQReportParameter, Company, and BAQReportResult tables to movethem to the Selected Tables section.

The Data screen displays the table(s) required for the report in alphabetical order.

3. Click Next to continue.

Review the Links

The relationship between the BAQReport Results and the other tables is not obvious to Crystalas there are few indentical fields. We will have to create our own links.

1. Arrange the tables so that BAQReportResult is under the Company table and theBAQReportParameter is on the right of the Company table.

2. In the BAQReportParameter table, find the Company field.3. Verify the Company field of the Company table has an link line (arrow) to theJobHead.Company field in the BAQReportResults table

4. In the Company table, click the Company field and drag and drop it on top of the Companyfield in the BAQReportParameter table.

You should see a line created between the two tables to indicate a link has been made.

5. Double click on the link between Company and BAQReportParameters table to changethe join options.

6. From the Join Types section, select Left Outer Join and click OK.

Note that a left outer join is needed here because all BAQReportParameter fields will beused regardless of matches found from the other tables.

7. Click Next.

Review the Fields

1. In the Available Fields section, select the BAQReportResult table.2. Move the fields to the Fields to Diplay section.

Double-click all these fields:

• JobHead.DueDate• JobHead.JobNum• JobHead.PartNum• JobHead.ReqDueDate• JobProd.OrderLine• JobProd.OrderNum• JobProd.OrderRelNum

Epicor Software

Crystal Reports Course | Crystal Standard Report Wizard | 35

Page 36: Epicor.instructor

Reorder the fields using the up and down arrows above the Fields to Display box ifnecessary.

3. Click Next.

Review the Optional ChoicesThe Crystal Reports Wizard provides three other choice screens which do not apply to our report.The are described below:

Instructor Note

Explain to the students that no action is required on these next screens. Advance througheach by pressing the Next key after a short discussion of each.

Grouping

The group selection screen of the wizard allows the data to be grouped by a specific field, orfields. Each group can then be summarized to provide a sub-total by the group as well as providea grand total. Any available field can be totaled by Crystal Reports. Also, many summary typesare offered, depending upon the type of field being summarized. A later workshop addresseshow to do this manually.

Record Selection

Record selection is used to limit the records coming into the report. The Filter field of the BAQReport Design definition is also used to limit the record. The report definition has declares thedata is to be limited by the company and to select incomplete jobs.

Additional record selections may be made from the fields in the BAQReportResult table, howeverwe will not do that at this time.

Report Templates

Crystal Reports provides pre-defined templates for use as formatting options. A template canalso be created from a customer made report file. No template is to be used for this report.

Save the Report

1. Click Finish to display the report.2. Save the report as EarlyLateJob.rpt in the Reports folder.

Note Crystal Reports will Save Data with Report unless that option is turned off.You may do so for this report only — from the File menu under Report Options,disable Save Data With Report. To disable this feature for all future reports, openthe File menu, select Options and then select Reporting. Turn off Save data withreport.

Resize Field Lengths

The JobNum and PartNum fields are quite long and room is needed to enter a calculated fieldshowing early/late days. Also, there is no report title. We will focus on making these changes,although many other adjustments could be applied as well. The next portion of this workshopis report adjustments.

1. Navigate to the Design sheet.2. Press the Ctrl key and click the JobHead.JobNum field in the Detail section and theJobHead.JobN field in the Page Header section.

Epicor Software

36 | Crystal Reports Course | Crystal Standard Report Wizard

Page 37: Epicor.instructor

Both fields will now have a border around them.

3. Click and hold the right border and move it to the right to shorten the length of both fields.4. Repeat the process with the JobHead.PartNum field.

Notice that there is now additional room to the right of each of the fields adjusted.

Move the Fields

1. Select the guideline arrow in the ruler attached to the JobHead.PartNum field and left-clickthe mouse.

2. Move the PartNum fields to the left while staying within the ruler. Leave at least one gridof space between the JobHead.JobNum and JobHead.PartNum fields.

3. Repeat the process for the JobHead.DueDate and JobHead.ReqDueDate fields.

There is now room to insert a calculated field for early/late days.

Insert a Field

Insert a calculated field using the Field Explorer that is usually located on the right side of thescreen.

1. In the Field Explorer, right-click the x+1 Formula Fields line and select New.You can alternatively select New from the Button bar tool.

2. In the Name field, enter Early-Late and click OK to open the Formula Workshop – FormulaEditor screen.a) Under Report Fields, double-click the BAQReportResult.JobHead.DueDate field toselect it in the formula.The field appears in the section with the appropriate brackets selected.

b) Under Operators > Arithmetic, double-click Subtract.c) Under Report Fields, double-click the BAQReportResult.JobHead.ReqDueDate field.d) Click Save and close.

3. In the Field Explorer > x+1 Formula Fields, select the Early-Late formula field anddrag and drop it into the empty area of the Details section.

A field header will be created in the Page Header section at the same time.

4. Click Save.

Add a Report Title

When the Report Wizard created the report and found that no data was to be placed in thereport header, it automatically suppressed the section. The next steps remove the suppression.

1. On the Design sheet, find the Report Header section on the left-hand side of the screen.2. To increase the size of the Report Header section drag the bottom border down a bit.3. Insert a text object.

a) On the Insert toolbar, click Insert Text Object.

The curser becomes a cross shape.

b) Click in the Report Header section.c) Inside the text object’s rectangle, type Early – Late Jobs Report as the report titlewhen the curser drops inside the text object’s rectangle.

Epicor Software

Crystal Reports Course | Crystal Standard Report Wizard | 37

Page 38: Epicor.instructor

d) Click outside the text object.

4. Move the text object to the left-hand side of the Report Header section.5. Change the title font.

a) Change the font size to 14 point.b) Expand the text object to accommodate a larger font.

6. Save the report.7. Navigate to the Preview sheet to preview the report.

Instructor Note

Remind the students that the data displayed is not the complete result set of the BAQuntil that BAQ is deployed. All the data will display the next time the report is displayedafter deployment.

This is meant to be a demo of how a simple report can be made in the Crystal ReportWizard. Other formatting, such as column heading definition, are discussed in futureworkshops.

8. Exit the program.

Epicor Software

38 | Crystal Reports Course | Crystal Standard Report Wizard

Page 39: Epicor.instructor

Database Concepts

This section introduces database topics related to the custom report generation process. Topicscovered will include discussion on the following:

• Table and field name identification.

When writing reports using Crystal Reports, a fundamental requirement is to identify thetables within the database that contain the data required for the report. Additionally, youmust identify the field names used to store that data.

• Data dictionary viewer.

This tracker is a source for determining probable join fields based on a dataset definition fordirectly related tables.

• Table joining/linking processes.

When two or more tables are used to query data, a link has to be defined in order to pullrecords from both tables. This linking process involves identifying which table is to be theparent and which is to be the child. The Parent/Child relationship is then further defined byfinding common fields to use as matching criteria for record selection. This section discussestopics relative to table join concepts, requirements, and the use of indexed fields to createthe table link.

• Join types.

Once linking processes are understood, the discussion then turns to the three types of joinsthat are available for use when writing Crystal Reports or queries.

Instructor Note

Log on with the username of Manager and password of Manager. This login has permissionto use the Customization tool.

Identify Table and Field NamesThe first requirement of any report or query is to locate the data. The Epicor 9 database is arelational database and therefore all data is stored in a collection of tables and fields.

There is one common question that occurs when writing reports or queries, especially for thereport writer who is unfamiliar with the database structure and naming conventions. Thisquestion is:I know where the data is entered and located, but where do I find the tableand field name?

This is a normal question, and the answer becomes easier over time due to exposure to thedatabase. For the purposes of writing a custom report or query, you already know where certaindata crucial to the report is entered.

What is not necessarily known, however, is the specific database table or field names for thedata. There are tools in the system to aid in the table and field identification. Those tools includeaccessing online field-level help to see technical details, the Customization Tools, and the DataDictionary Viewer.

Epicor Software

Crystal Reports Course | Database Concepts | 39

Page 40: Epicor.instructor

Using the Online Technical Field HelpThe Field Help feature is a quick reference tool. It provides a brief description of the field andalso a technical property reference for the selected field.

To begin the field help, select the specific field in the interface and then Field Help from theHelp menu of any screen. A tree view appears on the left side of the screen with two headings,Field Help and Technical Details (if you have permission to view technical details), for thatspecific field.

The Field level Help screen is divided into to sections:

• Field level help is the text description of this field taken from the Help system. The fieldhelp can be used as a learning tool, as it helps to get immediate documentation on eachfield.

• Technical detail is the field's data dictionary information. You may need the technicalspecifications of a field for building BAQs, BPM methods, and when using other advancedfunctions of the application.

Note You can view technical details only if you have the permission to access thecorresponding business object. This permission is set in the Process SecurityMaintenance program, for the bo.DataDict business object.

Workshop: Using Online Field HelpWhen asked to create a query or a report, the type of information needed in the query and atime frame is usually all the information received. Next comes the challenge of determiningwhere the data can be found. It's all about tables and fields.

Every user interface (UI) form is a mini database containing a collection of tables and fields todisplay data. The first thing to determine is how or where the information entered into Epicor.

For example, a query or report is to be built to show a parts listing that displays part and partbin information. Ask yourself the following questions:

1. What kind of information might be included in a query or report that is to display parts?Write down the probable fields.

2. Where is information on parts entered? Answer: Part Maintenance screen.3. What is a part bin? Answer: a place in the warehouse that holds parts.4. Where is the part bin information entered or displayed? Answer: in the WarehouseMaintneance table or the Warehouse Bin maintenance table. It is viewed on thePlants-Warehouse-Bins sheet of the Part Entry Screen.

Use the online field help to find the table and field names.

Navigate to the Part Maintenance program

Menu Path: Material Management ➤ Inventory Management ➤ Setup ➤ Part

1. Set the cursor in the part number field. Select Field Helpfrom the Help menu .The field help tree opens and positions itself on the left side of the screen. It automaticallyopens in an undocked position.

2. Dock the Field Help window by moving the cursor to the Field Help tab and then click thepush pin icon.This docks the field help tree on the left of the screen, however it can be undocked andpositions like any other sheet in the user interface (UI).

3. Click the part number field and then click the Technical Details sheet of the Field Helptree.

Epicor Software

40 | Crystal Reports Course | Database Concepts

Page 41: Epicor.instructor

The Technical Detail sheet displays the Data Dictionary information for the selected field.The properties that are display are very helpful when creating BAQs. These properties arediscussed in the section dedicated to the Data Dictionary Viewer. Of importance to the BAQwriter are:

• Field Name: This property presents actual name of the field as it is known to Epicor 9.This is the name used in all expessions.

• Epibinding: This property displays the table and field name of the field in focus. In thiscase, the field is called Part.PartNum which means the table you want to use is the Parttable and the Field you pull in the query is the part num. The syntax is alwaysTablename.Fieldname.

• DBField: Indicates the database field property which also displays the table.name.• Format: The Progress database format for this field and the the number of charactersthat field is limited to. In this example it is a character field with and has 50 characters.

• Like: The like property is for validating a BAQ Search and also to generate Foreign KeyViews to indicate the common field between two tables or datasets.

4. Select the Plants sheet , the Warehouses-Detail sheet and then set the cursor in thePrimary Bin field.The properties populate with the data on this field. Write down the table andfield:_________________________.

Some field information can be found in several tables. Is the query going to includewarehouses? If so, then perhaps this field is useful. If not, the bin information has to comefrom another source.

Note Often the data is stored in multiple places and the table selection depends onthe purpose of the query. This example is to present a parts listing with part binlocation.

5. Select the Plants -Warehouse-Bin Information sheet. Set the cursor in the Bin field onthis sheet.Write down the table and field information for this field: _____________________

6. Select Close from the Field Help window.

The Technical Details of the field help are quite valuable in helping to understand the tablestructure of the database. Keep in mind that the data may reside in mutliple tables. The querytopic will dictate where the data comes from.

The customization feature is another good way to locate table sand fields.

Customization ToolsYou can customize nearly every program within the application. A powerful tool, customizationscan save you time and money, as these modifications let you directly match the application toyour business needs.

The application offers you a variety of customization tools. You can add controls like text boxesand lists – which are then linked to a data source you can select. You can also create new sheetsthat you can make available to all users, specific users, and even different companies. You canalso activate your own customized code through events or new buttons; this feature lets yourun processes that are unique for your company.

Within this course the Customization is used as a look-up tool to help identify table and fieldnames that house the data when you want to write a custom report.

Example To create a report on shipping activity listing the tracking number assigned tothe shipment, use the Customization Tools to locate and identify the table and field namesthat house this data.

Epicor Software

Crystal Reports Course | Database Concepts | 41

Page 42: Epicor.instructor

The system runs in two modes - Run Mode and Developer Mode. Normally you use theapplication in Run Mode. This means the application sheets are used for normal activities likedata entry, operation processes, and report generation.

Important In order to customize a program, your user record must be set up to allowcustomization rights. Your adminstrator assigns you these rights within the User AccountMaintenance program.

Workshop - Reference Customization ToolsThis workshop demonstrates how to reference Customization Tools.Activate the Developer Mode

Important Developer Mode will not be available unless the user has Customizationpermission. This is given by selecting the Customize Privileges check box on theSecurity sheet of the User Account Maintenance program.

Menu Path: System Management ➤ Company Maintenance ➤ User

With this permission, any sheet or window is modifiable, so use caution when grantingthese priviliges.

From the Options menu, select Developer Mode.

Identify Table and Field NamesNavigate to Customer Shipment Entry.

Menu Path: Material Management ➤ Shipping / Receiving ➤ General Operations ➤Customer Shipment Entry

1. Select the Header sheet.2. If asked to clear this form, click Yes.3. Verify the Tracking Number field is in view.

Move the Customization Tools Dialog (default) window to a location that does not blockvisibility of the field used to hold tracking number information.

4. Identify table and field names.a) In the Customer Shipment Entry window, click the Tracking Number field.b) In the Customization Tools Dialogue (default) window, view the table and fieldnames in the DataSource and DataField fields.

The DataSource field indicates that the Tracking Number field is located on the ShipHeadtable. The DataField field indicates that the field name for the Tracking Number field isTrackingNumber. So, the full identifier for this Tracking Number field isShipHead.TrackingNumber.

c) On the Customer Shipment Entry window, navigate to other fields to view theDataSource (table) and DataField (field) values for these fields.

5. Experiment with a few other screens such as the Parts Maintenance or Order Entryscreens

6. Exit the programs.

Once the table candidates have been selected for the query, the the Data Dictionary Viewer isa good tool to help understand what the tables are and any possible join fields.

Activate the Run Mode

1. From the Options menu, select Developer Mode.

Epicor Software

42 | Crystal Reports Course | Database Concepts

Page 43: Epicor.instructor

2. To verify that you are in this mode, click on the Options menu again.The Developer Mode command is not selected now.

Data Dictionary ViewerThe Data Dictionary Viewer lets you find and review details of each field and table within thedatabase. It helps you better understand the purpose and data values of every field.

Menu Path: System Management ➤ Data Dictionary Viewer

Use the Data Dictionary Viewer program, for example, to identify the fields and tables you wantfor a customization or a custom report. This program is also an aid during upgrades, as youcan view the current database structure to compare it against a previous database version.

Note

To access this report, select Print Field Definitions from the Data Dictionary Viewer'sActions menu and define the report parameters on the Data Dictionary Field Reportwindow.

Table Sheet

Use the Tables sheet to find and select the database table you wish to review.

The Data Dictionary is organized by tables. A table is a set of fields that contain relatedinformation.

Example The Customer table is used to store all your customer records. The OrderHedtable is the table that records your Order Header records.

Instructor Note

Review the help descriptions for these fields:

• Table• Description• Indexes Grid• IndexName• IndexFields• Display VB Fields• Display Format

Fields Sheet

The Fields sheet displays specific information on each selected field. All the values for a selectedfield – like format, label, and description – are displayed on this sheet.

Each table is made up of various fields. These items are the individual pieces of informationassociated with that table. Each field has a unique name.

Example The customer table includes the customer's identifying code (CustNum), thecustomer's name (Name), and other specific details about the customer.

Epicor Software

Crystal Reports Course | Database Concepts | 43

Page 44: Epicor.instructor

Instructor Note

Review the help descriptions for these fields:

• Field Name• Format• Decimals• Extent• Type• Description• Initial Value• Column Label• Label• Mandatory• Case Sensitive• Display VB Fields• Display Format

Instructor Note

Tell students that the Data Dictionary Viewer is a supplemental form of online help becauseof the data detail and definition it provides.

Workshop - Use the Data Dictionary ViewerThis workshop demonstrates how to use the Data Dictionary Viewer program.

Navigate to the Data Dictionary Viewer.

Menu Path: System Management ➤ Data Dictionary Viewer

1. In the Table field, enter OrderHed, and press Tab.The information is populated on the Fields sheet and Tree view.

2. View the table details.a) Verify you are on the Tables sheet.b) In the Description field, read the table description.c) In the Indexes grid, view the IndexFields column.d) In the Display Format section, select Alphabetic.

3. View the field details.a) Navigate to the Fields > Detail sheet.b) In the Field Name field, select DiscountPercent.c) View the information and answer the question: Can this field be left as zero?

4. Click Clear.5. Repeat steps for the Customer.CreditLimit table and field.6. Exit the program.

Table LinkingOne necessary step in the table selection process is to link tables together. Links are createdusing one or more common fields to aid in the by selection of field data from multiple tables.

Epicor Software

44 | Crystal Reports Course | Database Concepts

Page 45: Epicor.instructor

Table Links

In general, table linking is matching related records from one table to another table's records.This linking process involves using a common field between the selected tables. For example,if linking a Quote table and a Customer table, connect the tables so that each quote is matchedup with the customer on the quote.

Reporting or Querying tools use this connection to identify related records from one table withthose from the other. With regard to the above example, the linking process ensures that thedata in each line of the report refers to the same quote.

Table Link Requirements

Table link requirements involve a process of linking from one table to another. In this scenario,the primary table is the from table, whereas the to table is used as a reference for the primarytable to lookup specific records. For example, if the Quote was the primary table, the queryingor reporting tool chronologically goes field by field through the Quote table and searches formatching records in the second table, which may be Customers, until all fields are evaluated.

Link Types

The major link types used are one table to another, or one table to multiple other tables.

One table to another

This link type involves the primary table and lookup table having a one-to-one relationshipbetween their records.

One table to multiple others

This link type involves the primary table and lookup table having a one-to-many relationshipbetween their records.

Indexed Fields

An index field points to the location of the data. It is a named path designed within the databaseto quickly locate and store data, or easily retrieve it in a table. The index name and path, orindex order, are identified in Data Dictionary and in the online Field Help-Technical Detailswindow.

Note Always use the Company field as it is the FIRST indexed field, and because it isat the top of the system table hierarchy. Each company’s data is stored and separatedfrom other company data by using the Company ID field. Since each and every tableuses the Company field, it is an indexed field and must be selected as one of the fieldsto use in a join.

Instructor Note

Tell students that there are no exceptions to this rule! The Company field must be selectedas a join field pair when linking tables, because Company is at the top for table hierarchy inthe system. Your report will not give the correct results when the field is not used in a join.

Dataset Relationships TrackerThe Dataset Relationships Tracker displays the relationships between the system's datasetswithin a dashboard format. Use this table if you are creating custom reports and queries, as itcan help you create joins between the tables within the query or report. This dashboard issimilar to the Related Tables functionality that was available in previous versions.

Menu Path: System Management ➤ Dataset Relationships

Epicor Software

Crystal Reports Course | Database Concepts | 45

Page 46: Epicor.instructor

Unlike other dashboard trackers, the Dataset Relationships Tracker automatically groups itsgrid by Dataset ID, Parent Table, and lastly, by Child. The Parent-Child table then displaysthe Parent field, its related Child field, and its Sequence. This helps illustrate the hierarchywithin your database.

Example The OrderHead table is the parent table to the OrderDtl table, or the Part tableis the parent table to the PartPlant table.

Advanced Search Sheet

The Advanced Search feature is used to locate specific field data. Enter a value for the DataSetID field, Parent Data Table field, or Child Data Table field. Click the Refresh button tosearch for the specific value(s).

r.

Dataset Relationships Sheet

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

Instructor Note

Provide the following exercise to test understanding:

For purposes of writing a custom Crystal parts report, most of the data required is from thePart table with some data required from the PartLot table.

The two tables: Part to PartLot require linking. What are the fields pairs used to join thetables?

Workshop - Display the Dataset Relationships TrackerComplete the steps below to display the Dataset Relationships Tracker.

Navigate to Dataset Relationships.

Menu Path: System Management ➤ Dataset Relationships

1. Determine the fields to use in a join.

Note The Dataset Relationships program includes only tables directly related toeach other.

a) Select the Advanced Search sheet.b) In the Parent Data Table field, enter Part, and press Tab.c) In the Child Data Table field, enter PartLot, and press Tab.d) Click Refresh to display the part Dataset ID.

When the green Refresh All button is selected, any indicated search criteria is erased,and all related tables will populate on the Dataset Relationships sheet.

e) Select the Dataset Relationships sheet to view the relationship between the Part andPartLot tables.

Two sequenced lines display on the Dataset Relationships Grid indicating that thetwo fields of Company and PartNum must be used in the join to link these tables. Thefields appear in the Parent field and Child field columns.

2. Repeat the process.

Epicor Software

46 | Crystal Reports Course | Database Concepts

Page 47: Epicor.instructor

Determine the fields for the OrderDtl parent data table and the OrderRel child datatable.

a)

b) List the join fields on a separate piece of paper to compare with the class.

Instructor Note

1. Explain that the Dataset Relationships Tracker covers directly related tables.2. This leaves room for discussions on how to join tables not directly related to eachother. When the Dataset Relationships Tracker returns no records, the table joinmust be manually determined.

If an Advanced Search returns no dataset it means the tables are not directly related. It doesnot mean they can't be joined. The Data Dictionary Viewer can be consulted to determine theprobable join fields.

Join TypesThis section defines the three available types of joins, and in the process identifies when eachtype is used during the report creation process. The common types of joins are Inner Joins,Left Outer Joins, and Right Outer Joins.

Inner Joins

An inner join, also known as an equal join, is the standard type of join. The report output froman inner join includes all the records in which the linked field value in both tables is an exactmatch. Records from either table that do not have a match in the other table are excluded fromthe report. The following diagram shows this relationship:

One example is joining the Customer table to the OrderDtl table, to create a view of customersand the orders they have placed. In this case, only customers with placed orders will be includedin the report. Records for any customers who have not placed orders will be excluded.

This join is typically used when the report needs to display only matching records between theprimary table and the lookup table.

Left Outer Joins

The report output from a left outer join includes all the records in which the linked field valuein 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. Crystal Reports fills inthe record fields with empty values when there is no exact match. The following diagram showsthis relationship:

Epicor Software

Crystal Reports Course | Database Concepts | 47

Page 48: Epicor.instructor

For example, when using a left outer join to view all customers and the orders they have placed,you also get a row for every customer who has not placed any orders. These customers appearwith blanks in the fields that would otherwise hold order information.

Right Outer Joins

In general, a right outer join works exactly the same as a left outer join but in reverse. Thereport output from a right outer join includes all the records in which the linked field value inboth 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. Here again, CrystalReports fills in the record fields with empty values when there is no match. The following diagramshows this relationship:

So, in the example, when using a right outer join to view all customers and the orders theyhave placed, you also get a row for every order without an assigned customer. These ordersappear with blanks in the fields that would otherwise hold order information.

The use of right outer joins should be discouraged, as your report may always be rewritten touse left outer joins, which tend to be more portable and easier to read and use.

Epicor Software

48 | Crystal Reports Course | Database Concepts

Page 49: Epicor.instructor

Custom Report Design Tools

To illustrate use of the custom report design tools, a Manufactured Parts Listing report willbe created. The report must first be defined in the BAQ Report Designer as a new ReportDefinition. Once defined, the BAQ Report Designer Action Menu is used to transfer the data tothe Crystal Report. At that time, the datasource is connected and the report is formatted. Onceformatted, exiting Crystal Reportsreturns to the BAQ Report Designer for further deploymentand testing.

Although Crystal has selection critera, prompts, and filters, these actions are created inside theBAQ Report Designer. This report example creates Report Option field, Sorts, and Filters thatare required after the report has been formatted using Crystal Reports XIR2.

This workshop introduces elements such as manual insertion of fields, using multiple groups,subtotals and grand totals. When this workshop is completed, users are able to design reportsfrom the Blank Design tab more quickly than the Wizard tool allows. Students decide forthemselves when to manually create reports versus using the Standard Report Wizard, andhow to blend the two approaches.

Instructor Note

Review the business case before completing the workshop. If the class size is small, completethe workshop before asking students to complete the workshop. If the class size is large, askstudents to complete the workshop as you complete the workshop. In either case, fully discussthe steps as they are completed.

Workshop - Define Manufactured Parts Report in VantageThis workshop shows how to define BAQ Report Definitions for the new report.

Verify the Report Option Paths

Navigate to BAQ Report Designer.

Menu Path: Executive Analysis➤ Business Activity Management➤ General Operations➤ BAQ Report Designer

1. Verify the report paths are correct.Verify the paths are correct for:

• Crystal Report Executiable• Sample Data• Local Reports Directory

2. Verify the Sample Data path is correct.3. Verify the Copy Report Locally check box is selected.

Enter the BAQ Report Header

1. Click New and select New Report Definition.2. In the Report ID field, enter MfgParts (no spaces).

Epicor Software

Crystal Reports Course | Custom Report Design Tools | 49

Page 50: Epicor.instructor

This automatically populates the Crystal Reports (.rpt) field.

3. In the Description field, enter Manufacturing Parts Listing.4. In the BAQ ID field, enter or browse for the EPIC03-MfgParts query.5. In the Form Title field, enter Manufacturing Parts Listing.

Test the Report Form

1. Click the Actions menu and select the Test Report Form command.

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

2. Select the Print Preview icon from the Standard Toolbar to view.3. Review the Selection sheet information for report options (Option Fields) and sorts and

review the Filter sheet for available filters.4. Close the Report form.

Once the print screen has opened, Epicor creates a new datasource .xml file in theMfgsysdata\Reports\username directory which may also be used if the report requires thefull data rather than the sample data created in the next step.

Generate Sample Data

1. Click the Actions menu and select the Generate Sample Data command.The interface between Epicor and Crystal requires that a background temp .xml file iscreated. Once created, it becomes the datasource for the Crystal Report. The GenerateSample Data function creates that xml file. You do not see the full record count when thereport is first previewed inside Crystal Reports. This datasource is then used inside CrystalReports to pull tables and fields for the report.After the data is generated, a Sample data was successfully created. dialog box appears.

2. In the dialog box, note the path and the name of the data file (an .xml file).3. Click OK to confirm that the sample data was created successfully.

At this point, you have actually run the BAQ and the data that is generated into the xmlfile is available for Crystal to use. This is a good time to glance at the data being presentedto make sure it has pulled the query data you expected it to pull.

Design a Crystal Report

1. Click the Actions menu and select the Design Crystal Report command.Crystal Reports launches.

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.4. Select the Ellipsis (...) to browse for the xml report using the path toMFGSYSDATA\Reports\MANAGER\BAQ Report - MfgParts-XXXXX.xml.

5. Select the BAQ Report - MfgParts-XXXXX.xml file to open.

XXXXX is a unique number.

Using this .xml file displays all the records returned by the BAQ, rather than a sampling asseen when using the Sample Data .xml file.

Epicor Software

50 | Crystal Reports Course | Custom Report Design Tools

Page 51: Epicor.instructor

Everytime the Test Report function is run, a new .xml file is created in this directory. Ifthere are more than one choices, then select the most recent date.

6. Click Finish.7. Update information.

a) In the Current Data Source section, highlight the ReportDataSet.b) In the Replace with section, highlight the DynamicReportDataSet.c) Click Update.d) In the Map Fields window, click OK.

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

Add a Report TableAdd the BAQReportResult table to the report tables.

We just connected the datasource to the Crystal Report. The datasource becomes a mini-databaseof information and will include three tables: Company, BAQParameters and BAQReportResult.Specific tables of the BAQ (like Part, Part Bin and Warehouse) are not displayed, but areincorporated into the BAQReportResult table.

Crystal Reports reads the datasource and then provides access to the tables and fields insidethe datasource for additional functionality in the Report. Every table and field is fair game foruse in sorting, formulas/functions and other functions such as parameters directly inside ofCrystal Reports. Following is a brief explanation of the purpose of each of the three tables:

• Company Table: Company is the highest level in the hierarchy of the Vantage Database.The Company table includes the Company field, the Company Name and the language usedin the BAQ. Fields from this table are rarely used in Crystal reports, however they areimperative to the foundation of the BAQ table joins.

• BAQReportParameter Table: This table is populated with the Options, Sorts, and Filtersthat you defined inside the BAQ Report Designer. As an example, there are five fields insidethis database that actually populate with the Filter data data (filter1 through filter5) and aretherefore available to use inside Crystal reports for formulas, parameters etc. Also, like allEpicor tables it includes many user defined fields.

• BAQReportResults Table: This table populates with the results of the BAQ itself once ithas been executed. Crystal reads this table and then all the fields w are displayed using thesyntax of table. For example, Part.PartNum; PartBin.BinNum.

Once the datasource is connected, only the Company and the BAQParameter tables are includedin the available tables.Use the Database Expert to bring in the BAQReportResults table.

1. From the Database menu, select Database Expert.2. Enter data information.

a) Verify the Data sheet is opened.b) In the Available Data Sources section, select Create New Connection > ADO.Net(XML) > BAQReportResult.

c) Click the right arrow to move the selected item to the Selected Tables section.

3. Enter link information.a) Select the Links sheet.b) Double-click the link line between the Company table and BAQReportParameter table.c) In the Join Types section, select Left Outer Join, then click OK twice to return to theBAQ Report Designer.

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

Epicor Software

Crystal Reports Course | Custom Report Design Tools | 51

Page 52: Epicor.instructor

d) Click OK to accept the links.

4. Save and ensure the name of the report is MfgParts.rpt. You are now ready to format thereport using Crystal Reports.

Workshop - Create a Manufactured Parts Listing ReportA new report definition must be defined in the BAQ Report Designer and connected to an existingBAQ before you begin this workshop. In this workshop, the Manufactured Parts Listing reportis designed using custom design tools. Many of the same screens used with the Standard ReportWizard will be encountered; however, the main focus in this workshop is to create the reportmanually in the Design window.

BUSINESS CASE: You need to create a report that displays your manufactured parts listingthe on-hand quantities. The report should group the parts by warehouse and part numbers.

Insert and Resize Fields

This step illustrates how to insert and resize fields, their column headers and other objectsusing the Design window. When Crystal first opens after connecting to the datasource severalfields will appear in the Page Header section, however they are not necessary for this report.

1. In the Page Header section, hold Ctrl and click Print Date, Page N of M, and ReportTitlespecial fields to select them.By default Crystal Reports generates special field that are replaced with variables. Thesefields are part of the base template for a blank report and are not required for this report.

2. From the menu bar, open Field Explorer.3. Use Field Explorer to insert the fields from the BAQReportResult table.

For these fields select the field name, drag it to the Design area and drop it within theDetails section of the screen spacing them as necessary:

Instructor Note

Note that there are two ways to insert fields:

• The first one is:

1. Select the field name and click the Insert button.2. Move the mouse pointer to the desired location.3. Left-click to position the field where desired within the Details section.

• The second one is to:

1. Select the field name.2. Drag it to the Design area and drop it within the Details section of the screen.

• Part.PartNum• Part.PartDescription• Part.MfgComment• PartBin.BinNum• PartBin.OnHandQty

4. Click Print Preview to view the field

The data displayed within the report is minimal if the datasource is the sample datagenerated in the BAQ Report Designer definition stage. The record count that in the sample

Epicor Software

52 | Crystal Reports Course | Custom Report Design Tools

Page 53: Epicor.instructor

datat is minimal, however, once deployed the report will show all the data you expect.. Youonly need a subset to format the report, however, if you need to see all the data, applieswill be smaller than the true datasaet when then

If the .xml datasource is used from the MFGSYSDATA\Reports\MANAGER\ directory thenthe full set of data is displayed in Preview Mode.

Note that the OnHandQty field may not be wide enough to display all the data. This isevidenced by the cross-hatching that appears when not wide enough.

5. Select the Design sheet to return to the Design window for field resizing.6. Shorten the BinNum column header and field width.7. Widen the PartBin.OnHandQty column header and field width.8. Click Save.

Rearrange the Fields

Since the report is sorted by part number, there is no need to move this field. However, wewant the part description to display next, followed by bin number, quantity and finally thecomment field. There are a number of ways you can rearrange these fields. The steps belowillustrate one efficient way to accomplish these moves.

1. Click on the guideline attached to the left side of the Part.MfgComment field and itscolumn header.Drag and drop this tab as far to the right as possible. It will overlap other fields while makingthe other changes.

2. Drag and drop the guideline attached to Part.PartDescription to the left until it is almosttouching the Part.PartNum field.

3. Drag and drop the guideline attached to PartBin.BinNum to the left until it is almosttouching the Part.PartDescription field.

4. Drag and drop the guideline attached to PartBin.OnhandQty to the left until it is almosttouching the PartBin.BinNum field.

5. Drag and drop the Part.MfgComment guideline from the end of the report to the left toposition it beside PartBin.OnhandQty.

6. Reduce the width of the PartNum field and column header and move the other three fieldsfarther to the left.

7. Click Save.

Enter Report Groups

The report has been sorted by part number and quantity on hand; however, a quick previewof the report may show that all of the numbers run together on each page. Further, it cannoteasily be determined how many of each part number is on hand. In other words, the report ismerely a nicely sorted listing of database records. There is no useful information for the readeryet.

Creating groups based on the warehouse and part number field automatically creates a separategrouping of records for each part number with a heading for each group and a space betweenthe groups making the report easier to read. In addition, once the report has one or moregroups inserted, summaries can be added to generate useful information.

1. Click Insert Group.2. On the Common sheet, select the BAQReportResult.Warehse.Description field.

Epicor Software

Crystal Reports Course | Custom Report Design Tools | 53

Page 54: Epicor.instructor

This should be located toward the bottom of the list under the BAQReportResult.Whsesection. When the report is printed, the records are sorted and grouped by this selection.

3. On the Options sheet, select the Customize the Group Name Field check box.4. Click the Choose From Existing Field option and find the Warehse.Description field.5. Select both the Keep Group Together and Repeat Group Header on Each Page check

boxes.

The Keep Group Together option can be considered optional if it fragments the report.Simply click the Group Expert icon and deselect this field.

6. Click OK to save the group and return to the Design window.7. Repeat the process for the second group of BAQReportResult.Part.PartNum.8. Click Save and preview the report.

Modify the Group Header PreviewA group header is automatically generated for each grouping created.

1. To resize the group header, press Shift and then the left arrow key repeatedly until thefield has been sized as desired. You can also grab the middle handle and stretch the columnout with the mouse

2. Select the Preview sheet to view the report with the new group headings.

To the far left of the Preview window, note the Group Tree. The Group Tree shows allgroups that have been established for the report in a Windows Explorer type format.

3. Within the Group Tree window, click any particular warehouse or part number.4. To turn the Group Tree on and off, either click the Toggle Group Tree icon on theStandard toolbar, or select Group Tree from the View menu.

The report section identifications such as RH (for Report Header) and GH1 (for Group Header1) in the gray area to the left of the Preview window. Right-click an ID to view the availablefunctions for these sections.

Insert Summary for a Numeric Field

1. Select the Preview sheet.2. Scroll over to the PartBin.OnhandQty column.3. Right-click any value in that column and select Insert > Summary.

The Insert Summary window displays.

4. Verify that PartBin.OnHandQty is in the Choose the field to summarize field, and Sumis in the Calculate this summary field.

5. Select the Add to All Group Levels check box.6. Click OK to insert the summaries into the report.7. Scroll through the Preview screen and examine the subtotals for the various part numbers

(Group #1 and #2 values)The column may not appear wide enough to fit all of the quantity amounts or the subtotals.If the PartBin.OnhandQty field and column header have not been resized, this may bedone now

8. Click Save.

Epicor Software

54 | Crystal Reports Course | Custom Report Design Tools

Page 55: Epicor.instructor

Insert Summary for a Text Field

The subtotals inserted so far are just a special type of summary. However, any field can besummarized in various ways based on the field type. In this step, you will summarize a textfield, Part.PartNum with a Distinct Count.

1. Right-click any value in the Part.PartNum column and select Insert > Summary.2. Verify that Part.PartNum is in the Choose the field to summarize field, and Distinctcount is in the Calculate this summary field.

3. Select the Add to All Group Levels check box.4. Click OK to insert the summaries into the report.5. Click Save.6. Preview the new report, save, and exit Crystal Reports.

This returns you to the BAQ Report Designer.

Deploy the Report

1. Click the Actions menu and select the Deploy BAQ Report command.If necessary, confirm all your actions in the appearing dialog boxes.

2. Record path where the report was placed ______________________.This path would be important if this report was going to be published to the Main Menu.

Epicor Software

Crystal Reports Course | Custom Report Design Tools | 55

Page 56: Epicor.instructor

Add Presentation Quality to Custom Reports

There are certain elements that may be added to a report to give it presentation quality, thusmaking the report more readable. Using Crystal Report's custom report design tools, thepresentation-enhancing elements 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 ReportsThis workshop shows how to add borders to Subtotal and Grand Total fields and to insert textobjects, such as labels, to clarify the report’s data for the user. Crystal Reports also has anumber of predefined fields, called Special Fields, available for the purpose of reportmanagement.

Formatting a report ensures the user(s) can read and interpret your report. The audience forthe report dictates how much time you spend in formatting.Formatting includes the usage ofGraphic Images, Charts, as well as the use of Lines and Boxes to clearly define important data.

Instructor Note

Explain charts are not discussed as part of this course.

Format Total Borders

1. In the BAQ Report Designer, select theMfgParts report file created in a previous workshop.2. Click the Actions menu and select the Design Crystal Report command.

You could also open the MfgPartList.rpt report directly from Crystal Report at this point.

3. Click Print Preview.4. Move to the last page of the report, and scroll down to display the subtotals by part number

in the Group Footer #2 (GF2) sections and the subtotals by warehouse name in theGroup Footer #1 (GF1) sections.

The Group Header #2 (GH2) sections contain the various Part.PartNum values whilethe Group Header #1 (GH1) sections contain the variousWarehse.Description values.The Grand Total values appear in the Report Footer (RF) section.

Format the Subtotal BordersFormat the subtotals with single borders to increase readability.

1. To format the first subtota, tight-click on a bolded subtotal in one of the GF2(Part.PartNum) sections.

2. On the Expert Tools bar, click Format and navigate to the Border sheet.3. For the Top and Bottom fields in the Line Style section, select Single4. Select the Tight Horizontal check box.5. Click OK to return to the Preview screen.6. Format in the same way a bolded subtotal in one of the GF1 (Warehse.Description)

sections.

Epicor Software

56 | Crystal Reports Course | Add Presentation Quality to Custom Reports

Page 57: Epicor.instructor

7. To format the third subtotal, right-click on a bolded Grand Total in one of the RF (ReportFooter) sections.

8. On the Expert Tools bar, click Format and navigate to the Border sheet.9. For the Bottom field in the Line Style section, select Double.10. Select the Tight Horizontal check box.11. Click OK to return to the Preview screen.12. Click Save and preview the report.

Copy Field FormatCopy formats from one field to another using the Format Painter feature.

1. Right-click the field that contains a particular format and select Format Painter.

The cursor now appears as a paint brush as it hovers over the field to be format painted.

2. Click the Distinct Count - Grand Total field to apply the new format.

You cannot apply formatting to read only objects and fields.

Insert Text Objects

While in the Design window, text objects can be inserted via the Insert menu or by using theab Insert Text Object button on the Insert toolbar.

There are many ways to use text objects in a report. Some examples include, but are not limitedto the following: Report Title, Comments, Special Column Headings, Report Selection Formula,Print Date and Time.

1. On the Insert toolbar, click ab.To insert a text object you can alternatively select Text Object from the Insert menu .

2. Left-click to place the empty text box in the Report Header section of the Design windowabove the PartNum field.

3. Type Report Title - XXX's Manufactured Parts Listing, where XXX is your name orinitials.

4. Click outside of the object to lock in the text.

Format the Report Title

1. Right-click the title text object and select Format Text to access the Format Editor.2. To set up paragraph details, select the Paragraph sheet..3. Navigate to the horizontal alignment section.4. Select Centered to center the title in the text object5. To set up border details, select the Border sheet..6. For the left, right, top, and bottom borders, select Single.7. Select the Drop Shadow check box and then select any border color.8. Select the Background check box and select any background color.9. To set up font details,select 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.

Epicor Software

Crystal Reports Course | Add Presentation Quality to Custom Reports | 57

Page 58: Epicor.instructor

Resize Text ObjectsText may no longer fit in the Text Object box. It can be resized on the Design sheet in the samemanner in which the report fields were resized.

1. Click the title text object and press Shift.2. Use the right arrow key to lengthen the text object until it is centered over the whole

report.3. Press the down arrow key to heighten the text object to fit the 12 point font.4. Click Save and preview the report.

Insert Group Footer Text Objects

The Group Footer sections need identifying information to properly identify thesummaries/subtotals added earlier.

1. Select the Design sheet.2. In the Group Footer #1 section and in the Report Footer section, move both summary

fields for Distinct Count to the right of values in the center of the report.3. In the Group Footer #1 section below the PartNum field, add a text objectWarehouseTotals:.

4. In the Group Footer #2 section below the PartNum field, add a text object Part Totals:.5. In the Report Footer section below the PartNum field, add a text object Grand Total:.

Rename Column Headers

Column headers are also text objects, so they can be edited on the Design sheet as if they hadbeen inserted as Text Objects on the report.

1. In the Page Header section, right-click PartNum and select Edit Text.

Alternatively you can double-click a text object field to move the curser into the field forediting.a) Change the header title to be Part Number.b) Click outside of the object to lock in the text.

2. Edit the remaining column header fields.The new column header titles should be:

• Part Description• On-Hand Quantity• Manufacturing Comment

Format Column Headers

Execute the function called Group Select to collect all the column headers and apply some basicformatting to all of them at the same time. The Multiple Selection feature is a time-saving devicethat allows the simultaneous formatting of many text objects. This function is used to applythe same font, borders, text alignment, etc., to more than one text object, and to avoidformatting each text object separately. Of course once a group of objects have been selectedin this manner, they can also be deleted, moved, resized, etc.

1. To select all column headers, place the cursor above the Part Number column header.

Epicor Software

58 | Crystal Reports Course | Add Presentation Quality to Custom Reports

Page 59: Epicor.instructor

2. Left-click and drag the box to the right and down to encompass or lasso all column headers.3. On the Formatting toolbar, click B to bold all column headers.

Verify that all column headers are still selected.

4. On the Formatting toolbar, click U to turn off the underline attribute for the headers.5. Keep all column headers selected and right-click the Part Number column header, then

select Format Objects.6. Navigate to the Font sheet and set the color of the text (darker colors are better).7. Click OK and Save.

You may need to adjust the column headers' text alignment because they adopt thealignment given to the column headers in the Format Objects step.

Insert Special Fields

The next steps demonstrate the utilization of the special fields supported by Crystal Reportsand better describes the report for the reader. A few of these special fields are: Report Author,Free-form Report Comments, Report Title, Print Date, File Path and Name, Record SelectionFormula and Page N of M.

1. To enter summary information, from the File menu, select Summary Info.2. In the Title field, enter Parts On-Hand - Custom.3. In the Comment field, enter Manufactured parts with on-hand quantity.4. Click OK.5. On the Field Explorer, expand the Special Fields node to list and utilize these and other

fields.

Insert the Total Page Count or Page N of M fields only when the design is complete.Page on Demand, which Crystal Reports uses to present Page 1 very quickly, is disabledwhen these are added. This causes Crystal to rerun the entire report to recalculate the totalpage count every time any modification is made to the design, slowing the report previewprocess dramatically.

6. Select the Design sheet.7. Expand the bottom boundary of the Report Header section for several lines.

In the steps that follow, several special fields will be inserted in the Report Header sectionof the report. In order to do this, the size of that section must be increased in the Designwindow.

8. From the Special Fields list, insert the fields into the Report Header section.

Insert these fields:

• Print Date• File Author• File Path and Name• Report Title• Record Selection Formula• Report Comments

9. Click Save.

Epicor Software

Crystal Reports Course | Add Presentation Quality to Custom Reports | 59

Page 60: Epicor.instructor

Resize and Format Special Fields

1. Right-click the Report Comments field and select Format Field.2. On the Common sheet, select the Can Grow check box.3. For the File Path and Name and Record Selection Formula fields, select the Can Grow

check box.4. Select the Preview sheet to review the display of these special fields.5. If necessary, increase the width of the fields.6. Click Save.

Perform Additional Report Formatting

1. Select the Design sheet.2. Insert the special field Page N of M to the center of the Page Footer section.

If necessary, move and resize.

3. Edit the Print Date field to display with a leading day name, a month name instead ofnumber, and a four-digit year.Use appropriate separators when formatting this field.

4. For all special fields, change the font style to bold.

Insert a Line

1. Select the Design sheet.2. Drag and drop the bottom boundary of the Page Header section to leave space for a line

to be inserted.3. On the Insert toolbar, click Insert Line.4. Position the resulting pencil cursor above the Page Header bottom boundary marker, but

just below the Part Number column header.5. Left-click and drag to the right, drawing a line below all column headers.6. Right-click the line and select Format Line.7. Accept the Line Style as Single and click OK

Dashed or dotted lines do not allow for width modification, but single line style allows bothfor width and color modification.

8. Click Save and preview the report.

Add Boxes

1. Select the Design sheet.2. Adjust the elements.

a) Drag and drop the bottom boundary of the Group Header #1 section to add more spacefor the group boxes.

b) Select the Group #1 Name header and move it down two grid lines.c) Drag and drop the bottom boundary of the Group Footer #1 section.

3. Insert a box.a) On the Insert toolbar, click Insert Box.

Epicor Software

60 | Crystal Reports Course | Add Presentation Quality to Custom Reports

Page 61: Epicor.instructor

b) Position the pencil cursor in the upper left-hand corner of the Group Header #1 section.c) Left-click and drag down and to the right to enclose all of the Group #1 sections (downto the lower, right-hand corner of the Group Footer #1 section).

4. Format the box.a) Right-click the selected box and select Format Box.b) Accept the Box Style as Single, but feel free to experiment with the width, color, dropshadow, and fill color.

5. Click OK.6. Perform additional activities.

a) Move all Group Name fields to the right for better readability.b) Add a border and drop shadow around the Group #2 Name for more impact.c) Insert text objects or copy the Group Names into your various Group Footer sections todescribe the totals.

7. Click Save and preview the report

Insert Company LogoInsert company logo into the page header section.

1. Select the Design sheet.2. Drag and drop the bottom boundary of the Page Header section down far enough to be

able to move the column headers down and position the company logo above them.3. On the Insert toolbar, click Insert Picture.4. Browse to the Sample Data folder, select Epicor-Logo.bmp, and click Open.

You may optionally use your company logo here. Go to your company Website and copyyour company logo.

Instructor Note

The Epicor-Logo.bmp should be located in the Report folder on the training machines. Itcan be copied from the course map in the tree to a workstation.

5. Drag and drop the resulting outline so that the top edge is positioned at the top of the PageHeader section close to the left margin.

6. Click Save and preview the report.7. Exit Crystal Reports and return to BAQ Report Designer.

Workshop - Defining Options for Manufactured Parts ListingOptions, such as sorting, selection criteria and prompting for data may be set up inside ofCrystal Reports. The BAQ Report Designer handles the optional criteria when a BAQ has beenused for the report itself. Options may be designed at the time you are creating the reportdefinition or at the end of the formatting phase inside Crystal.

This workshop shows how to limit the data in the Manufactured Parts Listing report to the PartType of M; establish sort criteria for the report and provide filtering choices of Part Number orWarehouse.

Epicor Software

Crystal Reports Course | Add Presentation Quality to Custom Reports | 61

Page 62: Epicor.instructor

Add an Option

1. Click New and select New Option Field.2. In the Option Field column, select Part.TypeCode and press Tab.3. In the Field Label column, enter Type and press Tab.

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

4. In the Compare Operator field, select =.5. In the Default field, select M .6. In the Order field, enter 1.7. Click Save.

Add a Filter

Any indexed field in the BAQ is available to use as a filter. This provides an option when thereport is printed.

1. Click New and select New Filter.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 to enter a second filter for the Warehse.WarehouseCode.5. Click Save.

Add a Sort

1. Click New and select New Sort.2. In the Name field of the Sort Options section, type Part Number\On Hand Quantity.3. In the Sort Fields section, click New.

The Part Number\On Hand Quantity sort line should be selected.

4. In the Sort Field field, select Part.PartNum.5. In the Order field, enter 10 to make this the primary sort.6. Verify the Ascending check box is selected.7. Add one more sort field.

a) In the Sort Fields section, click New.The Part Number\On Hand Quantity sort line should be selected.

b) In the Sort Field field, select PartBin.OnHandQty.c) In the Order field, enter 20 to make this the primary sort.d) Clear the Ascending check box.This is a quantity field so you want to see the highest Part Bin On Hand Quantity first.

8. Click Save.

Test and Preview the Report

1. Click the Actions menu and select the Test Report Form command.

Epicor Software

62 | Crystal Reports Course | Add Presentation Quality to Custom Reports

Page 63: Epicor.instructor

2. Preview the report.3. Close the report and the report form.

Epicor Software

Crystal Reports Course | Add Presentation Quality to Custom Reports | 63

Page 64: Epicor.instructor

Create a Direct Labor Report

This section reinforces some of the features discussed in the previous sections. In addition, newreport writing features will be reviewed, such as calculated fields and parameters to determinewhat information displays on a report. You will build the Direct Labor report manually.

Crystal Formula Editor

The Crystal Formula Editor is designed for end-users and is a point and click tool used to buildformulas quickly and easily.

Syntax rules for writing formulas in Crystal are listed below.

RULESYMBOL

French brackets or braces enclose fields or formulas.{ }

Square brackets enclose subscripts or arrays.[ ]

Standard parentheses enclose arguments (sometimes called parameters) to aCrystal function.

( )

Quotation marks tell Crystal to treat the contents between the marks as textor a literal string.

“Text” or‘Text’

Enter numbers with no punctuation. The .00 is assumed.30000

Lines of comment need to be preceded by two forward slashes. Make it a habitto comment your formulas.

//

Press the Enter key to break your formula into sentences.<Enter>

Press the Tab key to indent your formula to make later analysis easier.<Tab>

Additional rules include:

• Upper and lower case letters are optional when typing functions, color names, etc. However,when entering text or literal strings in your formulas, you should enter the exact upper andlower case letter as needed.

• Spaces before and after operators such as + and * are optional. If you point and click on anoperator in the editor (instead of typing it), Crystal will insert spaces before and after theoperator for readability.

• If you are using Crystal Reports XI Enterprise, Crystal formulas may be centrally stored usingthe Crystal Enterprise Repository (outside the scope of this course). Otherwise, the formulasmay shared using copy and paste into a text file. The table and field names must be thesame in the two reports for the formula to work in the report containing any copied data.

Instructor Note

Explain the Crystal Formula Editor will be used multiple times in the remaining workshops inthis course.

Epicor Software

64 | Crystal Reports Course | Create a Direct Labor Report

Page 65: Epicor.instructor

Workshop - Define the Direct Labor ReportThe first step in completing any report is to design it inside the BAQ Report Designer. Thisworkshop shows how to create the Report definition for the Direct Labor Report.

Add a Report

Navigate to BAQ Report Designer.

Menu Path: Executive Analysis➤ Business Activity Management➤ General Operations➤ BAQ Report Designer

1. Click New and select New Report Definition.2. In the Report ID field, enter DirectLbr (no spaces).3. In the Description field, enter Direct Labor Report.4. In the BAQ ID field, serach for and select EPIC03-DirectLbr.5. In the Form Title field, enter Direct Labor Report.6. Click Save.

Test and Preview the Report

1. Click the Actions menu and select the Test Report Form command.2. Preview the report.3. Close the report and the report form.

Generate Sample Data

1. Click the Actions menu and select the Generate Sample Data command.The interface between Epicor and Crystal requires that a background temp .xml file iscreated. Once created, it becomes the datasource for the Crystal Report. The GenerateSample Data function creates that xml file. You do not see the full record count when thereport is first previewed inside Crystal Reports. This datasource is then used inside CrystalReports to pull tables and fields for the report.After the data is generated, a Sample data was successfully created. dialog box appears.

2. In the dialog box, note the path and the name of the data file (an .xml file).3. Click OK to confirm that the sample data was created successfully.

At this point, you have actually run the BAQ and the data that is generated into the xmlfile is available for Crystal to use. This is a good time to glance at the data being presentedto make sure it has pulled the query data you expected it to pull.

Workshop - Prepare for Crystal FormattingThe Report Definition must be in place prior to completing this workshop. When you selectDesign Crystal Report from the BAQ Report Designer Action Menu the report becomes availablefor formatting. When the sample data .xml file was created it was linked to a datasource thatis unknown to Crystal. The datasource must be selected and the BAQReportResult table mustalso be brought into the report file before you can format the report using Crystal Reports.

Epicor Software

Crystal Reports Course | Create a Direct Labor Report | 65

Page 66: Epicor.instructor

Select Data Sources

1. Click the Actions menu and select the Design Crystal Report command.Crystal Report launches.

2. From the Database menu, select Set Datsource Location.3. In the Available Data Sources section, navigate to Create New Connection > ADO.Net(xml) and double-click it.The datasource file path window will open.

4. In the File path field, browse to the Sample Data folder.5. Select just created DirectLabor_Date.xml file and click Open.

The data that is returned inside this report will only be a sampling of the data if thedatasource is set to the sample .xml file. You may also select the datasource from theMfgsysdata\Reports\<username> location, which displas all the data returned by the BAQ.

6. In the File Path window, click Finish.7. In the Current Data Sourcesection and in the ADO.Net (xml) folder, highlight ReportDataset.

8. Click Update to synchronize to the same .xml datasource.9. Click Close to accept the datasource changes.

Add the Report Result Table

1. From the Database menu, select the Database Expert.2. Double-click the BAQReportResult table to add it to the already selected tables.

Review the Links

1. Select the Links sheet.2. Double click on the link between Company and BAQReportParameters to change the join

options.3. In the Join Types section, select Left Outer Join and click OK.4. Click OK to close the Databasae Expert window.

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

5. Click Save.

Workshop - Create a Direct Labor ReportThe Report Definition must be in place prior to completing this workshop. This workshop showshow to create a direct labor report.

BUSINESS CASE: Your controller wants to know the hours and dollars charged to jobs (laborand burden) by department per week for a given time period. Your tasks in this workshop are:

• 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 custom menu link on the Vantage Main Menu.

Epicor Software

66 | Crystal Reports Course | Create a Direct Labor Report

Page 67: Epicor.instructor

Re-arrange Default Fields

When a BAQ Report Designer report opens inside the Crystal Reports three fields areautomatically created and placed in the Page Header section of the report. Complete the followingto move these fields.

1. Select the border of the Report Header section and drag it down to make more room inthe section.

2. Click the Report Title field and drag it into the Report Header section.3. Click the Print Date field and drag it into the Report Header section, placing it to the

left side.4. Click the Page N of M field, move it to the Page Footer and place it to the right side.

Add a FormulaAdd a formula to calculate labor and burden cost.

Formulas may be created before the detail section is populated with fields, or afterward. Theformula is a unique field that begins with the @ sign in the title. Some formulas are verycomplicated and would benefit from the addition of extra spacing in the formula. Crystal Reportsignores the spacing in a formula definition.

1. Select the Design sheet.2. From the Field Explorer list, select Formula Fields.3. Add new formula.

a) Right-click and select New to create a new formula.b) In the Name field of the Formula Name window, enter Labor Cost and click OK.

4. Add new formula details.a) Select the second column of the Formula Editor screen.b) Expand the ReportDataSet (ADO.NET(XML)) > BAQReportResult .c) Double-click LaborDtl.LaborHrs.The field name, {BAQReportResult.LaborDtl.LaborHrs}, properly formatted, drops intothe bottom box. The cursor should be positioned in that box behind the field name.

d) From the Operators and Arithmetic listings in the fourth column of the Formula Editorscreen, select an asterisk.You can alternately select Multiply.

e) Find and double-click the LaborDtl.LaborRate field.

It will appear next to the asterisk, and this completes the Labor Cost formula.

5. Click the Save and close button

The Formula Editor will check syntax and provide an error message, if needed.

6. Repeat these steps to create a formula called Burden Cost.

The formula is: {BAQReportResult.LaborDtl.BurdenHrs} *{BAQReportResult.LaborDtl.BurdenRate}.

7. Click Save and Close.

Epicor Software

Crystal Reports Course | Create a Direct Labor Report | 67

Page 68: Epicor.instructor

Insert Fields

These fields can be inserted in any order and rearranged as needed. Generally, time is savedwhen reports are planned in advance, giving direction to the design and report building process.

1. Select the Design sheet.2. From the Field Explorer, insert the fields into the Details section.

From the Database Fields > BAQReportResult list, insert these fields:

• LaborDtl.PayrollDate• LaborDtl.JobNum• LaborDtl.AssemblySeq• LaborDtl.OprSeq• LaborDtl.LaborHrs• LaborDtl.BurdenHrs

From the Formula Fields list, insert these fields:

• BurdenCost• LaborCost

3. Click Refresh.Alternatively, clickPrint Preview.

4. Resize and move the fields as necessary

It is easier to move and resize report objects in the Design tab. For best results, use theguidelines. Also, the JobNum, AssemblySeq and OprSeq fields use more space than necessaryand could be shortened. Their labels could be combined as well.

5. Click Save.

Format the Column Headings

By default Crystal Reports will present the entire field name as the description for columnheadings. These are just text boxes and can be changed.

1. Double-click in the column heading for LaborDtl.PayrollDate and change the name toPayroll Date.

2. Change the other columns to more descriptive titles.

Insert GroupsInsert groups to make the report more readable.

Two groups are inserted into this report. One to group by job costing departments and theother to group by date.

1. From the Report menu, select Group Expert.Alternatively, on the Expert Tools toolbar, click Group Expert.

2. From the BAQReportResults fields section, find and select JCDept.Description.

Use the right arrow button to move the item to the Group By list.

3. Repeat the process for the second group of LaborDtl.PayrollDate.

Epicor Software

68 | Crystal Reports Course | Create a Direct Labor Report

Page 69: Epicor.instructor

4. On the Group By list, highlight JCDept.Description and click Options to open the ChangeGroup Options screen.

5. On the Options sheet, select the Keep Group Together and Repeat Group Header OnEach Page check boxes.

6. Click OK.7. Repeat the process for the second group of LaborDtl.PayrollDate.8. Click Save and preview the report.

The report now has additional report sections identified as Group Headers and GroupFooters listed for the groupings defined.

Insert Group Summaries and Grand Totals

Now that the report displays data grouped by payroll date and department, it is appropriate toset up subtotals and grand totals by these groups. The subtotals and grand totals are insertedinto the Group Footer and Report Footer Sections. The fields that should be summarized are:LaborHrs, Labor Cost, BurdenHrs and Burden Cost.

1. Select the Preview sheet.2. In the Details section of the report, highlight LaborHrs.3. Right-click and select Insert > Summary.4. Accept the defaults of LaborDtl.LaborHrs in the Choose Field to Summarize field andSum in the Calculate this Summary field.

5. Select the Add to All Group Levels check box and click OK.6. Repeat the process for the fields of Labor Cost, BurdenHrs, and Burden Cost.

This provides summaries for each group as well as a grand total for LaborHrs.

7. Verify that the columns are wide enough to display all summary data and increase the widthof the fields if necessary.

8. Click Save.

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

1. Select the Design sheet.2. From the Insert Tools toolbar, select Insert Text Object.

Alternatively, you can select Text Object from the Insert menu.

The cursor becomes a rectangle until it is dropped into the report.

3. Place the text object into the Group Footer #2 section of the report, to the left of thesubtotals entered earlier.

The field now highlights and the curser jumps inside the field to enable text entry.

4. Type Totals for the Week Beginning:

Include a space behind the colon.

5. Leave the cursor inside the field and in the Field Explorer locate and select the groupname field Group #2 Name:LaborDtl.PayrollDate.

6. Drag the field inside the text object and drop it behind the colon.

The cursor will appear as a page symbol until it is dropped inside the text object. Resizeas needed.

Epicor Software

Crystal Reports Course | Create a Direct Labor Report | 69

Page 70: Epicor.instructor

7. Repeat the process for Group Footer #1 Section using the following text: Totals for:Group #1 Name

This will bring in the JCDept.Description Group Name.

8. Insert a text object in the Report Footer section and title it Grand Totals.9. Click Save and preview the report.

Insert Presentation Quality Detail

Now that the report has proper section labels and is grouped properly, the report at this pointmay need to be refined by applying Presentation Quality enhancements. Some of the possibilitiesinclude:

• Update the column headers to increase readability• Insert a report title in the report or page header section• Add special fields to identify report-specific properties• Format sub totals and grand totals with lines or borders• Insert company logos• Enhance group sections of the report using lines and boxes• Suppress data as needed

Instructor Note

Choose which items above students should complete.

When choosing special fields, be sure to select Record Selection Formula as we will look atthis one later in the course. The other special fields can be the user's choice to select. Savethe report after any presentation quality detail adjustments.

Save and Exit the Report

1. Preview the report.2. Click Save.3. Exit Crystal and return to BAQ Report Designer.

Workshop - Defining Options for Direct Labor ReportSorting, record selection criteria and filtering for specific data are considered options. All ofthese options may be created using the features of Crystal. The BAQ Report Designer handlesthe optional criteria when a BAQ has been used for the report itself. Options may be designedat the time you are creating the report definition or at the end of the Crystal Report formattingprocess. As implied by the name of the report, the labor details need to be limited to the labortype of direct. The Controller has requested that the data be available by Job Department aswell as Payroll Date. This workshop shows how to establish the options for the Direct LaborReport.

Add Options

1. Enter an option field.a) Click New and select New Option Field.b) In the Option Field column, select LaborDtl.PayrollDate and press Tab.c) In the Field Label column, enter Beginning Payroll Date and press Tab.

Epicor Software

70 | Crystal Reports Course | Create a Direct Labor Report

Page 71: Epicor.instructor

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

d) In the Compare Operator field, select >=.e) In the Order field, enter1 and press Tab.

2. Enter one more option field.a) Click New and select New Option Field.b) In the Option Field column, select LaborDtl.PayrollDate and press Tab.c) In the Field Label column, enter Ending Payroll Date and press Tab.

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

d) In the Compare Operator field, select <=.e) In the Order field, enter2 and press Tab.

3. Enter one more option field.a) Click New and select New Option Field.b) In the Option Field column, select LaborDtl.LaborType and press Tab.c) Accept the Field Label of Labor Type and press Tab.

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

d) In the Compare Operator field, select <>.e) In the Default field, enter 1 .f) In the Order field, enter3.

4. Click Save.

Add a Filter

Only indexed fields from the BAQ can be used as a filter.

1. Click New and select New Filter.2. In the Filter column, select JCDept.JCDept and press Tab.3. Click Save.

Add a Sort

1. Click New and select New Sort.2. In the Name field of the Sort Options section, type Job Department.3. In the Sort Fields section, click New.

The Job Department sort line should be selected.

4. In the Sort Field field, select JCDept.Description.5. In the Order field, enter 10.6. Click Save.

Epicor Software

Crystal Reports Course | Create a Direct Labor Report | 71

Page 72: Epicor.instructor

Deploy the BAQ Report

After you design the report, you can place it on the Main Menu. Use the Deploy BAQ Reportcommand to move the current BAQ report to the network. The program moves the report fromthe 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 definitionfor the report.

The style defines how this report will appear when it is displayed and printed. You can edit thesestyles in Report Style Maintenance.

Both Report Style and Report Data Definition are located under System Management - CompanyMaintenance.

Workshop - Deploy and Publish a ReportThe objective of this workshop is to make the Direct Labor report available as a menu optionin the system. Follow the identified steps below in addition to the Select a Custom Reporttopic in the online help as a guide to accomplish this task.

Deploy the Report

The Deploy BAQ Report option from the Actions menu makes the new report definition availableto the network. It will place a new copy including all the options you have defined into the\Server\Reports\Custom Reports directory on the company server. Once the report is here itcan be attached to a menu.

Navigate to BAQ Report Designer.

Menu Path: Executive Analysis➤ Business Activity Management➤ General Operations➤ BAQ Report Designer

1. Click the Actions menu and select the Deploy BAQ Report command.

Note the directory where the report will be placed.

Confirm if you need to replace the existing report.

2. Click on OK to accept the deployment.

Add the Report to Menu

Navigate to Menu Maintenance.

Menu Path: System Management ➤ Utilities ➤ Menu Maintenance

1. In the Tree View on the left, navigate to Production Management > Job Management> Reports.

2. Highlight Reports and click New.3. Enter the fields as follows:

Epicor Software

72 | Crystal Reports Course | Deploy the BAQ Report

Page 73: Epicor.instructor

ValueField

UD 170

Enter a unique ID that begins with UD.

Menu ID

Direct Labor Report

This is the report name as it appears on themenu tree.

Name

SEC247

This can be a newly created security ID oran existing one. If you select an existing

Security ID

security ID, it should be one already availablefor at least one other report under the sameparent menu.

170

Order sequences are numbered by 10’s. Onthis menu, 170 places the custom report asthe last item on the menu list.

Order Sequence

BAQ Report

Select this from the drop-down selection list.

Program Type

Report

This selects the standard Report icon usedon the menu structure.

Icon

Epicor.Mfg.UIRpt.BAQReport.dll

This field point to the program needed to runthe custom report and will default in.

Program

DirectLbr

Press the Report button to browse for yourreport.

Report

4. Click Save and exit the program.

Test the Report From the Menu

Any time a custom menu options is made, the database needs to be refreshed. You can log outand log back in or optinally change users.

1. From the Options menu of the Main Menu window, select Change User ID.2. Log in with the username and password of Manager.3. Navigate to Direct Lober Report and double click it to view the report.

The Report Definition screen will appear reflecting the choices you made for Options, Sortsand Filters while in the BAQ Report Designer.

4. Fill in the Beginning Payroll Date and the Ending Payroll Date fields.5. Select Print preview to see the repoort.

Epicor Software

Crystal Reports Course | Deploy the BAQ Report | 73

Page 74: Epicor.instructor

6. Exit the report.

Epicor Software

74 | Crystal Reports Course | Deploy the BAQ Report

Page 75: Epicor.instructor

Modify Existing Crystal Reports Forms

Many standard Crystal Reports forms are found in the system's individual modules. These forms,as well as standard Crystal Reports, may be modified with the Crystal Reports program if theforms or reports do not meet the end user's needs. All of the Crystal basics that you learnedso far may be utilized and applied when modifying forms.

In this section, you learn how to make changes to the standard Crystal Reports Purchase Orderform. The principles applied when modifying this form are applicable to modifying any CrystalReport forms in the system.

At the end of this section you will be able to:

• Locate the Crystal Reports forms within the system.• Determine where the database files are created.• Open and save forms to be modified with new names.• Modify selected forms.• Attach the modified forms as the system default report format.

Dataset Location

When a user runs a Crystal Report form, the system generates a number of XML dataset filesand other related files. These files are extracted from the main Progress database tables, andare actually used to produce the desired form. These files are usually generated and located inthe C:\...\mfgsysdata\Reports\ folder. The system creates the last segment of the pathstatement equal to the user that generated or ran the report.

Note The location of the XML dataset locations will vary, depending on your uniqueinstallation. Please check with your network administrator or IS manager for specificinformation regarding your system. For purposes of this class, your instructor will confirmthe location.

When a purchase order is printed, it generates the POHeader, PODetail, PORel, POMisc, SidLabls,and OrMisc tables. These tables contain the data required for the PO just printed. This data isthen stored in a uniquely named file in the above mentioned location with an XML extension.For example, PURCHASE_ORDER00XXX.XML. When another PO is printed, another unique XMLfile is created in the user’s folder.

Before we can modify the Crystal Reports PO form, at least one PO has to be run so that thesource files are generated, and so you can preview your work as you proceed. In addition, it isadvisable to preview specific PO form(s) to test the impact and accuracy of a desired change.

Form File Location

In order to modify a form, the standard form itself must be located and opened using CrystalReports. Again, these forms are stored in a unique location by the system. That location isX:\epicor\MfgSys\Server\Reports where X is the location of your server. For purposes ofthis class, the location of the server will be the C drive.

Note Take care to never modify a standard form. After the appropriate form is locatedand opened, immediately save it using a unique name. Then modify the newly savedform.

The standard form serves as a starting point for modification and something to go backto should you need to restart. If you modify the standard form, subsequent patches orreleases could overwrite your modification.

Epicor Software

Crystal Reports Course | Modify Existing Crystal Reports Forms | 75

Page 76: Epicor.instructor

Report Definition and Report Style Maintenance programs

When these XML tables and fields are created by printing the form or report, the system includesfields that are considered the most commonly used fields, but excludes less commonly usedfields. These fields exist, but are excluded as they are rarely used and including all of them willhinder printing performance. Most tables in the system allow for custom fields to be added, asneeded. These fields are labeled Character01, Character02, etc. These fields will be excludedby default.

If a custom or excluded field is needed in the Crystal Report form, then a new Report Definitionmust be created where the user intentionally includes the field(s) in the definition. This definitionmust then be defined as an additional report style through the Report Style program. Whenthe report style is defined, it can then be selected when a form or report is printed. This createsthe XML file that contains the desired field(s) in the dataset.

Workshop - Modify the Purchase Order FormThere are many ways to modify the standard Purchase Order form. This workshop walks througha sample method that uses the Report Data Definition to add an addfitional database field tothe defined dataset..

BUSINESS CASE: Your company wants to modify the existing Purchase Order form to includethe company logo. In addition, your company wants to suppress closed lines on updated POs.It is not uncommon in your business to issue blanket orders which are subject to change. Whena change does occur, an updated PO using the same PO number must be resubmitted to thesupplier. The standard PO form does not suppress closed lines, which confuses some of yoursuppliers as they have occasionally refilled these lines.

Add a PO Form

1. Navigate to the Crystal Reports application or re-open it.2. Open the standard PO form under X:\Epicor\MfgSys\Server\Reports\POForm.rpt.3. From the File menu, select Save As.4. For the new File name, enter POForm2.rpt .5. Keep Crystal Reports open, but minimize it and navigate to the system.

Add a Report Definition

By design the, PO form does not include the PODetail.OpenLine field. You will use this fieldto write a formula to suppress closed lines.

Navigate to Report Data Definition

Menu Path: System Management ➤ Company Maintenance ➤ Report Data Definition

1. In the Code field, search for and select the POForm data definition.a) From the Actions menu, select Duplicate Report.

Since the POForm is identified as a System Report, it must be duplicated in order tomodify the Data Definition.

b) In the Report Def ID field, enter POForm2.c) In the Description field, enter Modified Purchase Order.d) Click OK.

2. Include the PODetail.OpenLine field in the report definition.

Epicor Software

76 | Crystal Reports Course | Modify Existing Crystal Reports Forms

Page 77: Epicor.instructor

Select the Report Table Excluded Fields sheet.a)b) Expand the Tree view until you can highlight the PO Detail table.c) Click Refresh to populate the Included Report Fields and Excluded Report Fieldscolumns for this table.

d) In the Excluded Report Fields column, find OpenLine and use the left arrow buttonto move OpenLineit to the Included Report Fields column.

3. Click Save and exit the program.

Add a Report Style

Navigate to Report Style

Menu Path: System Management ➤ Company Maintenance ➤ Report Style

1. In the Report ID field, search for and select the POForm report.2. Select the Styles sheet.3. Click New and select New Report Style.4. In the Description field, enter Modified Purchase Order.5. In the Data Definition field, enter POForm2.6. In the Report Location field, type reports/POForm2.rpt.7. Accept the remaining defaults.

You had to identify a name in the Report Location field, so you must use this as the ReportName in Crystal Reports.

8. Click Save and exit the program.

Create the XML FilePrint and print preview a PO to create the XML file.

Navigate to the Purchase Order Entry

Menu Path: Material Management ➤ Purchase Contracts Management ➤ GeneralOperations ➤ Purchase Order Entry

1. In the PO Number field, enter 4055 and press Tab to open the PO.2. Click the Print icon on the Standard toolbar to open the Purchase Order Print window.3. Choose the Modified Purchase Order Report Style.4. Select Print Preview from the File menu or click the Print Preview icon.

Note that lines 9 and 10 show a Closed status on the preview. We will suppress these lines.

5. Close the PO Print Preview window.

Set the Database Location

The new form cannot be previewed yet. The (.rpt) files which generate this report do not pointto the correct tables.

1. Maximize Crystal Reports.2. Select Set Datasource Location from the Database menu to open the Set Datasource

Location window.a) In the Current Data Source section, highlight ReportDataSet of the screen.

Epicor Software

Crystal Reports Course | Modify Existing Crystal Reports Forms | 77

Page 78: Epicor.instructor

b) In the Replacewith section, expand Create New Connection and click ADO.NET(XML)to open the Connection window.

c) In the File Path field, navigate to C:\.....\mfgsysdata\Reports\MANAGER\PurchaseOrderxxxxx.XML to locate the XML file created by the Print/Print Preview step above.

Note The xxxxx in the above file name replaces system assigned values. To selectthe correct one, as there may be many listed, sort the list by date and select the“Purchase Orderxxxxx.XML” created on the current date.

d) Click Finish to return to the Set Datasource Location screen.e) In both the Current Data Source and the Replace with sections, highlight theReportDataSet option.

f) Click Update to synchronize the ReportDataSets.g) Repeat the process if there is a Subreport ReportDataSet section in the Current DataSource section.

3. Verify the properties of each ReportDataSet to validate that both sections are pointing tothe above selected XML file.a) In the Current Data Source section, select the Properties line item and verify thepath.

b) Right-click the Replace with: ReportDataSet item, then select Properties and verifythe path.

c) Click Close to complete the set datasource location process.

4. From the Database menu, select Verify Database.Click OK to any Crystal messages regarding the database or report.

5. Select Print Preview or Refresh to preview the form to be modified

Click Yes or OK to any messages that ask to propagate changes through all of the Datasettables connected to the report.

These messages may or may not appear depending on if a preview occurs before or aftera database is verified. The two processes are interchangeable.

6. Click Save and preview the report.

The newly included OpenLine field now appears in the Field Explorer as a Database Fieldunder the PODetail table.

Insert a Company LogoInsert a company logo on the PO form.

This is the first change to the PO form.

1. Select the Design sheet.2. Navigate to any company website, right-click on the logo, and copy it to the clipboard.

Paste it into the Page Header b section of the report between the address and phonenumbers and preview.

3. Copy the Epicor Logo from the course mapt tree into a location on the workstation.

Insert the logo bitmap into the Page Header b section of the report between the addressand phone numbers and preview.

4. Click Save.

Epicor Software

78 | Crystal Reports Course | Modify Existing Crystal Reports Forms

Page 79: Epicor.instructor

Suppress Closed Lines on the PO Form

1. Select the Design sheet.

There are multiple Group Header #2 and GroupFooter #2 report sections that are assignedas groups by PODetail.POLine. These are the sections that need to be suppressed whena PO line is closed, as well as the Details section.

The system closes a PO line when all releases of a line are received complete, or when itis manually closed. The system then applies a closed status to the release or the line. Inthe database, the system uses the logical fields called PORel.OpenRelease andPODetail.OpenLine to indicate this status. If a PO release is open, then OpenRelease =True. If the PO release is closed, then OpenRelease = False. If a PO line is Closed thenPODetail.OpenLine = False otherwise PODetail.OpenLine = True if it is still open.Although we could use either the PODetail.OpenLine or the PORel.OpenRelease fieldsto suppress the line, use the PODetail.OpenLine field as a closed line, unless it issuppressed, so it displays a Closed status.

Instructor Note

Explain that the Report Data Defintion is the query definition for the report and holds allthe tables and fields included in the standard form. This form includes the fieldPORel.OpenRelease which is already part of the defined tables. Suppression could havebeen done using this field in the formula as well.

Encourage them to always explore the underlying report form for fields AND formulasthat may be useful in the new design.

2. On the Expert Tools toolbar, click Section Expert.3. Select the Group Header #2: PODetail.POLine-A section.4. On the Common sheet to the right of the Suppress (No Drill-Down) option, click thex+2 formula button.

The Format Formula Editor - Suppress (No Drill-Down) window opens.

5. Enter formula.a) Expand the tables below the ReportDataSet(ADO.NET (XML)) listing in the secondcolumn.

b) Double-click the PODetail.OpenLine field.c) After the field, type = false to finish the formulaThe formula should read as follows: {PODetail.OpenLine} = false.

d) Copy this formula.It will be used to suppress data in other sections.

e) Click Save and close to save the formula.

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

6. Repeat the process for the Details section and the Group Footer #2 PODetail.POLine-Asection, pasting the same formula into both Formula Editor windows.

7. Preview the report to verify that the closed lines no longer appear on the report.8. Click Save.

Epicor Software

Crystal Reports Course | Modify Existing Crystal Reports Forms | 79

Page 80: Epicor.instructor

Establish the Modified Form as the System DefaultOnce a form/report has been modified, it can be set up in the system as the default form/report,or at the very least, as an available form for use as needed. Prior to printing a form, the systemprovides the opportunity to select the form to be used. The form/report defined as the defaultform will be selected unless another is indicated.

Workshop - Establish the New Purchase Order Form as the System DefaultThis workshop shows how to establish the new Purchase Order form as the system default.

Navigate to Report Style

Menu Path: System Management ➤ Company Maintenance ➤ Report Style

1. Click the Report ID button to search for and select POForm.2. Move to the Styles sheet and select New Report Style from the New icon menu.3. Enter POForm – Modified in the Description field.4. Enter the path C:\epicor\MfgSys\Server\Reports\POForm2.rpt in the Report Location

field

Confirm the path to the location of the saved modified form. Also, the named report willdiffer from the above saved report name. Be sure to select the correct saved report nameas named in the previous workshop. The POForm2.rpt represents the saved POForm name.

5. Select the Company List section.6. In the Valid column, select the EPIC03 company check box to assure the form is valid for

this company.7. In the Default column next to the same company, select the Default check box.

The Valid and Default columns enable you to create forms that are unique to each of yourcompanies. A generic form may be all that is needed. One form could be flagged as Validand the other form as Default for all companies.

8. Click Save and exit the program.

Navigate to the Purchase Order Entry program, print and print preview the PO to assure thatthe closed lines are now suppressed.

Epicor Software

80 | Crystal Reports Course | Modify Existing Crystal Reports Forms

Page 81: Epicor.instructor

IndependentWorkshop: Create a Booked Orders Report

In this section, you will independently finish a workshop that focuses on creating a bookedorders report. This project is done as a review for all the BAQ Report Designer details discussedup to this point. The instructor will get you started with this report, but will let you finish it onyour own.

The report creation activities will resemble activities covered in previous sections of this course.At the end of this section, you will be able to:

• Better apply the design tools described in previous sections.• Insert fields into text objects.• Create and move new report sections.• Sort records on the report.

Instructor Note

If students will work through the workshop independently, it is suggested to lead them throughsteps 1 - 8, and then have them complete the remaining steps on their own.

Workshop - Define the Booked Orders ReportThis workshop shows how to create the Report definition for the Booked Orders Report.

Add a Report

Navigate to BAQ Report Designer.

Menu Path: Executive Analysis➤ Business Activity Management➤ General Operations➤ BAQ Report Designer

1. Click New and select New Report Definition.2. In the Report ID field, enter BookedOrder (no spaces).3. In the Description field, enter Booked Orders Report.4. In the BAQ ID field, serach for and select EPIC03-BookOrders.5. In the Form Title field, enter Booked Orders Report.6. Click Save.

Test and Preview the Report

1. Click the Actions menu and select the Test Report Form command.2. Preview the report.3. Close the report and the report form.

Generate Sample Data

1. Click the Actions menu and select the Generate Sample Data command.The interface between Epicor and Crystal requires that a background temp .xml file iscreated. Once created, it becomes the datasource for the Crystal Report. The Generate

Epicor Software

Crystal Reports Course | Independent Workshop: Create a Booked Orders Report | 81

Page 82: Epicor.instructor

Sample Data function creates that xml file. You do not see the full record count when thereport is first previewed inside Crystal Reports. This datasource is then used inside CrystalReports to pull tables and fields for the report.After the data is generated, a Sample data was successfully created. dialog box appears.

2. In the dialog box, note the path and the name of the data file (an .xml file).3. Click OK to confirm that the sample data was created successfully.

At this point, you have actually run the BAQ and the data that is generated into the xmlfile is available for Crystal to use. This is a good time to glance at the data being presentedto make sure it has pulled the query data you expected it to pull.

Workshop - Prepare for Crystal FormattingThe Report Definition must be in place prior to completing this workshop. When you selectDesign Crystal Report from the BAQ Report Designer Action Menu the report becomes availablefor formatting. When the sample data .xml file was created it was linked to a datasource thatis unknown to Crystal and saved into the Sample Reports folder. This xml file will only containa sampling of the true data from the BAQ.

This report demonstrates how to set the datasource and display the full record count. After thetest the report function, an .xml file is created in the \server\reports\<username> directory.This is the same directory used by Epicor for the default report definitions. Retrieving the datafrom this directory will provide an .xml datasource with complete data. Use the .xml filegenerated here when you need to see the full record count of data in order to design a newCrystal Report from a BAQ.

Select Data Sources

1. Click the Actions menu and select the Design Crystal Report command.Crystal Report launches.

2. From the Database menu, select Set Datsource Location.3. In the Available Data Sources section, navigate to Create New Connection > ADO.Net(xml) and double-click it.The datasource file path window will open.

4. In the File path field, browse to the Mfgsysdata\Server\Reports\Manager folder.5. Select the BAQ Report -BookOrder-0000.xml file with the most current date and time

and click Open.

6. In the File Path window, click Finish.7. In the Current Data Sourcesection and in the ADO.Net (xml) folder, highlight ReportDataset.

8. Click on the Report Dataset displayed in the ADO.Net (Xml) folder.9. Click Update to synchronize to the same .xml datasource.10. Click Close to accept the datasource changes.

Add the Report Result Table

1. From the Database menu, select the Database Expert.2. Double-click the BAQReportResult table to add it to the already selected tables.

Epicor Software

82 | Crystal Reports Course | Independent Workshop: Create a Booked Orders Report

Page 83: Epicor.instructor

Review the Links

1. Select the Links sheet.2. Double click on the link between Company and BAQReportParameters to change the join

options.3. In the Join Types section, select Left Outer Join and click OK.4. Click OK to close the Databasae Expert window.

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

5. Click Save.

Independent Workshop - Create a Booked Orders ReportComplete the steps below to create a booked orders report.

BUSINESS CASE: Your objective is to produce a report which shows orders booked within acertain date range, summarized by product group and customer name. Your boss has decidedthat the report must show an order book date, order and line numbers, book type, sellingquantity, customer name, part number and product group description. Knowing this, we candetermine the tables that must be used to create and finish the report.

The final report also needs a Gross Margin field. This field does not exist in the database andmust be calculated and displayed in the report. The gross margin will be assumed at 35%.

Delete the Default Fields.

By Default the interchange between the BAQ Report Designer and Crystal will place a ReportTitle, Print Date and Page N of M fields into the Report Header. These will be deleted and replacedlater in the workshop.

1. Hold down Ctrl and, in the Report Header section, select the Report Title, Print Dateand Page N of M fields.

2. Press Delete.

Add a FormulaAdd a formula to calculate Gross Margin.

1. Select the Design sheet.2. From the Field Explorer list, select Formula Fields.3. Add new formula.

a) Right-click and select New to create a new formula.b) In the Name field of the Formula Name window, enter Gross Margin and click OK.

4. Add new formula details.a) Navigate to the second column of the Formula Editor screen.b) Expand the ReportDataSet (ADO.NET(XML)) > BAQReportResult.c) Double-click BookDtl.BookValue.The field name, {BAQReportResult.BookDtl.BookValue}, properly formatted, drops intothe bottom box. The cursor should be positioned in that box behind the field name.

d) From the Operators and Arithmetic listings in the fourth column of the Formula Editorscreen, select an asterisk.

Epicor Software

Crystal Reports Course | Independent Workshop: Create a Booked Orders Report | 83

Page 84: Epicor.instructor

You can alternately select Multiply.

e) After the asterisk, type .35 to finish the formula.

5. Type .35 after the asterisk to finish the formula.6. Click the Save and close button.

The formula name now appears under the Formula Fields section of the Field Explorer.

7. Click Save.

Insert Fields

1. Select the Design sheet.2. Insert the fields from the Field Explorer into the Details section in this order.

From the Database Fields > BAQReportResult list insert these fields:

• OrderDtl.PartNum• BookDtl.BookDate• BookDtl.OrderNum• BookDtl.OrderLine• BookDtl.BookType• BookDtl.SellingBookQty• BookDtl.BookValue

From the Formula Fields list insert Gross Margin field.

3. Click Refresh or click the Print Preview icon to open the Preview tab.Alternatively, you can click Print Preview to navigate to the Preview sheet.

Write down the Record Count _______________.

4. If necessary, resize and move the fields.5. Click Save.

Insert Groups

Add groups for the ProdGrup.Description and the Customer.Name fields to make the reportmore readable.

1. From the Report menu, select Group Expert.Alternatively, on the Expert Tools toolbar, click Group Expert.

2. From the BAQReportResults fields section, find and select ProdGrup.Description.

Use the right arrow button to move the item to the Group By list.

3. On the Group By list, highlight ProdGrup.Description and click Options to open theChange Group Options screen.

4. On the Options sheet, select the Keep Group Together and Repeat Group Header OnEach Page check boxes.

5. Click OK.6. Repeat the process for the Customer.Name field.7. Click Save and preview the report.8. Write down the new Record Count ________________.

Epicor Software

84 | Crystal Reports Course | Independent Workshop: Create a Booked Orders Report

Page 85: Epicor.instructor

Instructor Note

Comment for the workshop on Booked Order Report in the Appendix:

The record count lowered because some of the records originally brought into the reportcould not be associated to a Product Group. These records were not included in the reportafter the group was added. Parts that were ordered that do not have a correspondingPart record would not appear once the group was added.

These records will be returned to the report by changing the Links between BookDtl andthe ProdGrup tables to a Left Outer Join.

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

1. Navigate to the Preview sheet.2. In the Details section of the report, highlight BookDtl.BookValue.3. Highlight any BookDtl.BookValue field in the Detail section.4. Right-click and select Insert > Summary.5. Select the Add to All Group Levels check box and click OK.6. Repeat the process for the Gross Margin field.7. Verify that the columns are wide enough to display all summary data and increase the width

of the fields if necessary.8. Click Save.

Add a Page Header Section

The current page header is split to hold more data, as space is needed for a special field(s) anda company logo. Currently, the page header holds only column header information.

1. Select the Design sheet.2. Right-click in the Page Header section and select Section Expert.3. Select the Page Header section if not already selected.4. At the top of the display, click Insert to add Page Header b, then click OK

The newly created Page Header b appears below the column header items. The next stepallows you to change this without having to individually move the column header fields.

5. Use the upward arrow on the top of the screen to move Header b into the Header aposition and click OK.

You will not see the Page Headers listed as B and A as you would expenct. Crystal simplyrearranges the information from Header B to A. you will note the column header labels nowappear in the Header b section, directly above the group header and detail sections of thereport.

Insert a Report TitleInsert a report title in Page Header a.

1. From the File menu, select Summary Info.2. In the Title field, enter Booked Order List.3. Click OK to return to the Preview sheet.

Epicor Software

Crystal Reports Course | Independent Workshop: Create a Booked Orders Report | 85

Page 86: Epicor.instructor

The window's title bar now reads Crystal Reports - [Booked Order List] reflecting theReport Title field contents instead of the saved file name.

4. Select the Design sheet.5. Add a Report Title field.

a) In the Field Explorer, expand Special Fields.b) Drag and drop the Report Title field into the Page Header a section, near the top leftmargin.

6. Increase the font to 14 point and, on the Standard toolbar, click B to bold the title.7. Drag the bottom boundary of the Page Header a section down to accommodate the report

title or any other special fields inserted here.8. Fotmat the Report Title field.

a) Right-click in the Report Title field and select Format Field from the menu.b) Add a single border, a drop shadow, and background color to the Report Title field.

9. Click Save.

Format Column Headers

1. Navigate to the Design sheet.2. Drag the bottom boundary of the Page Header b section and move it down to create space

for column headers expanding from one to two rows.3. Select all the column header fields.4. To remove the underline for all column headers, on the Standard toolbar, click U .5. To bold the column header fields, on the Standard toolbar, click the B.6. Change the column header field font color as desired.

Edit the Column Header Field Names

1. On the Design sheet, double-click each column header and edit by adding spaces oradjusting text.

The possible header titles are:

• Part Number• Book Date• Order Number• Order Line• Book Type• Selling Book Quantity• Book Value• Gross Margin

2. Expand the column header from a single line to a double line.Verify that the field is selected, hold down Shift and press the down arrow once or twice.

When expanding the column header by using the down arrow, the lines will break at thespaces between the words. This minimizes the need to expand the width of the field.

3. Align the bottoms of the column headers.4. Select all the column header fields.5. Right-click one of the column headers and select Align > Bottoms.

Epicor Software

86 | Crystal Reports Course | Independent Workshop: Create a Booked Orders Report

Page 87: Epicor.instructor

6. Click Save and preview the report.

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

1. On the Insert toolbar, click Insert Line.

The cursor becomes a pencil.

2. Draw a line below all of the column headers.3. Right-click on the line and select Format Line.4. Select the desired line width and color.5. Click Save.

Insert a Company Logo

1. On the Insert toolbar, click Insert Picture.2. Browse to: C:\epicor\MfgSys\server\UD\Test

This location is for purposes of the Crystal Reports course only. If the location is different,the instructor will tell you. You decide where to store the logos and other auxiliary files.

3. Select the Epicor-Logo.bmp file and click Open

The cursor becomes a rectangle.

4. Drop the Epicor-Logo.bmp into the Page Header a section and size the logo as desired.5. Format the image.

a) Right-click the logo and select Format Graphic.b) In the Scaling section of the Picture sheet, enter the width and height.c) Click Save.

Insert Descriptive Text

1. On the Insert toolbar, click Insert Text Object.2. Drop the text object into the Group Footer #2 section and position it to the left of the

subtotal fields.3. In the text object, type Totals for: including a space at the end.4. Add group name fields.

a) Select the Field Explorer.b) In the Group Name Fields list, select Group #2 Name: Customer.Name.c) Drag and drop the field into the text object.

The group name will appear after the entered text. A symbol that looks like a piece ofpaper with a plus sign on it appears.

d) Resize the field as necessary.e) Repeat the process for Group Footer #1 and the Group #1 Name:ProdGrup.Description field.

5. In the Report Footer section, iInsert a new text object Grand Totals.6. Format the Grand Totals field.

a) Right-click the Grand Totals field and select Format Field.b) Add double borders and bold the font for the Grand Totals field.

Epicor Software

Crystal Reports Course | Independent Workshop: Create a Booked Orders Report | 87

Page 88: Epicor.instructor

7. Save and preview the report.a) Click Save.b) Select Use Saved Data to preview the report.

8. Exit the program.

Workshop - Defining Options for Booked Order ReportSorting, record selection criteria and prompting for data are considered options. If a report isgenerated directly inside Crystal Reports, the options are created using the features of Crystal.The BAQ Report Designer handles the optional criteria when a BAQ has been used for the reportitself. Options may be designed at the time you are creating the report definition or at the endof the Crystal Report formatting phase.

The Booked Order Report is to show orders booked within a certain date range and is to besorted by Order Number, Order Line, and Booked Type.

Add Options

1. Enter an option field.a) Click New and select New Option Field.b) In the Option Field column, select BookDtl.BookDate and press Tab.c) 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.

d) In the Compare Operator field, select >=.e) In the Order field, enter1 and press Tab.

2. Enter one more option field.a) Click New and select New Option Field.b) In the Option Field column, select LBookDtl.BookDateDate and press Tab.c) 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.

d) In the Compare Operator field, select <=.e) In the Order field, enter2.

3. Click Save.

Add Filters

Only indexed fields from the BAQ can be usaed as a filter. We will filter by the Customer Numberand the Product Group

1. Click New and select New Filter.2. In the Filter column, select Customer.CustNum and press Tab.3. Click New and select New Filter.4. In the Filter column, select BookDtl.ProdCode and press Tab.5. Click Save.

Epicor Software

88 | Crystal Reports Course | Independent Workshop: Create a Booked Orders Report

Page 89: Epicor.instructor

Add Sorts

1. Enter the first sort.a) Click New and select New Sort.b) In the Name field of the Sort Options section, type Order Number.c) In the Sort Fields section, click New.The Order Number sort line should be selected.

d) In the Sort Field field, select BookDtl.OrderNum.e) In the Order field, enter 10.f) Verify the Ascending check box is selected.g) Click Save.

2. Enter the second sort.a) Click New and select New Sort.b) In the Name field of the Sort Options section, type Order Number.c) In the Sort Fields section, click New.The Order Line sort line should be selected.

d) In the Sort Field field, select BookDtl.OrderLine.e) In the Order field, enter 20.f) Verify the Ascending check box is selected.g) Click Save.

3. Enter the third sort.a) Click New and select New Sort.b) In the Name field of the Sort Options section, type Booking Type.c) In the Sort Fields section, click New.The Order Line sort line should be selected.

d) In the Sort Field field, select BookDtl.BookType.e) In the Order field, enter 30.f) Verify the Ascending check box is cleared.g) Click Save.

Deploy the Report

1. Click the Actions menu and select the Deploy BAQ Report command.If necessary, confirm all your actions in the appearing dialog boxes.

2. Record path where the report was placed ______________________.This path would be important if this report was going to be published to the Main Menu.

Test the Report

1. Click the Actions menu and select the Test Report Form command.2. Enter a booking date range for the last 2 years.3. Select the Filter > Group sheet.4. Click Group, search for and select Fabricated.5. Click Print Preview to review the report.6. Close the report and remain in the BAQ Report Designer.

Epicor Software

Crystal Reports Course | Independent Workshop: Create a Booked Orders Report | 89

Page 90: Epicor.instructor

Miscellaneous Reporting Activities

This section addresses a number of additional reporting functions using the system and theCrystal Reports application.

At the end of this section, you will be able to:

• Create and use conditional formatting formulas.• Conditionally format fields using the Highlighting tool.• Format report sections using the Section Expert tool.• Use the Group Sort Expert feature.• Export reports into different formats for purposes of report distribution.

Conditional Formatting FormulasIn this section, you continue designing the Booked Order List report.

While formatting various objects on the report, many of the properties shown on the varioustabs of the Format Editor have blue x+2 icons beside them. If a property has such an iconbeside it, then that property can be conditionally formatted.

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 on any other available field.

Workshop - Use Conditional Formatting in Crystal ReportsWe will add some conditional formatting to the existing Booked Orders Report. This workshopshows how to 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’sbooked orders over a period of time in purple, if the total exceeds $50,000.00, and in red if thetotal is less than $1000.00. To do this, you must perform conditional formatting on the Group#2 Name: Customer.Name field in Group Header #2. This will be based on values in the SUMof the BookDtl.BookValue field in Group footer #2.

Open Crystal ReportsYou should be able to access the existing report either through the BAQ Report Designer orthrough the Crystal Report Open File function.

If you closed, navigate to BAQ Report Designer.

Menu Path: Executive Analysis➤ Business Activity Management➤ General Operations➤ BAQ Report Designer

1. On the Details sheet, verify the Booked Orders Report is selected.2. Click the Actions menu and select the Design Crystal Report command.Crystal Report launches.

Add a Colored Formula

1. Select the Preview sheet.2. Locate the customer Edwards International in the Fabrication product group.3. Add a formula.

Epicor Software

90 | Crystal Reports Course | Miscellaneous Reporting Activities

Page 91: Epicor.instructor

Right-click the customer’s name in Group Header #2 and select Format Field.a)b) On the Font sheet next to the Color field, click the x+2 formula button.

The Format Formula Editor - Font Color window opens.

4. Add the first formula condition.a) In the formula window, type If.

If there is text in the window, delete it.

b) Double-click the Group #2: Customer.Name-A:Sum of BookDtl.BookValue fieldunder the Report Fields listing in the second column.

c) Enter a greater than sign, or select it from the Operations and Comparisons listings inthe fourth column.

d) Type 50000 after the greater than sign (without any commas or decimal points).e) Press Enter twice, then optionally Tab to indent.

5. Add formula result for the first condition.a) Type Then to begin this line.b) Select Purple from the Functions and Color Constants listings in the third column.c) Press Enter twice, then optionally Tab to indent.

6. Enter the second formula condition.a) Type Else if to begin this line.b) Choose Group #2: Customer.Name-A:Sum of BookDtl.BookValue again under theReport Fields listing in the second column.

c) Enter a less than (<) sign, then type 1000.d) Press Enter twice, then optionally Tab.

7. Add formula result for the second condition.a) Type Then to begin this line.b) Select Red from the Functions and Color Constants listings in the third column.

8. Verify the formula.If Sum ({BookDtl.BookValue}, {Customer.Name}) > 50000 Then crPurple Else ifSum ({BookDtl.BookValue}, {Customer.Name}) < 1000 Then crred.

9. Click the Save and close button

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

10. Click OK, then 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 aformat is applied, else some other format (or none) is applied.

Conditionally Format Fields Using the Highlighting ToolHighlighting is an alternative to Conditional Formatting. The following are considerations to beaware of when deciding between Highlighting and Conditional Formatting:

• Highlighting overrides both absolute formatting and conditional formatting.• It allows you to set font color, background color and border style all in one place.• You can only apply Highlighting to number or currency fields, and it only reflects theperformance of the field being selected.

Epicor Software

Crystal Reports Course | Miscellaneous Reporting Activities | 91

Page 92: Epicor.instructor

• Highlighting can be undone using the Undo button on the Standard toolbar.• The Highlighting tool uses a simple fill-in-the-blank tab instead of writing a formula.

Workshop - Use the Highlight Expert in Crystal ReportsThis workshop shows how to use the Highlighting Expert in Crystal Reports as an alternativeto Conditional Formatting.

Use the Highlighting Expert to format the Sum of BookDtl.BookValue field in Group Footer #2with similar parameters used to conditionally format the Group #2 Name field.

Any Sum of BookDtl.BookValue that is greater than $100,000.00 will have a double box aroundit, any Sum of BookDtl.BookValue that is greater than $50,000.00 will have a font color ofpurple, and any Sum of BookDtl.BookValue that is less than $100.00 will have a font color ofred.

Navigate to the Booked Order List report, or re-open it.

1. Select the Preview sheet.2. In the Group Footer #2 (GF2) section for Edwards International, right-click the Sumof BookDtl. BookValue field and select Highlighting Expert.

3. Add double box highlight condition.a) On the left-hand side of the window, click New.b) In the Item editor section in the Value of: field, enter this field is greater than orequal to 100000.

c) In the Border field, select Double box.

4. Add font color highlight condition.a) On the left-hand side of the window, click New.b) In the Item editor section in the Value of: field, enter this field is greater than50000.

c) In the Font color field, select Purple.

5. Add one more font color highlight condition.a) On the left-hand side of the window, click New.b) In the Item editor section in the Value of: field, enter this field is less than or equalto .001.

c) In the Font color field, select Red.

6. Click OK to finish.7. Click Save and preview the report.

Format Report Sections Using the Section Expert ToolThe Section Expert is a powerful and flexible tool for formatting different sections of your report.Some of the options available in the Section Expert window under the Common tab include:

• Free-Form Placement - This option allows you to place objects anywhere on your reportwithout having to adhere to the grid layout, subject to the effect of the Snap to Grid option.

• Hide (Drill-Down OK) - If you wish to prevent an area/section of your report from printing,but you still wish to allow the user to double click on a summary field to show the underlyingdata, enable this option.

• Suppress (No Drill-Down) - Enable this option to prevent a section of your report fromprinting and to disallow drill-down capability on the summary field. You may write a Boolean(on or off) formula to make this command conditional.

Epicor Software

92 | Crystal Reports Course | Miscellaneous Reporting Activities

Page 93: Epicor.instructor

• Print at Bottom of Page - To force whatever is in a section to print as low on the page aspossible, enable this option. It can also be made conditional via a Boolean formula.

• New Page Before and New Page After - You may also make these settings conditionalwith a Boolean formula. Use these options with Group Headers and Group Footers to forcea page break just before or just after entering the section to which this setting was applied.

• Reset Page Number After - This features is typically applied to a Group Footer, and itcauses the page number to return to 1 after the section is complete. This command can alsobe made conditional with a formula.

• Keep Together - This option prevents data from a single record from spreading over twopages. Write a Boolean formula to make this option conditional.

• Suppress Blank Section - If this option is enabled, it will prevent the printing of a sectionof the report if all the fields in that section are blank.

• Underlay Following Sections - This command is typically used when you wish to use acompany logo as a watermark. It allows any objects that are in a section to “flow” into thenext while allowing objects from the next section to print on top of the first.

• Format with Multiple Columns - This option is displayed only if you highlight Details inthe Sections area of this window, or if in Preview or Design mode, you right click on D orDetails in the grey area to the left of your report. It allows you to create a report that showsthe details in columnar format, which works well when creating a simple phone list, forexample.

The option available in the Section Expert window under the Color tab allows a color to beselected as a background for any of the report sections.

Workshop - Use the Section Expert Tool in Crystal ReportsThis workshop shows how to use the Section Expert tool in Crystal Reports.

Add Page BreaksInsert a report break so that each Product Group’s data starts on a separate page.

1. Select the Preview sheet.2. On the Expert Tools toolbar, click Group Expert.

a) In the Group By section, select ProdGrup.Description – A.b) To open the Change Group Options window, click Options.c) Select the Options sheet and clear the Keep Group Together check box.d) Repeat the process for the Customer.Name – A group.e) Click OK twice to return to the report.

3. Create the page break after each Product Group section.a) On the Expert Tools toolbar, click Section Expert.b) In the Sections area, select Group Footer #1: ProdGrup.Description – A.c) On the Common sheet, select the New Page After option.

See also the Formula FAQs in the course Appendix for an option to write a conditionalformula to prevent Grand Totals from printing on a page by themselves.

d) Click OK to return to the report.

4. Click Save and preview the report.

Color Odd Numbered LinesSet the background color on each odd numbered Detail section of the report. This process canmake a report easier to read as each detail line will have alternating background colors.

1. Click the Preview tab.

Epicor Software

Crystal Reports Course | Miscellaneous Reporting Activities | 93

Page 94: Epicor.instructor

2. Open the background color editor.a) To the left of the report, right-click one of the D’s in the grey area and select SectionExpert.

b) Select the Color sheet.c) Next to the Background Color field, click the x+2 formula button to open the FormatFormula Editor – Background Color window.

3. Enter the formula condition.a) In the formula window, type If.If there is text in the window, delete it.

b) In the third column from the Functions and Math list, select Remainder.c) In the third column from the Functions and Print State list, between the parentheses,but before the comma, insert RecordNumber.This creates the required Numerator argument for the Remainder function.

d) After the comma, enter 2, the required Denominator argument for the function andposition the cursor outside the parentheses.

e) In the fourth column from the Operators and Comparisons list, select Not equal(x<>Y).

f) After the <> sign, enter 0 (zero).g) Press Enter twice, then optionally Tab.

4. Enter the formula result if the condition is true.a) Enter Then to begin this line.b) In the third column from the Functions and Color Constants list, select Aqua.c) Press Enter twice, then optionally Tab.

5. Enter the formula result if the condition is false.a) Enter Else to begin this line.b) In the third column from the Functions and Color Constants list, select NoColor.

6. Verify the formula.If Remainder (RecordNumber,2) <>0 Then crAqua Else crNoColor

7. Click Save and close, then OK.8. Click Save and preview the report.

Group Sort Expert ToolThis Expert tool allows you to sort the groups within a report based on a measure of performance.With the Group Sort Expert, 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 tohighest).

• Sort All (sorts all groups in the report in ascending or descending order as specified).

Workshop - Use the Group Sort Expert ToolThis workshop shows how to use the Group Sort Expert Tool in Crystal Reports.

In this workshop, you will do the following:

• Sort the totals of all product groups.

Epicor Software

94 | Crystal Reports Course | Miscellaneous Reporting Activities

Page 95: Epicor.instructor

• Highlight only the total of the top 2 product groups. All other product group's data will becombined into a group labeled as Other Groups.

• Report on only the top 2 product groups. All other product group's data will be excluded fromdisplaying on the report.

Copy Booked Order List Report

1. From the File menu, select Save As, and enter BookOrdrTopN.rpt as the file name.2. Select the Preview sheet.

Sort the TotalsSort the totals of all product groups.

1. Select the Preview sheet.2. On the Expert Tools toolbar, click Group Sort Expert.3. Select the ProdGrup.Description sheet.4. In the For this group 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 and preview the report.

Format Product GroupsHighlight only the total of the top 2 product groups. All other product group's data will becombined into a group labeled as Other Groups.

The reports Grand Totals will not change with this Top N/Group Sort.

1. On the Expert Tools toolbar, click Group Sort Expert.2. Select 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 and preview the report.

Report Product GroupsReport on only the top 2 product groups. All other product group's data will be excluded fromdisplaying on the report.

1. On the Expert Tools toolbar, click Group Sort Expert.2. Clear the Include Others, with the name check box.3. Click OK.4. Preview the report and save it using the Top N option of your choice.

Your grand totals have not changed, even though you have excluded all other customergroups from your report. This is because Crystal makes two passes through the data andcalculates and saves totals as it reads each record on the first pass through the data. Thecurrent grand total is saved with each record. Thus the automatic grand total displayed inthe Report Footer reflects the records selected and read, not the groups which are actuallydisplayed.

Epicor Software

Crystal Reports Course | Miscellaneous Reporting Activities | 95

Page 96: Epicor.instructor

Your choices at this point would be to:

• Suppress the grand totals and avoid the inevitable questions.• Describe the grand totals more fully ( they include order amounts from customer groupsnot shown).

• Make use of Running Totals, which are calculated when the report is printed rather thanwhen the records selected are read. Running Totals are discussed in the next section.

Running TotalsIt is a simple matter to create three running totals to solve the problem of incorrect grand totalsthat was encountered in the Group Sort Expert workshop. Although this process can beaccomplished in other ways, we will build the running totals using the Field Explorer tool andby inserting the field in the appropriate report section and column.

Instructor Note

Explain there are additional ways to enter running totals to a report. The steps identified inthe workshop are the suggested steps.

Workshop - Create a Running TotalThis workshop demonstrates how to create a running total on the BookDtl.BookValue field andother fields.

Navigate to the Booked Order List report, or re-open it.

1. Select the Preview sheet.2. Create a new running total field.

a) In the Field Explorer, right-click the Running Total Fields item and select New.b) In the Available Tables and Fields area, select BookDtl.BookValue.c) Click the right arrow button to move it to the Field to summarize field.d) For the Type of summary field, enter sum.e) In the Evaluate section, select For each record.f) In the Reset section, select Never.g) Click OK.

3. Repeat the process for the Gross Margin Formula Field and the BookDtl.OrderNumfield.For the Type of summary for the BookDtl.OrderNum running total, enter DistinctCount.

4. Insert the running total fields into the report.a) Select the Design sheet.b) Right-click on each running total field respectively and insert it into the Report Footersection, below the Grand Total Fields and under the appropriate column.

5. Assign a descriptive label such as Running Totals.6. Click Save.

Epicor Software

96 | Crystal Reports Course | Miscellaneous Reporting Activities

Page 97: Epicor.instructor

Export Reports into Different Formats for Purposes of Report DistributionTo export is to distribute a report to a disk file or through email. Crystal Reports allows theexport of reports in many popular spreadsheet, database, word processor, HTML, and datainterchange formats.

The following workshop illustrates file export capabilities in Crystal Reports. Students mayexport the Booked Order List report from the previous workshops, if desired.

Workshop - Export ReportsThis workshop shows how to export reports from Crystal Reports.

Navigate to the Booked Order List report, or re-open it.

1. Export the report.a) From the File menu, select Export > Export Report.b) In the Format field, select Microsoft™ Excel.c) Select Application for the Destination field and click OK.d) Accept the default prompts and click OK to export the report to Excel.

2. Repeat the process to export to other applications like Microsoft™ Word, Adobe Acrobat,and HTML 4.0.

The specific applications are not as important as repeating this process.

3. Export to a Report Definition.a) From the File menu, select Export > Export Report.b) In the Format field, select Report Definition.c) In the Destination field, select Application and click OK.d) Accept the default prompts and click OK to export the report.

This produces a Notepad document that describes the various formulas included in thereport and each and every object inserted into the report sections. It becomes a verylong report but some useful information is available to the current designer or anyoneelse who is trying to analyze the report design.

Epicor Software

Crystal Reports Course | Miscellaneous Reporting Activities | 97

Page 98: Epicor.instructor

Conclusion

Congratulations! You have completed the Crystal Reports course.

Please take a moment to let Epicor know how to serve you better by completing a courseevaluation at http://www.keysurvey.com/survey/191084/2e21/. Your feedback provides theguidelines for the future direction of Epicor education.

Instructor Note

Ask students the following:

• Have the objectives for this course been met?• Have the expectations for this course been met?• What questions do you have?

Refer students to other courses for those questions that cannot be answered in this course.

Ask students to complete the evaluation.

Epicor Software

98 | Crystal Reports Course | Conclusion

Page 99: Epicor.instructor

Appendix

This section contains the following documentation:

• Crystal Report Strategy Sheet for the following reports:

• Early Late Job Report• Manufactured Parts Listing Report• On-Hand Quantity Report - ALL Parts• Direct Labor Report by Department• Booked Order Report

• Crystal Reports Formula Frequently Asked Questions

Group Sort Expert ToolThis Expert tool allows you to sort the groups within a report based on a measure of performance.With the Group Sort Expert, 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 tohighest).

• Sort All (sorts all groups in the report in ascending or descending order as specified).

Workshop - Use the Group Sort Expert ToolThis workshop shows how to use the Group Sort Expert Tool in Crystal Reports.

In this workshop, you will do the following:

• Sort the totals of all product groups.• Highlight only the total of the top 2 product groups. All other product group's data will becombined into a group labeled as Other Groups.

• Report on only the top 2 product groups. All other product group's data will be excluded fromdisplaying on the report.

Sort the TotalsSort the totals of all product groups.

1. Select the Preview sheet.2. On the Expert Tools toolbar, click Group Sort Expert.3. Select the ProdGrup.Description sheet.4. In the For this group 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 and preview the report.

Format Product GroupsHighlight only the total of the top 2 product groups. All other product group's data will becombined into a group labeled as Other Groups.

Epicor Software

Crystal Reports Course | Appendix | 99

Page 100: Epicor.instructor

The reports Grand Totals will not change with this Top N/Group Sort.

1. On the Expert Tools toolbar, click Group Sort Expert.2. Select 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 and preview the report.

Report Product GroupsReport on only the top 2 product groups. All other product group's data will be excluded fromdisplaying on the report.

1. On the Expert Tools toolbar, click Group Sort Expert.2. Clear the Include Others, with the name check box.3. Click OK.4. Preview the report and save it using the Top N option of your choice.

Your grand totals have not changed, even though you have excluded all other customergroups from your report. This is because Crystal makes two passes through the data andcalculates and saves totals as it reads each record on the first pass through the data. Thecurrent grand total is saved with each record. Thus the automatic grand total displayed inthe Report Footer reflects the records selected and read, not the groups which are actuallydisplayed.

Your choices at this point would be to:

• Suppress the grand totals and avoid the inevitable questions.• Describe the grand totals more fully ( they include order amounts from customer groupsnot shown).

• Make use of Running Totals, which are calculated when the report is printed rather thanwhen the records selected are read. Running Totals are discussed in the next section.

Crystal Reports Frequently Asked Questions about FormulasAdding Crystal Report formulas may enhance the report writing processes. Some questions thatare commonly asked are explained below.

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

Answer: If you have a range parameter, it will not display if you drag it into the report.However, a parameter field can be used in a formula field, which can then be placed on yourreport. Below are formulas that convert various field types used as range parameters.

"From: " + ToText(Minimum({?DateRange}))+"To: " +ToText(Maximum({?DateRange}))

Date Range

Where ?DateRange is your parameter.

Epicor Software

100 | Crystal Reports Course | Appendix

Page 101: Epicor.instructor

"From: " + ToText(Minimum({?NumberRange}),0,"")+"To: " +ToText(Maximum({?NumberRange}),0,"")

Number Range

Where ?NumberRange is your parameter.

"From: " + Minimum({?StringRange})+ "To:" + Maximum({?StringRange})

String Range

Where ?StringRange is your parameter.

Create a formula thus;- (for Crystal Reports Version 9, you need to 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 that the empty/null field is warehse.description (this can be replacedin the formula with the table.field name that is pertinent to your report).

Create a new formula field called WhseDesc.if isnull({warehse.description}) then "Warehouse Code Not Found" else{Warehse.Description}

Example 2:

Conditional signature lines is an example where this may be used, with an option to alsoshow a generic statement or name when none is available or not needed. One of the thingsthat Crystal does is differentiate between nulls and empty. One of the options in Crystal isto convert nulls to a default value.

Under Report Options, verify the Convert option is set. To determine an empty field, theformula would be LENGTH( TRIM( {Field Name} ) ) = 0. Equals EMPTY. This formulais used if the field is empty and a default signature is used.IF LENGTH( TRIM( {Signature Field} ) ) = 0 THEN "Howard Low" ELSE {SignatureField}

Epicor Software

Crystal Reports Course | Appendix | 101

Page 102: Epicor.instructor

3. How do I convert the LaborHed ClockOutTime and ClockInTime fields, which arenumbers (e.g., 1450) to regular time (e.g., 2:30)?

Answer: Create a new formula field called ClockOut. To convert ClockInTime, substitute theClockInTime field in the formula below.NumberVar nbrTime:= IIF(not(IsNull({LaborHed.ActualClockOutTime})) AND{LaborHed.ActualClockOutTime}<25 AND{LaborHed.ActualClockOutTime}>0,{LaborHed.ActualClockOutTime},0);NumberVarnbrHour := 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.99cTime(nbrHour,nbrMinute,nbrSecond);

4. How do I prevent the Grand Totals from printing on a single page of the reportwhen formatting a report with a page break per group?

Answer: Write a conditional formula "Not OnLastRecord" on the new page after Property.

Epicor Software

102 | Crystal Reports Course | Appendix