Skip to main content

Step 2 - Using Report Designers

  • 3 minutes to read

The previous step demonstrated how to quickly print a control using report links. This topic gives you a brief overview of designer dialogs provided by the ExpressPrinting System for most report links, allowing you and end-users to customize the appearance of printed controls. This topic also covers the methods used to invoke these designer dialogs. It is assumed that you have completed the step one in this Quick Start guide before reading this topic.

Follow the steps below:

  • Right-click the TdxComponentPrinter component and choose the context menu’s Report Links… item. This will invoke the report links collection editor with a single report link which was created in the previous step.

  • Click the link to select it and then click the Show Designer… button to invoke the link’s designer dialog.

As you can see, the designer displays a number of tabs which enable you to customize the visibility of particular elements, fonts and colors used to print the component etc. The designer dialog also shows you a sample of a report preview so you can see how particular options will affect the report.

Note

the Restore Defaults and Restore Original buttons at the designer dialog’s bottom edge, these buttons are available at design time only. The Restore Defaults button enables you to reset all options to their default state, the Restore Original button copies settings from the control itself. If printing a list box, clicking on the Restore Original button will assign the control’s font settings to the report link and will reset the background colors to white.

  • Run the application. Click the Print the ListBox button which was created in the previous step. In the preview window click the Design Report button within the toolbar or choose the File | Design… menu item, the report link’s designer dialog will then be invoked.

Note that the Restore Defaults and Restore Original buttons are unavailable now. The report designer dialog now shows the Title Properties… button in their place.

  • Click the Title Properties… button to invoke the Report Title dialog. This dialog enables you to specify the report’s title, its appearance and display mode (printed once on the first page or at the top of each page).

  • Type the ‘ListBox Report Title‘ string within the memo editor and switch to the Properties page.

  • Choose the Left option from the horizontal alignment combo box and click the OK button to close the dialog saving any changes.

  • In the Format Report dialog, click the OK button to return to the report link’s print preview. Now you’ll see that the left-aligned report caption is printed at the top of the page.

  • Close the application. Add a new button to the form, set the button’s caption to ‘Design Report‘ and write the following handler for the button’s OnClick event.
procedure TForm1.Button2Click(Sender: TObject);
begin
  listBoxReportLink.DesignReport;
end;
  • Run the application. Now you can click the Design Report button to invoke the report designer.

Note

You can also access all the settings that are available via a report link’s designer window by using that report link’s published properties (so you should select the report link and use the Object Inspector window for this purpose). The report’s title properties are available via a report link’s ReportTitle property. You can click the button located at the right of each property, which corresponds to that property to invoke the Report Title dialog as shown in the images above.

The next step demonstrates how to customize page settings using the built-in UI.