#1 2014-01-03 13:41:30

jeanmarre
Member
Registered: 2013-12-23

BIRT Report : Report parameters inside beforeOpen dataset script

Hello,

I'm facing an issue with the use of report parameters inside beforeOpen dataset script for BIRT.
I want to use multiple value as a parameter. Currently the only option available is to define the query with the multiple values inside the beforeOpen dataset script.
But this doesn't work because the report parameter doesn't seems to be defined in the beforeOpen dataset script.
It's working with a single value when I use report parameter inside the dataset and add a dependency in ReportServer.

Am I missing something or this is a limitation of ReportServer ?

Jean-Marie

Offline

#2 2014-01-07 18:37:50

Thorsten J. Krause
Guest

Re: BIRT Report : Report parameters inside beforeOpen dataset script

Hi Jean-Marie,

I'm not sure, that this is actually the cause of your problem.

What I tried is:
    Create a birt report with dynamic multi-select string parameter "cities"
    Defined the following beforeOpen script for my Data Set:
        Packages.java.lang.System.out.println(Packages.java.util.Arrays.toString(params["cities"].value));
    Created the matching parameter configuration in ReportServer and uploaded the report
   
When I run the Report in ReportServer I can see the selected parameter values printed to the (tomcat) console.
So I suppose there is some other issue with your script.

That beeing said there might be a better way to handle multi value parameters altogether:
Did you know https://code.google.com/a/eclipselabs.o … Parameters
While still not a perfect solution this makes things a whole lot easier.

To use it whith ReportServer, download the .jar file and place it in ReportServers WEB-INF/lib directory.
   
Cheers,
Thorsten

#3 2014-01-08 09:18:25

jeanmarre
Member
Registered: 2013-12-23

Re: BIRT Report : Report parameters inside beforeOpen dataset script

Hello,

Thank you for your response.
I found a way to bypass my problem by using dataset filter and "IN" operator.

I guess there was a problem with my script.

Thank you for the BIRT library link. It will help me when I don't want any data to be filtered.

Jean-Marie

Offline

Board footer

Powered by FluxBB