What i would like to achieve is to have a button on my report (any report for that matter) which OnClick performs some action and returns to me the query of that report.
Lets say "Select * from houses where country = 'Netherlands'"
Using and modifiying the Samples in the PentahoReportingEngineSDK i have been able to get the QueryNames used in a report.
Which returns:MasterReport report = new MasterReport();
Sample5 sample5 = new Sample5();
report = sample5.getReportDefinition();
final DataFactory dataFactory = report.getDataFactory();
for (String query : dataFactory.getQueryNames())
System.out.println("Query: " + query);
- Customer Names
So I actually have 2 questions:
1. How can i get the content of the query instead of just the queryname?
2. This example runs from a standalone java app, it would like to do this from a function / button on the report itself. How can i do this?
EDIT: I searched the forum before posting these questions, but couldn't find something that could help me with this problem.