December Tips      
TIP #1 :: 3 methods to work with & modify Parameter default values in multiple reports at the same time using .rpt Inspectorr

TIP #2 :: Analyzing which fields are used in your reports using .rpt Inspector


TIP #1 :: 3 methods to work with & modify Parameter default values in multiple reports at the same time using .rpt Inspector

Need to...

  • standardize the same parameter across multiple reports
  • add the same values to different parameters in one or multiple reports
  • add, remove, update or modify one or more values in one or more parameters, across one or multiple reports
  • simply copy a list of default values from one parameter and paste them to other parameter(s), even across multiple reports

Then read on for tips on how to use this powerful feature, with 3 methods to get you there.

For the tips below, it is assumed that you've opened all the reports that contain the parameters you want to work with.

Method 1:

I. Select the reports you want affected.

You can do this by either selecting them on the Objects Pane - Reports tab or on the Reports Tree.

Note: Throughout the product, there are context sensitive right mouse click pop-up menus. For example, you can quickly select all reports on the Objects Pane - Reports tab by right clicking on the grid on this tab to reveal a pop-up menu and then clicking on "Select All" or using the keyboard accelerator keys "Ctrl A" to do the same.

II. Go to the Objects Pane - Parameters tab.

III. Click any parameter in the grid of the Objects Pane - Parameters tab to have its properties displayed in the Properties Pane for the parameter.

IV. On the Properties Pane, click on the Default Values property.

In the Properties Pane you'll see two rows named Default Values. The first is a collapsible section that contains properties that pertain to the Default Values, so when we refer to the Default Values property, we mean the property in this section which has in parenthesis next to it's property label, the number of items (number of Default Values)

V. On the Properties Pane | Default Values property, click on the ellipse "..." to open the Default Values Editor dialog and modify / edit / or add the default values you want to be applied to all the selected parameters in the grid.

VI. When the Default Values Editor dialog is open, it's filter is pre-set to "In Common". The concept of "In Common" and "All" is most useful when working with multiple parameters selected in the grid (see method two, item VI for details). However, since in theory a single parameter is "In Common" to itself and the dialog is shared between a single selected parameter and multiple selected parameters, the way the dialog works is the same.

Note that ALL modifications (add, move up / down, edit, delete) can only be done when the filter is set to "In Common".

