Crystal Reports Reference

yellowbox

The Crystal Reports Reference is here to offer help on how to use the existing reports provided with TruckMate and to provide some basic hints on how your data is stored in the tables and views used in the TruckMate database.

Before you delve into the depths of the TruckMate database, you should begin by referencing the listing and descriptions of the many standard reports provided with TruckMate and the DB2 and SQL overview as an introduction to database objects, Crystal Reports, and SQL.

If you are already familiar with databases, you can go straight to the System Tables Index. The index lists every table and view used, as well as some that are not used (but may contain data because they were used by previous versions of TruckMate).

Many of the tables / views listed link to a definition page. The definitions offer a description of each field name in the table and its type. Many definitions also indicate what TruckMate programs use the table, as well as valid values for fields with special functions.

For information on using DB2 and SQL with Crystal Reports, see DB2 and SQL.

Crystal Report Overview

Report files included with the TruckMate system are created using Crystal Reports software. When you use a report function within the TruckMate system, a Crystal Report template file (indicated by a .RPT file name extension) is used to structure the appearance of the report and to filter and sort data records. You can create your own custom Crystal Report templates, and run them using the Crystal Report Launcher program. You can also add your custom Crystal Report template to the list of reports available in the Report Selection form.

When you create a new Crystal Report (using the 32 bit Crystal Report Designer program), you are prompted by a Report Expert, which helps you connect to the desired database, select the database tables on which you wish to report, select sort fields, etc.

  • To extract the contents of the STATUS table, select the STATUS table when prompted on the Data tab of the Report Expert. Continue with the Report Export process to configure other elements of the report.

  • To extract only the STATUS_CODE field from the STATUS table, select the STATUS table when prompted on the Data tab of the Report Expert. Then, on the Fields tab of the Report Expert, add the STATUS_CODE field to the Report Fields. Continue with the Report Export process to configure other elements of the report.

  • To extract only records where the value in the STATUS_CODE field is 'AVAIL', select the STATUS table when prompted on the Data tab of the Report Expert. On the Select tab of the Report Expert, add the STATUS_CODE field to the Select Fields, then configure the selection values so that STATUS_CODE 'is' 'equal to' 'AVAIL'.

To view examples of Crystal Report templates, you can open report template files that are included with the TruckMate system. These files have the extension of .RPT, and are located in the same directory as the program files (usually c:\Program Files\TruckMate 20xx\). Be very careful not to alter the original file. If you wish to experiment, make a copy of the original file first.

Note that if you create a custom report template that corresponds to a standard TruckMate Crystal Reports template that uses a query (for example, 'PAYSTMT.RPT' uses the query 'PAYSTMT.QRY'), the '.QRY' file must reside in the same directory as your custom report template. All query files are located in the directory where you installed TruckMate (by default: 'C:\Program Files\TruckMate 20xx\'). All query files have the extension '.QRY'. If you use a single directory to store all your custom report templates, you can copy all the '.QRY' files to your custom report template directory.

When launching most reports in TruckMate, a list of available reports along with their location pops up for selection. Centralizing these reports can be as simple as creating a shared folder, and specifying the location.

For example, instead of looking in: ‘C:\Program Files\TruckMate 20xx\Reports\’ for your reports, you can have the system look in: \\fileserver\tmwin\reports.

You can further refine the directory structure if desired, which allows you to keep things organized and provide appropriate security policies for different types of reports.

TruckMate requires a few configuration steps to interface properly with Report functionality:

  1. Crystal Reports XI Release 2 is needed if you want to modify or create reports for TruckMate 20xx. For customers running the full version of Crystal Reports XI, Release 2 is a free upgrade provided by Business Objects.

  2. Any custom reports from previous versions of TruckMate need to be verified, previewed, and then saved using Crystal Reports XI Release 2 BEFORE you can run them in any TruckMate application.

  3. TMW Systems provides Crystal Reports XI Release 2 Runtime files, which allow you to print and preview reports from within TruckMate 20xx, but NOT modify or create them. The runtime will be installed automatically during the full install of TruckMate 20xx.

Changes to the Crystal Component in TruckMate 2009

There has been a major change to TruckMate’s core Crystal support in version 2009, moving it from the TCrpe component to the Crystal RDC (Report Designer Component) ActiveX control. This was done for a number of reasons, primarily because the Crystal RDC control is a newer and better supported technology with other benefits (less bloat, faster).

When this change was done, the changes related to the TruckMate 2009 Multi-company functionality and the existing multi-company reporting functionality were made to work with each other. Previous to TruckMate 2009, an Application Configurator program option was present, labelled REPORTS > 'AllowCompanySelect'. When this is turned on ('True'), and the customer has multiple companies defined, they can select which company information is to be displayed in the report header through the report selection dialog (a new combo box listing the companies appears when this is turned on). The functionality in TruckMate is as follows:

Multi-Company value Allow Company Select value Action

Off (False)

False

Crystal Report functionality works as it did in TruckMate 8.0

True

The company selected through the Report Selection Dialog is displayed in the report header. The last company selected is remembered and the Report Selection Dialog defaults to this company.

On (True)

False

The company selected through the login dialog is displayed in the report header.

True

The company selected through the Report Selection Dialog is displayed in the report header. The Report Selection Dialog defaults to the company selected through the login dialog.

The only place where the selected company is decided without the use of the Report Selection Dialog is during Rendition Printing and when using the GL Financial Statement Designer program.

Multiple Data Sources

Additionally, Crystal Reports can now include data from data sources besides the logged in TruckMate database. If you create a Crystal report with multiple data sources (ODBC DSNs), TruckMate will now ignore any data source that begins with the word "CUSTOM". All other data sources are replaced with an automatically created TruckMate reporting DSN as normal (TM_Reporting_00001 for example).

Your "CUSTOM" data source will be able to link to any additional data you wish to be contained within your report, whether it be from any entirely different database, or another TruckMate database. Authentication information is not passed into this data source, and must be saved within your "CUSTOM" DSN.

This functionality could be used to link data from an Imaging database into a standard TruckMate Crystal report.

Standard Reports by Module

For best results when using these Crystal Reports, make sure to run the Report from the program mentioned in the Report description. If you run the Report from a different application, the results may be unexpected and/or incorrect.

Custom Crystal Reports

If any of the Crystal Reports included with TruckMate or any of the Report Packs does not meet your requirements for a specific task, the third party SAP Crystal Reports software application can be used to create and customize any report. Either internally within your own organization or by contacting your support representative and having a TMW Systems report designer create a customized version.