7.3. User defined report sections - a more complex report

The objective for our next report is to see all the titles for each author. Start by creating a new query called 'examplequery' using the following SQL statement
 select name, title from authors, literature where author_id=author
Create the new report based on this datasource. Create one field in the datasection and connect it to the column 'title'. It now looks like our previous report. Create a new userdefined section by clicking on the 'Sections' button in the left toolbar. A new dialog opens.


Figure 7-3. the reportsection dialog


Add 'name' into the field below 'Section to add' and press the button with the right arrow. You will see that a new pair of sections have now embraced the datasection. Press the 'Exit' button to close the dialog. Add a field to the newly created 'name' sectionheader and set 'name' as the column. Now have a look at the result. Looks neat, doesn't it?

Add a new field to the 'name' sectionfooter and set 'name' as the column. Replace the valuefield entry with 'There are %COUNT% titles for the author "%VALUE%" in this database'.


Figure 7-4. A complex report


Some additional sectionfooter field properties have been set: the border lines and wordbreak set to "yes".