Add Additional Information
- 3 minutes to read
This tutorial demonstrates how to provide additional information to the report created in previous tutorials. In particular, it shows how to add the report name, company logo, page numbers, and current date.
Add Appropriate Report Bands
Auxiliary information is displayed within Page Margin bands, Page Header/Footer (located at the top/bottom of a page) or Report Header/Footer bands (located at the beginning/end of a report).
After creating a report, it contains the Top Margin and Bottom Margin bands by default. Use the dedicated buttons in the Actions category of the Properties panel to add other required bands to a report. For this tutorial, insert the Page Header and Footer to the master report.
Add the Report Name
Drop the Label control from the Toolbox onto the Page Header band to display the report name on every page. Add the Label to the Report Header band if you want to display the report name only once.
Double-click the created Label to type the required text and specify the desired appearance settings.
Add the Picture Box
To display a company logo at the bottom of the report, do the following:
Drop the Picture Box control from the Toolbox onto the Bottom Margin band.
- Locate and resize the created control as required.
Select the control, go to the Properties panel and expand the Actions category. Click the ellipsis button for the Image property, and in the invoked Open dialog, select an image to display.
Set the control’s Sizing property to Zoom Image to proportionally resize the image, so that it fits the control.
Add Page Numbers
To insert page numbers to your report, do the following:
Drop the Page Info control from the Toolbox onto the Page Footer band.
Select the created control, switch to the Properties panel and expand the Actions category. Use the Page Information property to choose one of the following formats for displaying page numbers:
- Page Number - displays the current page number only.
- ‘Current of Total’ Page Numbers - displays the current page number with total pages.
- Page Number (Roman, Lowercase) - displays the current page number in lowercase Roman letters.
- Page Number (Roman, Uppercase) - displays the current page number in uppercase Roman letters.
- Page Count - displays the total number of pages.
- Change the display format of page numbers using the Format property, for instance, set this property to Page {0} of {1}.
Expand the Behavior category and set the Running Band property to the Group Header band located in the detail report and displayed field captions. This allows you to display page numbers for detail reports.
Add System Date
The Page Info control also allows you to display system date and time or user name.
To display current date in you report, do the following:
- Drop one more Page Info control from the Toolbox onto the Page Footer.
Select the created control, switch to the Properties panel and expand the Actions category. In the drop-down list for the Page Information property, select Current Date and Time.
Click the ellipsis button for the Format property, and in the invoked Format String Editor, specify a date format (for example, MMMM d, yyyy).
View the Result
Click the Preview toolbar button to see the resulting document.