Understand Styles Concepts

media_1449120413032.png

Each report element (band and control) and the report itself has a group of properties, specifying the element’s appearance, such as Background Color, Borders, Border Color, Border Width, Font, Foreground Color, Padding and Text Alignment.

By default, these properties are set to empty values, which means that their real values are obtained from a control’s (or band’s) parent. In turn, this means that these appearance-related properties, defined by a parent, are spread to their child elements.

media_1449120434030.png

You can also define a control’s appearance properties independently from its parent.

media_1449120446748.png

When it is required to reset a value assigned to a control’s appearance property, you can right-click this property in the Property Grid, and in the invoked menu, click Reset.

So, the control will be restored to the appearance of its parent.

Add Parameters to a Report

media_1449089911987.png

Sometimes it’s useful have parameters in your report. Parameters can help you filter your data or specify a value that will be used to calculate other values (in the latter case, use calculated fields).

To add parameters and filter your report based on their values, follow the steps below. · In the Field List window, right-click over the Parameters section, and in the invoked menu, click Add Parameter.

Repeat this action to create the second parameter.

 

media_1449090103155.png

In the Field List, select the first parameter, and in the Property Grid, set its (Name) to FromDate, Description to From: and Parameter Type to Date Time.

 

media_1449090182569.png

Enabling the Supports the collection of standard values option of the parameter allows end-users to modify its value and also activates the Dynamic values and the Static values tabs of the window:

On the Dynamic values tab, you can specify a parameter’s data source, data adapter and data member. The value member defines a data field that provides values to the parameter. The display member defines a data field that provides display names for parameter values (how these values appear in the user interface available in a Print Preview).

On the Static values tab, you can manually fill the list of parameter values, with each value having an individual description (specifying how this value appears in the Parameters panel).

media_1449090534771.png

Click your report’s Smart Tag, and in the invoked actions list, click the ellipsis button for the Filter String entry.

Then, in the invoked Filter String Editor, construct an expression where a data field is compared with the created parameters.

To access parameters, click the Pencil icon to the right..

media_1449090557670.png

media_1449090418281.png

The parameterized report is now ready.

Switch to the Preview Tab, and in the Parameters section, define the required values and click Submit.

Add Calculated Fields to a Report

media_1254885394208.png

The main purpose of calculated fields is to perform calculations over different data fields.

To create a calculated field, in the Field List, right-click any item, and on the invoked menu, choose Add Calculated Field.

media_1254885445560.png

In the Field List, select the created field to show its properties in the Property Grid.

Change the Field Type property to an appropriate value.

media_1449089822326.png

Click the ellipsis button in the Expression section.

The Expression Editor will appear. You can also invoke this dialog by right-clicking your calculated field within the Field List and selecting Edit Expression…

Click Fields to see the field list. Double-click field names to add them to the expression string. Use the toolbar to add operators between field names. To close the dialog and save the expression, click OK.

media_1449089856889.png

Drag the calculated field from the Field List onto a control or a table cell.

 

media_1449089888749.png

The report with a calculated field is now ready. Switch to the Preview Tab, and view the result.

Add Page Numbers and System Information to a Report

media_1449089358707.png

Generally, this information is displayed within the Page Header and Footer or Page Margin bands.

To add page numbers or system information to a report, locate the Control Toolbox and drag and drop the Page Info control.

Page Numbers

media_1254884998123.png

Select the Page Info control, then in the Property Grid locate the Page Information property, and invoke its drop-down list.

You can see that there are several options available.

You can select whether to display only the page number (Latin or Roman -uppercase or lowercase) or the current page number of total pages.

media_1254885035023.png

Now, you can define a formatting to the control’s text. In the Property Grid, set the Format property to Page {0} of {1}.

media_1254885061452.png

Current Date and Time

media_1254885081143.png

Select the Page Info control, then in the Property Grid locate the Page Information property, and set it to Current Date and Time.

