Beruflich Dokumente
Kultur Dokumente
Instructor
Disclaimer
Copyright 2008 by Epicor Software Corporation. All rights reserved. Printed in the United States of America. No part of this publication may be reproduced in any form without the prior written consent of Epicor Software Corporation. Epicor, Vantage, and Vista are registered trademarks of Epicor Software Corporation. All other trademarks are property of their respective owners. Microsoft product screen shots reprinted with permission from Microsoft Corporation. Epicor Software Corporation makes no representations or warranties with respect to the contents of this document and specifically disclaims any implied warranties of merchantability, satisfactory quality or fitness for any particular purpose. The contents of this document are believed to be current and accurate as of its date of publication. Changes to this document between reprintings and other important information about the software product are made or published in release notes, and you are urged to obtain the current release notes for the software product. We welcome user comments and reserve the right to revise this publication and/or make improvements or changes to the products or programs described in this publication at any time without notice. The usage of any Epicor Software shall be pursuant to an Epicor end user license agreement and the performance of any consulting services by Epicor personnel shall be pursuant to Epicor's standard services terms and conditions.
ED84690
90521-900-9226-583503
9.04.503
Contents
Crystal Reports Course................................................................8 Before You Begin.......................................................................10
Audience.................................................................................................10 Prerequisites...........................................................................................10 Setup.....................................................................................................10
Overview...................................................................................18
Create a BAQ Report................................................................................20 BAQ Report File Locations..........................................................................20 Workshop - Define BAQ Report Paths..................................................21 BAQ Report Header Detail.........................................................................22 Workshop - Define Report Header Detail.............................................23 Optional Fields.........................................................................................24 Workshop - Add Option Fields............................................................25 Filters.....................................................................................................25 Workshop - Define Filters..................................................................26 Sorts......................................................................................................27 Workshop - Label Sorts.....................................................................27 The BAQ Report Designer Actions Menu.......................................................28 Test the BAQ Report.........................................................................29 Generate Sample Data......................................................................29 Design Crystal Report.......................................................................30 Deploy the BAQ Report.....................................................................30
Access the Standard Report Wizard....................................................34 Select Data Sources.........................................................................34 Select the Tables..............................................................................35 Review the Links..............................................................................35 Review the Fields.............................................................................35 Review the Optional Choices..............................................................36 Save the Report...............................................................................36 Resize Field Lengths.........................................................................36 Move the Fields...............................................................................37 Insert a Field...................................................................................37 Add a Report Title............................................................................37
Database Concepts....................................................................39
Identify Table and Field Names...................................................................39 Using the Online Technical Field Help..................................................40 Customization Tools.........................................................................41 Data Dictionary Viewer.....................................................................43 Table Linking...........................................................................................44 Dataset Relationships Tracker............................................................45 Join Types.......................................................................................47
Rename Column Headers..................................................................58 Format Column Headers...................................................................58 Insert Special Fields.........................................................................59 Resize and Format Special Fields........................................................60 Perform Additional Report Formatting.................................................60 Insert a Line...................................................................................60 Add Boxes......................................................................................60 Insert Company Logo.......................................................................61 Workshop - Defining Options for Manufactured Parts Listing...........................61 Add an Option.................................................................................62 Add a Filter.....................................................................................62 Add a Sort......................................................................................62 Test and Preview the Report..............................................................62
Add a Report Definition.....................................................................76 Add a Report Style...........................................................................77 Create the XML File..........................................................................77 Set the Database Location.................................................................77 Insert a Company Logo.....................................................................78 Suppress Closed Lines on the PO Form...............................................79 Establish the Modified Form as the System Default.......................................80 Workshop - Establish the New Purchase Order Form as the System Default.80
Workshop - Use the Group Sort Expert Tool.........................................94 Running Totals.........................................................................................96 Workshop - Create a Running Total ....................................................96 Export Reports into Different Formats for Purposes of Report Distribution........97 Workshop - Export Reports................................................................97
Conclusion................................................................................98 Appendix...................................................................................99
Group Sort Expert Tool..............................................................................99 Workshop - Use the Group Sort Expert Tool.........................................99 Crystal Reports Frequently Asked Questions about Formulas........................100
Epicor Software
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 IM communication 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 the flipchart/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 and record these on the whiteboard/flipchart. Explain that both the facilitator and students must try to avoid learning roadblocks and to tell each other when they arise. Ask students if they have questions about the learning roadblocks.
Epicor Software
Audience
Specific audiences will benefit from this course. System Administrator IT/Technical Staff
Prerequisites
Before you begin this course, be sure you understand the prerequisite knowledge contained in other valuable courses. Navigation Course - This course introduces the navigational aspects of the system's user interface. Designed for a hands-on environment, general navigation principles and techniques are available at each of the interface levels of system, module, and program within the application. Workshops focus on each of these levels and guide you through each navigational principle introduced. BAQ and Advanced Dashboard Course - The Business Activity Query (BAQ) program allows the user to create personalized queries and copy standard queries so they can be modified. Once a query is created, it can be viewed through the Dashboard interface. The queries can also be exported as .xml or ASCII files which allow the user to view and edit third party applications. Queries can be created that are only available for the user, or they can be shared queries available to everyone in the company. Recommended Industry Knowledge: Exposure to other database report generator programs 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
Setup
Setup 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 Epicor USA (EPIC03) company. To ensure successful results, you must complete all workshops logged into the same database and company. You may need to contact a manager for help to ensure the database is properly installed. Determine if the database is installed on the client server ("networked-environment") or installed locally.
Epicor Software
A networked-environment exists when one education database is installed on the client server and all trainees are accessing that server at the same time. Some issues can arise during application training within a networked-environment. Successive Self-Paced Training: Because some courses share the same data requirements (part numbers, inventory transactions, and group IDs), a clean or restored copy of the data is required after each time a student completes a course. The education database can easily be restored at any time to provide fresh data for subsequent training sessions. Concurrent Self-Paced or Classroom Training: Sometimes more than one student is training on the same course at the same time. If these multiple users have access to a single installation of the same education data, any data that is created or updated during this 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: Database Login Password Company Default Epicor900 manager manager EPIC03 - Epicor USA
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 the implementation phase, you may wish to add codes applicable to the company's business when demoing or ask students to add codes applicable to their company's business as they complete the workshops. It is highly recommended to review the account that will be used for training to verify all codes and constants are appropriate based on the workshops and to familiarize yourself with the course. At times the Facilitator Notes suggest the instructor complete each workshop, and then ask students to complete the workshop. If a small number of students are in class, you may prefer to do the workshops together. Open a system session to navigate to programs within the course. Use the Alt + Tab keys to navigate between the course and system session. Verify documentation (e.g., program and field help) execute on your PC and the student's PC's. If training in a networked environment, please read the Networked Environment Guidelines document prior to training. This document is available as a Shared Document on the EPICweb.
Epicor Software
Epicor Software
Report Sections display area Actual report preview area Instructor Note 1. Navigate to a sample report. C:\Program Files\Business Objects\Crystal Reports 11.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 reports are written. Report Design Window The components of this window are related primarily to the textual elements of a report - the headers, 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 will be 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 is often where the report date and the company logo are placed. Additional special fields such as Report 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. Column headings print in this section by default. Details When selecting the data fields to be included in the report, place them in the Details area. The size of these fields may be adjusted as needed for the report. Keep in mind, if there are 1,000 records 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 print one 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. This may be another place to put page numbers and information such as the company address and phone number. Field and Report Explorer The Field Explorer and Report Explorer are combined in a window docked by default to the right side of the report area. This explorer tool can be undocked to float or closed and opened via the Menu bar or the Field or Report Explorer buttons on the Standard toolbar.
Epicor Software
Instructor Note Navigate to the Field Explorer window and then the Report Explorer and demonstrate the components outlined for each below. Field Explorer The Field Explorer is used to insert, delete, or modify fields for your report and is available on both the Design and Preview tabs. It displays a tree view of Database fields and Special fields that can be added to a report as well as Formula, Parameter, and Group Name fields that are defined for use in the report. A toolbar 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 report objects contained in each section. Within each section, the report's fields and objects are listed. Any item selected in the tree view will 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 you right-click on an item, a menu that contains the actions that can be carried out on the item displays. For example, if you right-click on a text object, the menu will contain the options to edit 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
Setup Review
Before designing a Crystal Report in this course, several Crystal Reports' defaults must first be set. Some of these defaults change the layout and operation of Crystal Reports. Others change the 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 are available at the report level as well. Some are best left to the field level, like can grow.
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 purpose of this is to execute, or refresh, the query inside of Crystal on demand while formatting the report. This course uses the BAQ Report Designer to define the Crystal Reports and therefore, the query execution is controlled at the BAQ Report Designer level.
Set up Numbers
The numbers sheet is used to customize how numbers display on the report.
Epicor Software
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 Customize 5. Select the Use Accounting Format check box, then clear it. Negatives will now display as (123) rather than -123. You could also change such formatting features as the number of decimal places to display, and how many decimal places to round to. 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, for example. 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 Enable Currency Symbol check box and Floating option is selected automatically. Floating options positions the symbol to the left of the number value displayed. Fixed option positions the symbol at the far left side of each number displayed. 9. 10. 11. 12. In the Currency Symbol field, enter a dollar sign. Clear the Enable Currency Symbol check box Click OK once to exit the Custom Style window. 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 03 5. In the Day field, select 01 6. 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.
Epicor Software
The option changes take effect when the next time a report is designed, or if a report is currently being designed. Some of them might take effect when the next field is inserted. There is no effect on any work that you have already done.
Epicor Software
Overview
The BAQ Report Designer enables you to turn a Business Activity Query (BAQ) into a Crystal Report. You create these personalized queries through Business Activity Query; you design 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 BAQ must contain the Company column within its table; if the Company column is not present, the BAQ report will not work properly. After you finish creating the BAQ, you will then select it on your report. The BAQ Report Designer is the intermediary step between creating BAQ and formatting finalized Crystal Report. The purpose of the BAQ Report Designer is to allow you to design a BAQ Report user interface directly from your Business Activity Queries. Important In order to effectively use the BAQ Report Designer, you should have solid knowledge of both Business Activity Queries and Crystal Reports. The reports you create through this tool are flat reports; they are restricted to only pulling data 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 a Company 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 sending it 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
BAQ Report Examples There are several standard BAQ reports already in the system:
Epicor Software
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 ability to customize them as needed. You can link to user defined fields in the Report Parameters table as well. This allows you to pass additional information to Crystal Reports, expanding the power of Crystal when you are designing report layouts.
The standard BAQ Report interface for the Employee Efficiency Report is a good example to reference as you progress through the course, as this report was created using the BAQ Report Designer. The Employee Efficiency report is located under the following: Menu Path: Production Management Job Management Reports Employee Efficiency The Employee Efficiency report summarizes labor details. You can filter this report by departments, employees, or both. Also note this report only displays labor data for the dates you select.
Epicor Software
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 Reports Executable C:\Documents and Settings\All Users\Application Data\Epicor\Vantage\8.03.304\VN10T\shared\Reports\SampleData for Sample Data Directory C:\Documents and Settings\All Users\Application Data\Epicor\Vantage\8.03.304\VN10T\shared\Reports for Local Reports Directory Note The path statements above should not be considered recommended path statements as they are only examples. Be sure to select the Copy Report Locally check box so the BAQ Report Designer creates a duplicate 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 Report Template. Instructor Note Review the help information for these fields: Server Reports Directory BAQ Report Template
Epicor Software
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 for each user. c) Click Apply. 3. From the Actions menu, select the Design Crystal Report option to verify that the Crystal Report Executable path is correct. If the path is correct, Crystal Reports opens. 4. Exit Crystal Reports.
Epicor Software
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, the Report ID and the Crystal Report file are EmplEff, and the Description and the Form Title are 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. 2. 3. 4. 5. From the New menu, select New Report Definition to create a new BAQ report. In the Report ID field, enter EmplEff. Note that this populates the Crystal Report field. In the BAQ ID field, search for and select zEmployeeEfficiency. Enter Employee Efficiency Report as the Description and the Form Title. Click Clear.
Explain that you will go through these in further detail in a later workshop.
Epicor Software
report plan; however, they may be defined before the report is formatted using Crystal Reports, 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 complete this workshop.
Optional Fields
The BAQ Report Options enable you to set up the main user input fields for the report. These fields allow users to define the BAQ data that will display when the report is generated. For example, 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 BAQ report. When you have selected the query on the BAQ Report Designer - Detail sheet, use the Option Fields sheet to turn any field on the selected BAQ into an input field. You can then enter the Field Label for the option field and the Compare Operator that defines what data will be displayed 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 are option fields. Instructor Note Demo Bring the Employee Efficiency Report interface up and point out the To and From fields in the Report Options section as examples of option fields. In the BAQ Report Designer, click Report ID and click Search. Select EmplEff. This brings up 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 the actual 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
Instructor Note Note that students should be able to use the standard report zAPInvHedOpen to complete this 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) e) f) g) h) Click the empty cell of the Field Label column to populate it. Change the Field Label from Invoice Date to Enter Start Date. In the Compare Operator field, select the Greater Than or Equal To option (>=). Verify the Data Type is date. 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.
Filters
The Filters sheet enables you to define the various filters that will be available on the BAQ report's Filter tab. These items restrict the records that will print on a report. Filters can limit reports 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
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 options on 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 actual report interface as Type Code. 2. From the New menu, select New Filter to create a new filter (using the zEmployeeEfficiency 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.
Epicor Software
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.
Sorts
Use 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. These sort 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 Crystal Reports. Remember that grouping inside Crystal is the first sort in Crystal. There may be times when you want to handle the sort options within Crystal, rather than limit the raw 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 and JCDepartment\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 the Employee\JCDepartment BAQ from the previous demonstration). To demonstrate how to add either new sort options or sort fields, press Enter after the last 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 Sort Fields, Order, and whether or not to use an Ascending or Descending sequence for each sort. Explain that you will go through these in further detail in a later workshop.
Epicor Software
Instructor Note Note that students should be able to use the standard report zAPInvHedOpen to complete this 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.
Epicor Software
Import BAQ Report Use this program to move a BAQ report back into the manufacturing system. This option requires the creation of a new identifier for the report. You will also indicate whether or not this report can be edited within the BAQ Report Designer.
Epicor Software
The interface between Epicor and Crystal requires that a background "temp" .xml file is created. Once created, it becomes the datasource for the Crystal Report. The Generate Sample 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 xml file is available for Crystal to use. The sample data is designed to present a subset of the actual data - just enough for you to format the Crysal Report. It is always a good idea to check the number of records that were pulled by the initiall execution of the BAQ. The full amount of data will be displayed once the report has been deployed.
Epicor Software
Epicor Software
Epicor Software
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.
Epicor Software
Epicor Software
Epicor Software
Reorder the fields using the up and down arrows above the Fields to Display box if necessary. 3. Click Next.
Epicor Software
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.
Insert a Field
Insert a calculated field using the Field Explorer that is usually located on the right side of the screen. 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 Formula Editor screen. a) Under Report Fields, double-click the BAQReportResult.JobHead.DueDate field to select 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 and drag 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.
Epicor Software
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 BAQ until that BAQ is deployed. All the data will display the next time the report is displayed after deployment. This is meant to be a demo of how a simple report can be made in the Crystal Report Wizard. Other formatting, such as column heading definition, are discussed in future workshops. 8. Exit the program.
Epicor Software
Database Concepts
This section introduces database topics related to the custom report generation process. Topics covered will include discussion on the following: Table and field name identification. When writing reports using Crystal Reports, a fundamental requirement is to identify the tables within the database that contain the data required for the report. Additionally, you must 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 for directly 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 pull records from both tables. This linking process involves identifying which table is to be the parent and which is to be the child. The Parent/Child relationship is then further defined by finding common fields to use as matching criteria for record selection. This section discusses topics relative to table join concepts, requirements, and the use of indexed fields to create the table link. Join types. Once linking processes are understood, the discussion then turns to the three types of joins that 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 permission to use the Customization tool.
Epicor Software
Epicor Software
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 are discussed in the section dedicated to the Data Dictionary Viewer. Of importance to the BAQ writer 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 this case, the field is called Part.PartNum which means the table you want to use is the Part table and the Field you pull in the query is the part num. The syntax is always Tablename.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 characters that 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 Key Views 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 the Primary Bin field. The properties populate with the data on this field. Write down the table and field:_________________________. Some field information can be found in several tables. Is the query going to include warehouses? If so, then perhaps this field is useful. If not, the bin information has to come from another source. Note Often the data is stored in multiple places and the table selection depends on the purpose of the query. This example is to present a parts listing with part bin location. 5. Select the Plants -Warehouse-Bin Information sheet. Set the cursor in the Bin field on this 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 table structure of the database. Keep in mind that the data may reside in mutliple tables. The query topic will dictate where the data comes from. The customization feature is another good way to locate table sand fields.
Customization Tools
You can customize nearly every program within the application. A powerful tool, customizations can save you time and money, as these modifications let you directly match the application to your business needs. The application offers you a variety of customization tools. You can add controls like text boxes and lists which are then linked to a data source you can select. You can also create new sheets that you can make available to all users, specific users, and even different companies. You can also activate your own customized code through events or new buttons; this feature lets you run processes that are unique for your company. Within this course the Customization is used as a look-up tool to help identify table and field names 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 to the shipment, use the Customization Tools to locate and identify the table and field names that house this data.
Epicor Software
The system runs in two modes - Run Mode and Developer Mode. Normally you use the application in Run Mode. This means the application sheets are used for normal activities like data entry, operation processes, and report generation. Important In order to customize a program, your user record must be set up to allow customization rights. Your adminstrator assigns you these rights within the User Account Maintenance program.
Epicor Software
2. To verify that you are in this mode, click on the Options menu again. The Developer Mode command is not selected now.
Fields Sheet The Fields sheet displays specific information on each selected field. All the values for a selected field 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 information associated with that table. Each field has a unique name. Example The customer table includes the customer's identifying code (CustNum), the customer's name (Name), and other specific details about the customer.
Epicor Software
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 because of the data detail and definition it provides.
Table Linking
One necessary step in the table selection process is to link tables together. Links are created using one or more common fields to aid in the by selection of field data from multiple tables.
Epicor Software
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 matched up with the customer on the quote. Reporting or Querying tools use this connection to identify related records from one table with those from the other. With regard to the above example, the linking process ensures that the data 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 primary table to lookup specific records. For example, if the Quote was the primary table, the querying or reporting tool chronologically goes field by field through the Quote table and searches for matching records in the second table, which 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 relationship between their records. One table to multiple others This link type involves the primary table and lookup table having a one-to-many relationship between their records. Indexed Fields An index field points to the location of the data. It is a named path designed within the database to quickly locate and store data, or easily retrieve it in a table. The index name and path, or index order, are identified in Data Dictionary and in the online Field Help-Technical Details window. Note Always use the Company field as it is the FIRST indexed field, and because it is at the top of the system table hierarchy. Each companys data is stored and separated from other company data by using the Company ID field. Since each and every table uses the Company field, it is an indexed field and must be selected as one of the fields to use in a join. Instructor Note Tell students that there are no exceptions to this rule! The Company field must be selected as a join field pair when linking tables, because Company is at the top for table hierarchy in the system. Your report will not give the correct results when the field is not used in a join.
Epicor Software
Unlike other dashboard trackers, the Dataset Relationships Tracker automatically groups its grid by Dataset ID, Parent Table, and lastly, by Child. The Parent-Child table then displays the Parent field, its related Child field, and its Sequence. This helps illustrate the hierarchy within your database. Example The OrderHead table is the parent table to the OrderDtl table, or the Part table is 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 DataSet ID field, Parent Data Table field, or Child Data Table field. Click the Refresh button to search 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 tracker retrieves all records linked, starting with the first record, and displays the datasets in the Dataset 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 the Part 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 the tables?
Epicor Software
a) Determine the fields for the OrderDtl parent data table and the OrderRel child data table. 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 each other. When the Dataset Relationships Tracker returns no records, the table join must be manually determined. If an Advanced Search returns no dataset it means the tables are not directly related. It does not mean they can't be joined. The Data Dictionary Viewer can be consulted to determine the probable join fields.
Join Types
This section defines the three available types of joins, and in the process identifies when each type 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 from an inner join includes all the records in which the linked field value in both tables is an exact match. Records from either table that do not have a match in the other table are excluded from the report. The following diagram shows this relationship:
One example is joining the Customer table to the OrderDtl table, to create a view of customers and the orders they have placed. In this case, only customers with placed orders will be included in 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 the primary 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 value in both tables is an exact match. It also includes a row for every record in the primary, or left, table in which the linked field value has no match in the lookup table. Crystal Reports fills in the record fields with empty values when there is no exact match. The following diagram shows this relationship:
Epicor Software
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 appear with 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. The report output from a right outer join includes all the records in which the linked field value in both tables is an exact match. It also includes a row for every record in the lookup, or right, table in which the linked field value has no match in the primary table. Here again, Crystal Reports fills in the record fields with empty values when there is no match. The following diagram shows this relationship:
So, in the example, when using a right outer join to view all customers and the orders they have placed, you also get a row for every order without an assigned customer. These orders appear 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 to use left outer joins, which tend to be more portable and easier to read and use.
Epicor Software
Epicor Software
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.
Epicor Software
Everytime the Test Report function is run, a new .xml file is created in this directory. If there are more than one choices, then select the most recent date. 6. Click Finish. 7. 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.
Epicor Software
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 the report using Crystal Reports.
4. Click Print Preview to view the field The data displayed within the report is minimal if the datasource is the sample data generated in the BAQ Report Designer definition stage. The record count that in the sample
Epicor Software
datat is minimal, however, once deployed the report will show all the data you expect.. You only need a subset to format the report, however, if you need to see all the data, applies will be smaller than the true datasaet when then If the .xml datasource is used from the MFGSYSDATA\Reports\MANAGER\ directory then the 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 is evidenced by the cross-hatching that appears when not wide enough. 5. 6. 7. 8. Select the Design sheet to return to the Design window for field resizing. Shorten the BinNum column header and field width. Widen the PartBin.OnHandQty column header and field width. Click Save.
Epicor Software
This should be located toward the bottom of the list under the BAQReportResult.Whse section. 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.
Epicor Software
Epicor Software
Epicor Software
7. To format the third subtotal, right-click on a bolded Grand Total in one of the RF (Report Footer) 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.
Epicor Software
Epicor Software
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 the alignment given to the column headers in the Format Objects step.
9. Click Save.
Epicor Software
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 both for 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 space for 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
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 (down to 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, drop shadow, 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 to describe the totals. 7. Click Save and preview the report
Epicor Software
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. 5. 6. 7. In the Compare Operator field, select =. In the Default field, select M . In the Order field, enter 1. Click Save.
Add a Filter
Any indexed field in the BAQ is available to use as a filter. This provides an option when the report 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. 5. 6. 7. In the Sort Field field, select Part.PartNum. In the Order field, enter 10 to make this the primary sort. Verify the Ascending check box is selected. 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.
Epicor Software
2. Preview the report. 3. Close the report and the report form.
Epicor Software
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 and lower case letter as needed. Spaces before and after operators such as + and * are optional. If you point and click on an operator in the editor (instead of typing it), Crystal will insert spaces before and after the operator for readability. If you are using Crystal Reports XI Enterprise, Crystal formulas may be centrally stored using the Crystal Enterprise Repository (outside the scope of this course). Otherwise, the formulas may shared using copy and paste into a text file. The table and field names must be the same 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 in this course.
Epicor Software
Add a Report
Navigate to BAQ Report Designer. Menu Path: Executive Analysis Business Activity Management General Operations BAQ Report Designer 1. 2. 3. 4. 5. 6. Click New and select New Report Definition. In the Report ID field, enter DirectLbr (no spaces). In the Description field, enter Direct Labor Report. In the BAQ ID field, serach for and select EPIC03-DirectLbr. In the Form Title field, enter Direct Labor Report. Click Save.
Epicor Software
Epicor Software
Add a Formula
Add a formula to calculate labor and burden cost. Formulas may be created before the detail section is populated with fields, or afterward. The formula is a unique field that begins with the @ sign in the title. Some formulas are very complicated and would benefit from the addition of extra spacing in the formula. Crystal Reports ignores 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 into the 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 Editor screen, 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
Insert Fields
These fields can be inserted in any order and rearranged as needed. Generally, time is saved when 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 the guidelines. Also, the JobNum, AssemblySeq and OprSeq fields use more space than necessary and could be shortened. Their labels could be combined as well. 5. Click Save.
Insert Groups
Insert groups to make the report more readable. Two groups are inserted into this report. One to group by job costing departments and the other 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
4. On the Group By list, highlight JCDept.Description and click Options to open the Change Group Options screen. 5. On the Options sheet, select the Keep Group Together and Repeat Group Header On Each 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 Group Footers listed for the groupings defined.
Epicor Software
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.
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
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
Epicor Software
Field Menu ID
Name
Direct Labor Report This is the report name as it appears on the menu tree.
Security ID
SEC247 This can be a newly created security ID or an existing one. If you select an existing security ID, it should be one already available for at least one other report under the same parent menu.
Order Sequence
170 Order sequences are numbered by 10s. On this menu, 170 places the custom report as the last item on the menu list.
Program Type
Icon
Report This selects the standard Report icon used on the menu structure.
Program
Epicor.Mfg.UIRpt.BAQReport.dll This field point to the program needed to run the custom report and will default in.
Report
Epicor Software
Epicor Software
Dataset Location When a user runs a Crystal Report form, the system generates a number of XML dataset files and other related files. These files are extracted from the main Progress database tables, and are actually used to produce the desired form. These files are usually generated and located in the C:\...\mfgsysdata\Reports\ folder. The system creates the last segment of the path statement equal to the user that generated or ran the report. Note The location of the XML dataset locations will vary, depending on your unique installation. Please check with your network administrator or IS manager for specific information regarding your system. For purposes of this class, your instructor will confirm the 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 is then 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 XML file is created in the users folder. Before we can modify the Crystal Reports PO form, at least one PO has to be run so that the source files are generated, and so you can preview your work as you proceed. In addition, it is advisable 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 Crystal Reports. Again, these forms are stored in a unique location by the system. That location is X:\epicor\MfgSys\Server\Reports where X is the location of your server. For purposes of this 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 located and opened, immediately save it using a unique name. Then modify the newly saved form. The standard form serves as a starting point for modification and something to go back to should you need to restart. If you modify the standard form, subsequent patches or releases could overwrite your modification.
Epicor Software
Report Definition and Report Style Maintenance programs When these XML tables and fields are created by printing the form or report, the system includes fields that are considered the most commonly used fields, but excludes less commonly used fields. These fields exist, but are excluded as they are rarely used and including all of them will hinder printing performance. Most tables in the system allow for custom fields to be added, as needed. These fields are labeled Character01, Character02, etc. These fields will be excluded by default. If a custom or excluded field is needed in the Crystal Report form, then a new Report Definition must be created where the user intentionally includes the field(s) in the definition. This definition must then be defined as an additional report style through the Report Style program. When the report style is defined, it can then be selected when a form or report is printed. This creates the XML file that contains the desired field(s) in the dataset.
Add a PO Form
1. 2. 3. 4. 5. Navigate to the Crystal Reports application or re-open it. Open the standard PO form under X:\Epicor\MfgSys\Server\Reports\POForm.rpt. From the File menu, select Save As. For the new File name, enter POForm2.rpt . Keep Crystal Reports open, but minimize it and navigate to the system.
Epicor Software
a) Select the Report Table Excluded Fields sheet. 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 Fields columns for this table. d) In the Excluded Report Fields column, find OpenLine and use the left arrow button to move OpenLineit to the Included Report Fields column. 3. Click Save and exit the program.
Epicor Software
b) In the Replace with 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\Purchase Orderxxxxx.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 select the 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 the ReportDataSet option. f) Click Update to synchronize the ReportDataSets. g) Repeat the process if there is a Subreport ReportDataSet section in the Current Data Source section. 3. Verify the properties of each ReportDataSet to validate that both sections are pointing to the above selected XML file. a) In the Current Data Source section, select the Properties line item and verify the path. b) Right-click the Replace with: ReportDataSet item, then select Properties and verify the 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 Dataset tables connected to the report. These messages may or may not appear depending on if a preview occurs before or after a 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 Field under the PODetail table.
Epicor Software
Epicor Software
Workshop - Establish the New Purchase Order Form as the System Default
This 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. 2. 3. 4. Click the Report ID button to search for and select POForm. Move to the Styles sheet and select New Report Style from the New icon menu. Enter POForm Modified in the Description field. 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 will differ from the above saved report name. Be sure to select the correct saved report name as 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 your companies. A generic form may be all that is needed. One form could be flagged as Valid and 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 that the closed lines are now suppressed.
Epicor Software
Add a Report
Navigate to BAQ Report Designer. Menu Path: Executive Analysis Business Activity Management General Operations BAQ Report Designer 1. 2. 3. 4. 5. 6. Click New and select New Report Definition. In the Report ID field, enter BookedOrder (no spaces). In the Description field, enter Booked Orders Report. In the BAQ ID field, serach for and select EPIC03-BookOrders. In the Form Title field, enter Booked Orders Report. Click Save.
Epicor Software
Sample Data function creates that xml file. You do not see the full record count when the report is first previewed inside Crystal Reports. This datasource is then used inside Crystal Reports 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 xml file is available for Crystal to use. This is a good time to glance at the data being presented to make sure it has pulled the query data you expected it to pull.
Epicor Software
Add a Formula
Add 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 into the 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 Editor screen, select an asterisk.
Epicor Software
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 report more 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 the Change Group Options screen. 4. On the Options sheet, select the Keep Group Together and Repeat Group Header On Each 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
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 report could not be associated to a Product Group. These records were not included in the report after the group was added. Parts that were ordered that do not have a corresponding Part record would not appear once the group was added. These records will be returned to the report by changing the Links between BookDtl and the ProdGrup tables to a Left Outer Join.
Epicor Software
The window's title bar now reads Crystal Reports - [Booked Order List] reflecting the Report 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 left margin. 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.
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 the spaces 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
Insert a Line
Insert 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. 3. 4. 5. Draw a line below all of the column headers. Right-click on the line and select Format Line. Select the desired line width and color. Click Save.
Epicor Software
7. Save and preview the report. a) Click Save. b) Select Use Saved Data to preview the report. 8. Exit the program.
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 Number and the Product Group 1. 2. 3. 4. 5. Click New and select In the Filter column, Click New and select In the Filter column, Click Save. New Filter. select Customer.CustNum and press Tab. New Filter. select BookDtl.ProdCode and press Tab.
Epicor Software
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) e) f) g) In the Sort Field field, select BookDtl.OrderNum. In the Order field, enter 10. Verify the Ascending check box is selected. 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) e) f) g) In the Sort Field field, select BookDtl.OrderLine. In the Order field, enter 20. Verify the Ascending check box is selected. 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) e) f) g) In the Sort Field field, select BookDtl.BookType. In the Order field, enter 30. Verify the Ascending check box is cleared. Click Save.
Epicor Software
Epicor Software
a) Right-click the customers name in Group Header #2 and select Format Field. 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 field under the Report Fields listing in the second column. c) Enter a greater than sign, or select it from the Operations and Comparisons listings in the 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 the Report 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 if Sum ({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 from blue 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 a format is applied, else some other format (or none) is applied.
Epicor Software
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.
Epicor Software
Print at Bottom of Page - To force whatever is in a section to print as low on the page as possible, 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 conditional with a Boolean formula. Use these options with Group Headers and Group Footers to force a 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 it causes the page number to return to 1 after the section is complete. This command can also be made conditional with a formula. Keep Together - This option prevents data from a single record from spreading over two pages. Write a Boolean formula to make this option conditional. Suppress Blank Section - If this option is enabled, it will prevent the printing of a section of the report if all the fields in that section are blank. Underlay Following Sections - This command is typically used when you wish to use a company logo as a watermark. It allows any objects that are in a section to flow into the next while allowing objects from the next section to print on top of the first. Format with Multiple Columns - This option is displayed only if you highlight Details in the Sections area of this window, or if in Preview or Design mode, you right click on D or Details in the grey area to the left of your report. It allows you to create a report that shows the details in columnar format, which works well when creating a simple phone list, for example. The option available in the Section Expert window under the Color tab allows a color to be selected as a background for any of the report sections.
Epicor Software
2. Open the background color editor. a) To the left of the report, right-click one of the Ds in the grey area and select Section Expert. b) Select the Color sheet. c) Next to the Background Color field, click the x+2 formula button to open the Format Formula 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 and position 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.
Epicor Software
Highlight only the total of the top 2 product groups. All other product group's data will be combined into a group labeled as Other Groups. Report on only the top 2 product groups. All other product group's data will be excluded from displaying on the report.
Epicor Software
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 groups not shown). Make use of Running Totals, which are calculated when the report is printed rather than when the records selected are read. Running Totals are discussed in the next section.
Running Totals
It is a simple matter to create three running totals to solve the problem of incorrect grand totals that was encountered in the Group Sort Expert workshop. Although this process can be accomplished in other ways, we will build the running totals using the Field Explorer tool and by 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 in the workshop are the suggested steps.
Epicor Software
Epicor Software
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 course evaluation at http://www.keysurvey.com/survey/191084/2e21/. Your feedback provides the guidelines 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
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
Epicor Software
The reports Grand Totals will not change with this Top N/Group Sort. 1. 2. 3. 4. 5. 6. 7. On the Expert Tools toolbar, click Group Sort Expert. Select the ProdGrup.Description sheet. In the For this group field, select Top N. In the Where N is field, enter 2. Select the Include Others, with the name check box. Click OK. Click Save and preview the report.
Epicor Software
Number Range
"From: " + ToText (Minimum({?NumberRange}),0,"")+"To: " + ToText(Maximum({?NumberRange}),0,"") Where ?NumberRange is your parameter.
String Range
"From: " + Minimum({?StringRange})+ "To: " + Maximum({?StringRange}) Where ?StringRange is your parameter.
Create a formula thus;- (for Crystal Reports Version 9, 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 replaced in 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 also show a generic statement or name when none is available or not needed. One of the things that Crystal does is differentiate between nulls and empty. One of the options in Crystal is to convert nulls to a default value. Under Report Options, verify the Convert option is set. To determine an empty field, the formula would be LENGTH( TRIM( {Field Name} ) ) = 0. Equals EMPTY. This formula is used if the field is empty and a default signature is used. IF LENGTH( TRIM( {Signature Field} ) ) = 0 THEN "Howard Low" ELSE {Signature Field}
Epicor Software
3. How do I convert the LaborHed ClockOutTime and ClockInTime fields, which are numbers (e.g., 1450) to regular time (e.g., 2:30)? Answer: Create a new formula field called ClockOut. To convert ClockInTime, substitute the ClockInTime field in the formula below. NumberVar nbrTime:= IIF(not(IsNull({LaborHed.ActualClockOutTime})) AND {LaborHed.ActualClockOutTime}<25 AND {LaborHed.ActualClockOutTime}>0,{LaborHed.ActualClockOutTime},0); NumberVar nbrHour := nbrTime; NumberVar nbrMinute := Remainder(nbrHour,1) * 60; NumberVar nbrSecond := Remainder(nbrMinute,1) * 60; nbrHour := truncate(nbrHour); nbrMinute := truncate(nbrMinute); nbrSecond := truncate(nbrSecond); nbrHour := IIF(nbrHour<0 OR nbrHour>=24,0,nbrHour); // protect for the 0->24 data in DB, should only be 0.00 -> 23.99 cTime(nbrHour,nbrMinute,nbrSecond); 4. How do I prevent the Grand Totals from printing on a single page of the report when formatting a report with a page break per group? Answer: Write a conditional formula "Not OnLastRecord" on the new page after Property.
Epicor Software