Tip:
Highlight text to annotate it
X
In this video, we’ll implement the ReportData we have in our model. With the ReportData object implemented, our generated program will
include options to view and print the report.
Before we do that, though, I do want to point out that I've organized an additional library folder
into the project to hold all of the various entities that we have.
To make sure that when I compile the program that everything recognizes each other and can find the various parts
I've gone ahead and set the dependencies there for the program.
Now the first step is to set the relation between the form and the report to ReportRelation in the Type property.
The next step is to implement the report
I'll right click on the ReportData object and select Implement Data Diagram from Database
Here I can select the table and columns I want to have available in the report design.
I've gone and selected the product columns.
I can run the report at this point and a default report design will be used. You'll notice that report options are both in the top menu
and in the toolbar for me to choose from.
I'll go ahead and preview the report we can see the default layout that is used.
Now this may or may not be suitable for your needs
so you can add your own report layout file for the report to use
To add a report design to use instead of the default I create one here by choosing File > New
Reports and then the type of report I want to create. I'll choose list report.
Now in order to add fields that I want to include onto this report design, I need to associate the design with a report definition file or rdd.
This rdd file is generated for me when I built the report as part of the application.
Notice that it is in the Intermediate Files folder.
Now from the Data View tab I'll associate this design with that generated rdd file.
Once I've designed my report I'll assign this design to the Report Data object on my BA diagram by selecting the relation between my form
and the ReportData object and setting the report file property to the name of my 4rp design file.
Now when I run the application my report displays not using the default layout, but my report layout.
You can learn more about designing visually rich data reports in the Genero Report Writer section of our video library.
You'll notice here that the full toolbox is available to you to design and enhance
the reports.