media_1254885162880.png

Also, you can define a formatting to the control’s text, using its Format property.

media_1254885202294.png

Username

media_1254885236232.png

Select the Page Info control, then in the Property Grid locate the Page Information property, and set it to User Name.

media_1254885262951.png

Also, you can define a formatting to the control’s text. In the Property Grid, set the Format property to Current User: {0}.

Create or Modify Watermarks of a Report

media_1449089188696.png

Follow the instructions below to create a new watermark in a report (or to modify the existing watermark, if it is already present in a report).

To select the report, click anywhere over the blank surface surrounding its bands area.

Then, in the Property Grid, locate the report’s Watermark property, and click its ellipsis button.

The Watermark dialog will appear.

media_1449089252476.png

In this dialog’s Text Watermark tab, define the required properties, such as Text, Direction, Color, Font, Transparency, Page Range, etc.

media_1254884768487.png

Then, switch to the Picture Watermark tab, to load an image to be used as a watermark, and define its properties, such as Size mode, Alignment (vertical and horizontal), Tiling, Transparency, Page Range, etc.

As you can see, it is possible to use both textual and image watermarks simultaneously.

media_1254884809136.png

Note that you can define all the watermark options without invoking the dialog. For this, in the Property Grid, expand the Watermark property and set the required properties directly.

media_1254884869928.png

The report with watermark is now ready. Switch to the Preview Tab, and view the result.

Add Totals to a Report

media_1449088787507.png

If the Report Footer band is not present in your report, add it. To do this, right-click anywhere over the report’s area and in the invoked Context Menu, select Insert Band | ReportFooter.

media_1254884129082.png

Click the field for which a summary will be calculated, to select it.

Then, hold down CTRL and drag the field onto the Report Footer area, to create an exact copy of the Label that will display the summary.

media_1254884184415.png

Now, select the newly created Label, and in the Property Grid, locate the Summary property and click its ellipsis button.

The Summary Editor will appear.

The following image shows an example of how you can set up your total. Note that the Summary Running option is set to Report, to ensure that all values from the specified data field are taken into account.

The Ignore NULL values option won’t affect the result in this example, since NULL values are treated like zeros, by default.

Sum won’t change whether these values are taken into account or not. This option makes sense for functions like Count or Average, because the number of elements counted will depend on it

To save the settings and close the dialog, click OK.

 

media_1254884247903.png

Switch to the Preview Tab, and view the result.

Change or Apply Data Grouping to a Report

media_1449084148501.png

Add a Group Header band to the report. For this, right-click anywhere over the report’s surface, and in the invoked Context Menu, point to Insert Band and click GroupHeader.

media_1449084785077.png

Drop a field, which will be used as a grouping criteria, from the Field List onto the created GroupHeader1 band.

Show Footer

media_1449084976071.png

In addition, you can enable the corresponding Group Footer band, by checking the Show Footer option in the Group and Sort Panel.

media_1449086818414.png

Drag a Label control onto the Footer secion and click the Smart Tag.

Click the Summary button.

 

media_1449086879774.png

Select the Bound field you would like to create a summary for.

Check the Group Summary Running option since this summary will be run for each group.

Click Ok.

media_1449087113148.png

This summary will appear for each Group.

Change or Apply Data Filtering

media_1449083428320.png

To filter a report’s data, select the Report, and in the Property Grid, locate the Filter String property and click its ellipsis button.

media_1449083377020.png

or click on the Report Tasks icon on the top left corner and click on the button to the right of Filter String.

media_1449083505588.png

The FilterString Editor will appear, allowing you to easily define a required expression.

Changing Value Formatting of Report Elements

media_1449021353200.png

To change value formatting, locate the required element, click its Smart Tag, and then click the ellipsis button next to Format String.

This will invoke the format string editor dialog, allowing you to choose one of the predefined formatting styles.

media_1449021425132.png

Select the required style and click OK, to close the dialog and save the changes.