VII. To add a value, click on the "Add" button (the first button in this dialog's toolbar). A new row will be displayed in the grid of this dialog and here you can type a value and optionally a description. This value will be added to the end of the list.

VIII. To change the default values order, click on one default value and then use the "Up" and "Down" buttons on this dialog's toolbar to change the order -- one value at a time.


Method 2:

I. Select the reports you want affected.

You can do this by either selecting them on the Objects Pane - Reports tab or on the Reports Tree.

Note: Throughout the product, there are context sensitive right mouse click pop-up menus. For example, you can quickly select all reports on the Objects Pane - Reports tab by right clicking on the grid on this tab to reveal a pop-up menu and then clicking on "Select All" or using the keyboard accelerator keys "Ctrl A" to do the same.

II. Go to the Objects Pane - Parameters tab.

III. Click any parameter in the grid of the Objects Pane - Parameters tab to have its properties displayed in the Properties Pane for the parameter.

Note that as with other tabs in .rpt Inspector, when you select two or more rows, .rpt Inspector will show you the properties they have in common (on most tabs you can change the filter settings to also control what's shown in the grid, from "All" to "In Common" to "Not In Common", and also control the sensitivity threshold).

When selecting multiple parameters to work with, the value type should be the same. In other words, don't select a number and string at the same time, but feel free to select multiple number based parameters or multiple string based parameters, etc.

IV. On the Properties Pane, click on the Default Values property.

In the Properties Pane you'll see two rows named Default Values. The first is a collapsible section that contains properties that pertain to the Default Values, so when we refer to the Default Values property, we mean the property in this section which has in parenthesis next to it's property label, the number of items (number of Default Values)

V. On the Properties Pane | Default Values property, click on the ellipse "..." to open the Default Values Editor dialog and modify / edit / or add the default values you want to be applied to all the selected parameters in the grid.

VI. When the Default Values Editor dialog is open, it's filter is pre-set to "In Common". If you've selected two or more parameters in the grid, it is showing you the default values that are "In Common" between the selected parameters.

Also, it's "Append/Overwrite" mode is pre-set to "Overwrite". You can toggle this mode by clicking on the last button in this dialog's toolbar, which is also to the right of the spell checker.

How "In Common" works:
Each default value must be in every selected parameter to be considered "In Common". For example, if you have 5 parameters selected in the grid, some parameters have 3 default values, while others have 4 and 10, and two of them have a default value "ABC" but the others do not, then it is not considered "In Common".

All modifications (add, move up / down, edit, delete) can only be done when the filter is set to "In Common".

How "All" works:
When changing the filter to "All" you can see a hierarchal read-only view (parameter name followed by a list of its default values) of the parameters you selected in the grid and their default values. So no changes / additions can be made when the filter is set to "All".

To make changes / additions to multiple parameters, this approach was necessary to ease the steps required in the user interface.

VII. To add a value to all selected parameter(s), even if the existing values are not "In Common", first toggle the "Append/Overwrite" mode to "Append" and then click on the "Add" button (the first button in this dialog's toolbar). A new row will be displayed in the grid of this dialog and here you can type a value and optionally a description. This value will be added to the end of the list for all selected parameters.

VIII. To overwrite the values of all selected parameter(s), ensure that the "Append/Overwrite" mode is set to "Overwrite" and then click on the "Add" button (the first button in this dialog's toolbar). A new row will be displayed in the grid of this dialog and here you can type a value and optionally a description. The value(s) you create here will overwrite ALL existing values in ALL selected parameter(s).

IX. To change the default values order, click on one default value and then use the "Up" and "Down" buttons on this dialog's toolbar to change the order -- one value at a time.


Method 3:

I. Select the reports you want affected.

You can do this by either selecting them on the Objects Pane - Reports tab or on the Reports Tree.

Note: Throughout the product, there are context sensitive right mouse click pop-up menus. For example, you can quickly select all reports on the Objects Pane - Reports tab by right clicking on the grid on this tab to reveal a pop-up menu and then clicking on "Select All" or using the keyboard accelerator keys "Ctrl A" to do the same.

II. Go to the Objects Pane - Parameters tab.

III. Right click on the SOURCE parameter from which you want to COPY the complete list of default values.

VI. From the pop-up menu that came up, click on Copy Default Values.

VII. Select the DESTINATION parameter or parameters to which you want to PASTE the complete list of default values.

VIII. From the pop-up menu that came up, click on Paste Default Values.

When selecting multiple parameters to paste to, the value type should be the same. In other words, don't select a number and string at the same time, but feel free to select multiple number based parameters or multiple string based parameters, etc.


 

TIP #2 :: Analyzing which fields are used in your reports using .rpt Inspector

Finding which fields are used, or not used in your reports can be very useful.

If you're planning on renaming or removing a field in a table or if you're planning on migrating / converting your reports from one data source or database to another and you'd like to know what it will affect (impact analysis) then read on.

For the tip below, it is assumed that you've opened all the reports that contain the fields you want to work with.

I. Select the reports you want affected.

You can do this by either selecting them on the Objects Pane - Reports tab or on the Reports Tree.

Note: Throughout the product, there are context sensitive right mouse click pop-up menus. For example, can quickly select all reports on the Objects Pane - Reports tab by right clicking on the grid on this tab to reveal a pop-up menu and then clicking on "Select All" or using the keyboard accelerator keys "Ctrl A" to do the same.

II. Go to the Objects Pane - Database tab.

III. Unlike other tabs in the Objects Pane, the Database tab grid contains values that are pre-grouped by ReportFileName and TableAliasName. But for our purpose, we'll create our own groupings.

The properties on this tab are displayed as read-only.

To make changes to the data source / database, or to make conversion / migration -- steps that Crystal Reports refers to as Change Data source / Set Location / Convert Driver / Verify Database -- you can use .rpt Inspector's data source / database migration and conversion wizard available in TOOLS|WIZARDS menu. The concept of this wizard is to work with one or many sources and databases and point them to one destination at the same time and therefore supports batch Change Data source / Set Location / Convert Driver / Verify Database.

IV. In the filter, click on the drop-down and change the filter from Fields and Tables to Fields.

V. Click on any field in the grid of the Objects Pane - Database to have its properties displayed in the Properties Pane for the field.

VI. Click on the IsUsedInReport property label in the Properties Pane and drag and drop this property to the grid on the Objects Pane - Database tab to create a new column in this grid called IsUsedInReport.

V. Right click on the newly created column IsUsedInReport and select Group by IsUsedInReport from the pop-up menu.

This will create a powerful pivot like grouping of all the fields across the selected reports based on the contents of the IsUsedInReport property. Each field used in the report will have a value of true and therefore will be grouped together under the True group, while each field not used in the report will have a value of false and therefore will be grouped together under the False

VI. Expand one of the selected grouping(s) and click on the a field to have the properties displayed in the Properties Pane.

VII. Click on the Report Title property label (or Report Path if this is more meaningful to you) in the Properties Pane and drag and drop this property to the grid on the Objects Pane - Database tab to create a new column in the grid called Report Title.

VIII. With the expanded grouping, you can now see which fields are used / not used in which report(s).

IX. To take this a step further, you can also group by the Report Title by right clicking on the newly created column Report Title and selecting Group by Report Title from the pop-up menu.

X. To change the grouping order (i.e. move Report Title down a level) you can right click on the grouping property label row (row that has a background color, i.e. Report Title) and you'll see options in the pop-up menu to Move the order around.

Note that the concept of drag and group can be applied to other properties and other tabs.