tologo Example: creating a report

This topic will cover the process of creating a simple custom report.

example Example:

To create a new custom report

1. Click Advanced Settings in the Backstage view;

2. Click Reports in the Advanced Settings window.

3. Click the New button; enter the report name and description in the New Custom Report window and click OK.

4. Add the data which should be used in the report by clicking the menu Report>Data in the FastReport Designer window (it will open automatically, once you click the OK button).

This will open the Select Project Datasets dialog window, in which all your Custom Queries are displayed. Select the required queries by selecting the check boxes in front of their names. For this example we selected the Projects (with Model) query, since we are composing a "Projects report".

Click the OK button to confirm the selection.

_bm3 NOTE: You can create your own custom queries with the help of the built-in query builder. Any custom queries created this way will appear in this dialog window.

5. Now, the contents of the selected query are displayed in the Data field to the right:

 

fastreport_dataset_selected

 

These are the fields from the TO3000 3D+ database, which have been added to the query you selected. In this particular case, the fields contain project names (PROJ_FULL) and codes (PROJ_CODE), dates of the project timeline (PROJ_STARTED, PROJ_DEADLINE and PROJ_COMPLETED), information as to whether the project has been completed or not (PROJ_IS_COMPLETED) and corresponding client names (CLIENT_NAME).

6. Begin designing your report by placing Data Bands.

These “bands” bind report elements together, specifying their location on the page relatively to page itself and to the other bands. A more detailed description of the bands can be found in the FastReport User Manual. For this particular report you will need to use only a few of the bands available.

6.1. Click the Insert Band button and select the Report Title band. This will place the mentioned band to your report page. Click the Insert Band button again and select the Header band to place it.

 

fastreport_insert_bands

 

6.2. Click the Insert Band button one more time and select the Master Data band to place it in your report. When placing the Master Data band select your Projects (with Model) query when prompted to do so:

 

fastreport_select_dataset

 

Your report page should look approximately like this:

 

fastreport_report_page

 

7. Adding data to the Master Data band.

To add variable data to your report, you will need to drag-and-drop the required fields from your query into the Master Data band.

 

fastreport_drag-n-drop

 

Please note that any Master Data band can be linked to a certain dataset (or query in this case) only, so in case you have more than one query, please be sure to drag and drop fields only to the Master Data band which has been linked to this query.

For example, the Master Data band below can contain fields from the Projects (with Model) query,

 

fastreport_masterdata_band

 

Drag sequentially the following fields from the Data area and place them inside the Master Data band in a row:

PROJ_FULL, CLIENT_NAME, PROJ_DEADLINE

When placed into your report, the fields take the form of text objects, like:

[Projects (with Model)."PROJ_FULL"]

These act very much like text variables in TO3000 3D+ RTF templates.

_bm3 NOTE: Some of these objects may be very wide. Please try adjusting their width by dragging the borders of these objects. Alternatively, please try entering the exact object length by selecting it and typing their width in the Properties area:

 

fastreport_object_width

 

Once all the data has been added, your report should look like this:

 

fastreport_report_page_2

 

8. Adding stationary data to other bands.

8.1. Add a header for your report by clicking the Text object button and placing the object on your report, within the Report Title band.

 

fastreport_add_text_object

 

8.2. Type the header for your report in the memo window which appears.

 

fastreport_memo_dialog

 

8.3. Data will be displayed in your Master Data band in columns (each indicated by a field from the query). Add the names of these columns right above the query field objects in your Header band: Project name, Client, and Deadline the same way you added the header text object.

After this your report should look as follows:

 

fastreport_report_page_3

 

9. Preview your report by clicking the Preview button. Your report preview will be displayed in the Preview window.

_bm3 NOTE: You can further configure the style of your report by configuring the style of text objects. Select the required text object and adjust its format in the Properties area to the left.

10. Save your newly created report by clicking the Save button and close report designer.

The new report is now ready to be used.

If you want to save this report in a separate file in the Report folder of TO3000 3D+ (so that you can send it to other TO3000 3D+ users), select the report in the list and click the Save button.

 

_bm2

 

See also:

Custom queries