2.15.2.2 The New Crystal Report Viewer

<< Click to Display Table of Contents >>

Navigation:  2. ShipWeight Basics > 2.15 Reports and Documentation > 2.15.2 Crystal Reports in ShipWeight >

2.15.2.2 The New Crystal Report Viewer

ShipWeight Basics > Reports and documentation > Crystal Reports in ShipWeight

 

First time you run a report

Open the Crystal Report ShipWeight Viewer (menu: Project->Crystal Reports…).

CrystalReports-Menu

Then click the [+] button (1) to open the Select Report Window (2), where you can hit the Browse button (3) and select the Crystal Reports Template file (*.rpt).

ShipWeightCrystalReportsViewer1

Next, give the report a name (optional) and click OK.

CrystalReportViewer2

The name you enter for the report will now be the name shown in the droplist to select this report in future.

Selelcting a report for the second time (and onwards…)

After a report have been added by selecting the *.rpt file, you can from now on find it and select it from the report droplist:

CrystalReportViewer3

Remove a report from the list

If you want to remove the report from the list, select it in the droplist and click the [-] button.

CrystalReportViewer4

 

Setting report parameters and run the report

Fill in the report variables (1), which are custom for each report, and click the Run button (2)

CrystalReportViewer5

After the Run button is clicked the report will start running and appear in the View area of the window, where you will find the toolbar with functionality to print, export, zoom, page, etc. similar to the previous version of the ShipWeight Report Viewer:

CrystalReportViewer6

Setting default input variables for a report

To define default variables for the report (which then will be fill in every time you select the report), click the Properties button (1). Now the Properties window will open.

Here you can fill in default values in the area (2) and (3), when you are finished click OK (4).

CrystalReportViewer7

The Add and edit Report Chapters table show the Boolean parameters in the report. Set their default value to True if Checked and False if unchecked. The other fields are read only. The Chapter Name show the boolean parameter prompt text, and the ReportParameter show the ParameterName that correspond with the Parameter Field table in SAP Crystal Reports.  

AddAndEditReportChapters-CrystalReports

The table Add and edit Input Parameters contains the other parameters. It is possible to change the Default parameter field, the others are read only to show which type of parameter the default value is set for.

 

The Input name show the prompt text of the parameter.

 

The Type field in  the table show which type of parameter it is. It can hold 4 types of parameters; list, combo, text and text area.

List -  the default parameter is given in a list, you need to select one of the entries in that list. If the list is a listing from a database the default can not be set, the Selection and DbSource fields will contain a connection if this is the case. If the list is a list with given values the values can be found in the Input tab together with the Input Name corresponding to the Report variable. Select one of the values in that list.

Text - the default parameter takes in a text.

Combo - the default parameter is given in a list, but you can enter your own entry as well. E.g. it is a combo of a list and a text string. The list that you can select your default parameters from can be seen in the Input tab. Find the Input Name corresponding to the Report variables and select one of the entries as a default value or write in a new variable as default here in the Properties Window.

Text area - the default parameter takes in multiple lines with text.

 

The Selection show which table and row that is used from the Database if a database source is set in the DbSource field.

 

The DbSource filed show which database has been selected if there is a selection to be used for this parameter.

The Default value takes in the Default value for that parameter.

 

If the parameter has a condition it will be listed in the Condition field.

 

The Rep. Param show the name of the parameter that is used in the report.

 

CrystalReport_Properties-Type

Revision Area (optional)

In the new viewer you may store revision information in a table connected to the report and a project.  This information may also be retrieved and used in the report itself (requires this to be set up in the template file).

CrystalReportViewer8