tologo Example: creating a report

Top  Previous  Next

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

example Example:

To create a new custom report

1. Click menu Settings > Advanced;

2. Click Custom Reports on Advanced Settings window.

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

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

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

Click OK button to confirm selection.

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

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

fastreport_dataset_selected

These are the fields from TO3000, Version 9.0 database, which have been added to the query you selected. In this particular case, the fields are those, containing project names (PROJ_FULL) and codes (PROJ_CODE), dates of project timeline (PROJ_STARTED, PROJ_DEADLINE and PROJ_COMPLETED), information as to whether 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. More detailed description of the bands can be found in FastReport User Manual. For this particular report you will need to use only few of the bands available.

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

fastreport_insert_bands

6.2. Click Insert Band button one more time and select Master Data band to place it in your report. When placing 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 Master Data band.

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

fastreport_drag-n-drop

Please note that any Master Data band can be linked to 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 that Master Data band which has been linked to this query.

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

fastreport_masterdata_band

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

PROJ_FULL, CLIENT_NAME, PROJ_DEADLINE

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

[Projects (with Model)."PROJ_FULL"]

These act very much like text variables in TO3000, Version 9.0 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 exact object length be selecting it and typing their width in 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 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 Preview button. Your report preview will be displayed in the Preview window.

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

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

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, Version 9.0 (so that you can send it to other TO3000, Version 9.0 users), select the report in the list and click Save button.

 

_bm2

 

See also:

Custom queries