Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Call BIRT using a batch file
flosmi
Hi,
i try to generate a report via a batch file, but i want to pass multiple value parameters with the data type sting - when i open the report via the webviewer it works but not via the runReport.bat
"Set BIRT_HOME=C:\birt_runtime\birt-runtime-2_6_2\
C:\birt_runtime\birt-runtime-2_6_2\ReportEngine\genReport.bat -p Para='XXXXX' -p Para='YYYYY' -f doc C:\birt_runtime\birt_report\myReport.rptdesign"
thx for your help...
flo
Find more posts tagged with
Comments
flosmi
i also try it with a new hidden string parameter and this in the statement:<br />
<br />
"this.queryText = this.queryText + "and ti.name in ('";<br />
var Para = params["Para"].value<br />
var ParaString = params["ParaString"].value<br />
if (ParaString)<br />
{this.queryText = this.queryText + ParaString;}<br />
else<br />
{this.queryText = this.queryText + Para.join("','");}"<br />
<br />
but it didnt work.<br />
<br />
is the a log function in BIRT - so i can see how the statement looks like when it got executed by BIRT?<br />
<br />
thx<br />
<br />
<br />
<br />
<br />
<blockquote class='ipsBlockquote' data-author="'flosmi'" data-cid="99789" data-time="1335790487" data-date="30 April 2012 - 05:54 AM"><p>
Hi,<br />
<br />
i try to generate a report via a batch file, but i want to pass multiple value parameters with the data type sting - when i open the report via the webviewer it works but not via the runReport.bat<br />
<br />
"Set BIRT_HOME=C:\birt_runtime\birt-runtime-2_6_2\<br />
C:\birt_runtime\birt-runtime-2_6_2\ReportEngine\genReport.bat -p Para='XXXXX' -p Para='YYYYY' -f doc C:\birt_runtime\birt_report\myReport.rptdesign"<br />
<br />
thx for your help...<br />
<br />
flo<br /></p></blockquote>
CBR
If you are calling BIRT from command line you can simply use java.lang.System.out.println("my text") to print out something on the console.
Unfortunately there is no logging mechanism available for that in BIRT.
Tubal
Are you passing your parameters in the correct format?
I think there should be quotes around the entire parameter statement:
genReport -p "dataSource=D:\data\source.xml" -f PDF -o report.pdf design.rptDesign
CBR
Tubal is right: If a value contains a space the quotes are required.
When setting multiple values for a parameter you have to provide all values in a single parameter (If you are using BIRTs default command line runner).
Let's assume that you have a parameter called ids that allows multiple values:
genReport.bat -p "ids=1,2,3,4" -f doc C:\birt_runtime\birt_report\myReport.rptdesign"
flosmi
thanks a lot it works...<br />
<br />
i also try it with the quotes but this way:<br />
-p "Para=XXXX, YYYY"<br />
and birt always cuts away my second Para
<br />
<br />
corret is<br />
-p "Para=XXXX,YYYY"<br />
<br />
<br />
-> more debugging options would be great
<br />
<br />
<br />
<blockquote class='ipsBlockquote' data-author="'cbrell'" data-cid="99950" data-time="1336074017" data-date="03 May 2012 - 12:40 PM"><p>
Tubal is right: If a value contains a space the quotes are required.<br />
When setting multiple values for a parameter you have to provide all values in a single parameter (If you are using BIRTs default command line runner).<br />
<br />
Let's assume that you have a parameter called ids that allows multiple values:<br />
<br />
genReport.bat -p "ids=1,2,3,4" -f doc C:\birt_runtime\birt_report\myReport.rptdesign"<br /></p></blockquote>