Reporting
At the same time as we created the R3 framework, we also desided to make a new report engine based on DevExpress’ XtraReport Suite. Seeing the benefits of using the Xtra control package from DevExpress, we also explored the Reporting module and found the great advantages by choosing this.
The report module allows you to build reports almost the same way as building forms in CR3. You have the toolbox, the same property grid, the same component toolbox and the same alignment toolbar.
Similar to CR3 Client we have a data object that handles the database interactivity, afReportDataObject. The difference here is that you ca not interfere with the object. All handling is taking care of by the engine.
Record Source Builder
Similar to CR3 development we have also created a designer for building the recordsource for the report. We have extended the functionality to also support sub recordset that you can have in your report.
When you are creating a new RecordSource inside the builder, the first will automatically be the master. The next sources will be Sub’s (Sub 1, Sub 2 etc.). For rapid development you can explore the features inside the Insert menu. Here you have features like Insert Logo, Table, Page Border and Header & Footer Labels
Sub Record Source
In order to add a sub to the report you have to right-click on a band and choose insert detail report. Choose the RecordSet that applies, and inside the band that is created you can start adding controls.
Sub Reports
The Subreport is a separate report that must created and added to the main report. To connect the main and sub report you need to specify the FieldName from the Master in the InitialFilter of the subreport:
* RecordSourceBuilder -> InitialFilter : PersonId = '<%PersonId%>'
'<%PersonId%>' is the field from the Master report.
To add the sub report inside the main, choose the SubReport control in the toolbox and set the name of it equal to the SubReport that you have created. Unlike the AppFrame Reports based on Active Reports the coding language used for scripting is now VB which makes it uniform with rest of CR3 development.
Scripting
On each control on the report form, there is a own script property where you can add scripts on different events. You have to keep in mind on what control you add the script, because the rendering of the report is executed in a certain way. For example you ca not add scripting code that should affect data in detail band in the header section.
Deployment
Currently we do not have a satisfying concept for deploying reports. But until Release 3 we will have that in place. As it is now, the reports are deployed once you hit the save button. There will be more information regarding this as soon as we have it in place.