About WAQR
WAQR (Web AdHoc Query Reporting) is an interesting module in the Pentaho suite. It sits on top of the report engine and the metadata layer and lets the users easily build tabular reports to be used for their daily activities or to just to export some complex data in an easy way from the Pentaho system. The report definition is based on a wizard that takes the users along these easy steps:
- select a template, from the set of available templates, and a business model.
- decide were to put which fields in the report layout
- adjust some visualization attributes or/and can apply filter conditions and define sort fields and orders
- manage some page layout attributes
- .... and here we go! We get the report.
WAQR templates are basically the old JFreereport report designer's template files so they are simple xml files we can view and modify. THEY ARE NOT compatible with the newer report designer template files. The wizard uses text manipulation routines to create a report-definition out of the template. We all know that sooner or later WAQR will be replaced by something more interactive and more attractive that will use the latest report engine's version. But for the moment we have this and with this we have to battle.
How to expand the height of the detail rows dynamically when export type is PDF
Try to build a new report with WAQR putting in the report definition a field with a very log text in it. If you try to export the report using the PDF format you will get the text truncated. To fix this it's only a matter of minutes and you need to modify the report template
- adding a new configuration attribute for the report engine and
- add a new attribute to the details band to set the row height dynamic.
Below I'm going to summarize all these steps modifying the Basic template given with the Pentaho demo solution.
- Go to <biserver_home>/pentaho-solutions/system/waqr/templates/Basic and open jfreereport-template.xml
- Locate the configuration xml element near the end of the file. Add the following line as a child of the configuration element
<property name="org.pentaho.reporting.engine.classic.core.modules.output.pageable.pdf.AssumeOverflowY">true</property>
- Add the attribute dynamic = "true" to the items element
- Save the template and if the BI Server is running refresh the cache using the Tools -> Refresh -> Repository Cache menu entry