3.1. Project Setup

  1. Download and unzip the source repository of the Library application, or clone it using git:

      git clone https://github.com/cuba-platform/sample-library-cuba7
  2. Open the Library project as described in the Opening an Existing Project section of the CUBA Studio User Guide.

  3. Add the Reporting addon to your project via CUBA Add-Ons window as described in the Installation section.

  4. Create the database on the local HyperSQL server: go CUBACreate database in the main menu.

  5. Run the application by clicking the run_button button next to the selected CUBA Application configuration in the main toolbar.

  6. Click the link in the Runs at…​ section of the CUBA project tree.

  7. Log in to the Library application with username and password admin / admin.

For an easy start, the report generator comes with the Reports wizard – a visual tool for quick report creation, including both data structure and template design. Having created a report with the wizard, you can then decompose it and learn how the datasets are created, explore the report parameters, modify the template or the output type, following the further sections of this manual.

To run the wizard, click CreateUsing wizard in the Reports screen.

reports wizard main
Figure 1. Call the Report wizard

Three types of reports can be created using the wizard:

  1. Report for a single entity.

  2. Report for a list of given entities.

  3. Report for a list of entities filtered by query.

Report design is a three steps process:

  1. Creating a data structure of a report.

  2. Editing of report regions.

  3. Saving the report.

The created report can be modified in the usual manner using the report editor and run through the generic report browser or using special actions (ListPrintFormAction, EditorPrintFormAction, etc.).