Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
genreport.bat and ListBox Parameters with multiple values
jellesm
I have a report that has a list box parameter that allows multple values. I am attempting to use runtime 2.3.0. When I attempt run the report from runtime using genReport.bat it errors. I am not sure how I should specify this parameter value. Here is the error:
C:WorkBIRTbirt-runtime-2_3_0ReportEngine>run210.bat
C:WorkBIRTbirt-runtime-2_3_0ReportEngine>SET BIRT_HOME=C:WorkBIRTbirt-runtime-2_3_0
C:WorkBIRTbirt-runtime-2_3_0ReportEngine>cd C:WorkBIRTbirt-runtime-2_3_0ReportEngine
C:WorkBIRTbirt-runtime-2_3_0ReportEngine>call genReport.bat -f PDF -o "out210.pdf" -p "RP_cr_numbers=818,826,908" ".
AirCoreR2.10DesignStatusReportInteraction.rptdesign"
C:WorkBIRTbirt-runtime-2_3_0ReportEngine>ECHO off
Mar 4, 2009 4:20:43 PM org.eclipse.birt.report.engine.api.ReportRunner runAndRenderReport
SEVERE: The type of parameter "RP_cr_numbers" is expected as "Object[]", not "java.lang.String".
org.eclipse.birt.report.engine.api.impl.ParameterValidationException: The type of parameter "RP_cr_numbers" is expected
as "Object[]", not "java.lang.String".
at org.eclipse.birt.report.engine.api.impl.EngineTask.validateScalarParameter(EngineTask.java:713)
Thanks,
Steve
Find more posts tagged with
Comments
AshishK
I am also facing a similar problem. I have a report that has a list box parameter and I can choose multiple values. I am using BIRT Runtime 2.3.0. <br />
<br />
<strong class='bbc'>What I am trying is this :-</strong><br />
<br />
C:BIRTReportDistributionReportEnginegenReport.bat -f xls -o C:BIRTReportDistributionReportOutputs<OUTPUT_FILE_NAME>.xls -p "id=11" C:BIRTReportDistributionReportFiles<REPORT_FILE_NAME>.rptdesign <br />
<br />
<strong class='bbc'>Error</strong> - Sep 1, 2009 8:25:21 PM org.eclipse.birt.report.engine.api.ReportRunner runAndRenderReport<br />
SEVERE: The type of parameter "<paramter name>" is expected as "Object[]", not "java.math.BigDecimal".<br />
org.eclipse.birt.report.engine.api.impl.ParameterValidationException: The type of parameter "<paramter name>" is expected as "Object[]", not "java.math.BigDecimal".<br />
<br />
I am not sure how to pass the parameter value, may be the way of passing parameter is wrong. <br />
<br />
Other report works perfectly fine for which there are no parameter required.<br />
<br />
Thanks,<br />
Ashish
pguzman
I know that is too late for answering this but maybe I can help someone else with same problem.<br />
<br />
The most likely you are setting the query in the dataset like this:<br />
<br />
select * from table where column in (?)<br />
<br />
and then you set the parameter as a default value for interrogation mark.<br />
<br />
Instead of the previous implementation you can set first the parameter as listbos with allow multiple values and next go to edit the dataset and make new filter with the "in" and sets the value equals to the new parameter.<br />
<br />
<br />
<br />
I hope this helps.<br />
<br />
<blockquote class='ipsBlockquote' data-author="'jellesm'" data-cid="44282" data-time="1236205342" data-date="04 March 2009 - 03:22 PM"><p>
I have a report that has a list box parameter that allows multple values. I am attempting to use runtime 2.3.0. When I attempt run the report from runtime using genReport.bat it errors. I am not sure how I should specify this parameter value. Here is the error:<br />
<br />
<br />
C:WorkBIRTbirt-runtime-2_3_0ReportEngine>run210.bat<br />
<br />
<br />
C:WorkBIRTbirt-runtime-2_3_0ReportEngine>SET BIRT_HOME=C:WorkBIRTbirt-runtime-2_3_0<br />
<br />
<br />
C:WorkBIRTbirt-runtime-2_3_0ReportEngine>cd C:WorkBIRTbirt-runtime-2_3_0ReportEngine<br />
<br />
<br />
C:WorkBIRTbirt-runtime-2_3_0ReportEngine>call genReport.bat -f PDF -o "out210.pdf" -p "RP_cr_numbers=818,826,908" ".<br />
<br />
AirCoreR2.10DesignStatusReportInteraction.rptdesign"<br />
<br />
<br />
C:WorkBIRTbirt-runtime-2_3_0ReportEngine>ECHO off<br />
<br />
Mar 4, 2009 4:20:43 PM org.eclipse.birt.report.engine.api.ReportRunner runAndRenderReport<br />
<br />
SEVERE: The type of parameter "RP_cr_numbers" is expected as "Object[]", not "java.lang.String".<br />
<br />
org.eclipse.birt.report.engine.api.impl.ParameterValidationException: The type of parameter "RP_cr_numbers" is expected<br />
<br />
as "Object[]", not "java.lang.String".<br />
<br />
at org.eclipse.birt.report.engine.api.impl.EngineTask.validateScalarParameter(EngineTask.java:713)<br />
<br />
<br />
Thanks,<br />
<br />
Steve<br /></p></blockquote>
rpolunsky
I'm using 2.5.0 and have the same problem. Currently I have a hack where I have a hidden parameter of type string that I populate (in the genReport called version) with a comma separated list. In the dataset beforeOpen() event I check to see whether the csv parameter is populated - if so I modify the query based on that, otherwise I modify the query based on the listbox (iterating through its values).
I don't like this approach, but it seems to work for me.
In general you can't do much with multi-select parameters outside of the interactive interface. Bug 272306 is related as well. The listbox converts to an Object[], and there's no provision to handle that.