Using a Java Preprocessor
It is possible to write a custom Java class that is invoked before filling the excel template and can pass some data to the Excel template. This can be used to get data by calling a Web Service, or use Java code to assemble a very complex SQL statement that cannot be done using a Dashboard Datasource, and be too tedious to assemble in the template using scripting.
All the values of report fields are available to the Java preprocessor. It is also possible to use the objects ppmdb or reportingdb and use method execQuery(…) on them. If a simple SELECT statement is not enough, it is also possible to get a JDBC Connection to PPM database or Reporting database using methods getPPMDBConnection() and getReportingDBConnection(). Do not close the Connection when you do so; it will be automatically closed when the report completes.
The following topics shows you how to create an Excel report by leveraging a Java preprocessor that takes a search text as an input field, and returns all the PPM project names containing the text as well as links from the first result page of Bing.com.