How to pass Java-objects from master report to sub-report using Java EventHandler? [message #221879] |
Thu, 01 March 2007 05:46 |
Eclipse User |
|
|
|
Hi,
I believe this is a problem that many have experienced and want answers on.
Many have touched this problem
in the newsgroup but I have not seen any replies on how to solve it;
I have a very simple report with a master report and sub-report(table) for
each element in the master report.
The data for the whole report is read in a Java EventHandle for the Master
Dataset.
This works fine in the Master report by reading the the data (Java-object)
in the beforeOpen-method in the eventhandler
and iterating through the data in the fetch-method.
The challenge is to pass necessary data to the Sub-reports dataset.
I would prefer to pass the collection that is to be used for each
sub-reports. I am not able to do this.
What I have done know is to add the datastructure (Java-object) as a global
parameter.
The challenge is then to pass down the key to the sub-reports (this to be
used to find the relevant data to be shown in the
sub-report).
I have setup a parameter for the sub-reports data set and defined it in the
sub-report table Dataset Parameter Binding.
When I run the report I can see in the debugger that the correct parameter
with value is visible in the IDataSetInstance variable in
both the beforeOpen and fetch-methods in the eventHandler for the
sub-repoerts dataset.
(It is stored in a structure called inParamValues)
But there are no methods to use to read this value/structure!
Any ideas on how to solve this?
I preferable want to solve this through the use of Java-eventhandler, not
scripts.
Thanks a lot!!
Regards,
Paal Espen Reinertsen
|
|
|
Powered by
FUDForum. Page generated in 0.07265 seconds