Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » How to run a BIRT report through command line
How to run a BIRT report through command line [message #948109] Wed, 17 October 2012 19:18 Go to next message
Vani Ra is currently offline Vani Ra
Messages: 11
Registered: September 2012
Junior Member
This is what I have done so far :

set BIRT_HOME to Report Engine directory..

Command am using:

genReport -f PDF -o test.pdf -F samples/hello_world.rptdesign

Error:

classNotFoundException: org.eclipse.birt.report.engine.api.ReportRunner



Any suggestions ???
Re: How to run a BIRT report through command line [message #948598 is a reply to message #948109] Thu, 18 October 2012 07:10 Go to previous messageGo to next message
donino donino is currently offline donino donino
Messages: 162
Registered: July 2011
Senior Member
I think you have to set your BIRT_HOME with the birt runtime folder, not the reportEngine folder. If you run your batch with Windows in a .bat, be careful to use a short path. In my case i have put the runtime just under the disk root:

Set BIRT_HOME=D:\birt
%BIRT_HOME%\ReportEngine\genReport.bat -runrender -o "%BIRT_HOME%\ReportEngine\samples\output.html" -f html "%BIRT_HOME%\ReportEngine\samples\hello_world.rptDesign"
Re: How to run a BIRT report through command line [message #948904 is a reply to message #948598] Thu, 18 October 2012 13:57 Go to previous messageGo to next message
Vani Ra is currently offline Vani Ra
Messages: 11
Registered: September 2012
Junior Member
donino donino wrote on Thu, 18 October 2012 03:10
I think you have to set your BIRT_HOME with the birt runtime folder, not the reportEngine folder. If you run your batch with Windows in a .bat, be careful to use a short path. In my case i have put the runtime just under the disk root:

Set BIRT_HOME=D:\birt
%BIRT_HOME%\ReportEngine\genReport.bat -runrender -o "%BIRT_HOME%\ReportEngine\samples\output.html" -f html "%BIRT_HOME%\ReportEngine\samples\hello_world.rptDesign"



Hi,

I just cross checked,, the BIRT_HOME is set to ReportEngine.

here is the right path that am using: set BIRT_HOME=C:\birt-runt
ime-2_6_2\birt-runtime-2_6_2\ReportEngine

and am still getting the same error.

Re: How to run a BIRT report through command line [message #949013 is a reply to message #948904] Thu, 18 October 2012 15:49 Go to previous messageGo to next message
donino donino is currently offline donino donino
Messages: 162
Registered: July 2011
Senior Member
May be i was not clear in my first answer, but i think you must NOT set it to the reportEngine, but to its parent folder, so in your case it could be C:\birt-runtime-2_6_2\birt-runtime-2_6_2



Re: How to run a BIRT report through command line [message #949026 is a reply to message #949013] Thu, 18 October 2012 15:59 Go to previous messageGo to next message
Vani Ra is currently offline Vani Ra
Messages: 11
Registered: September 2012
Junior Member
donino donino wrote on Thu, 18 October 2012 11:49
May be i was not clear in my first answer, but i think you must NOT set it to the reportEngine, but to its parent folder, so in your case it could be C:\birt-runtime-2_6_2\birt-runtime-2_6_2






Yup that worked.. Great Smile


one more thing, please tell me how do I set report Parameters through command line ?
Re: How to run a BIRT report through command line [message #949053 is a reply to message #949026] Thu, 18 October 2012 16:33 Go to previous messageGo to next message
donino donino is currently offline donino donino
Messages: 162
Registered: July 2011
Senior Member
You could use -p option in your command line:

genReport.bat -p "myParamName1=myParamValue1" -p "myParamName2=myParamValue2" -f PDF -o output.pdf -F sample.rptdesign
Re: How to run a BIRT report through command line [message #949068 is a reply to message #949053] Thu, 18 October 2012 16:51 Go to previous messageGo to next message
Vani Ra is currently offline Vani Ra
Messages: 11
Registered: September 2012
Junior Member
donino donino wrote on Thu, 18 October 2012 12:33
You could use -p option in your command line:

genReport.bat -p "myParamName1=myParamValue1" -p "myParamName2=myParamValue2" -f PDF -o output.pdf -F sample.rptdesign



Tried that but that doesnt work.. first parameter works fine but the next ones are no recognized...

Here is my command:

genReport.bat -o sample.pdf -f PDF -p "date=1800-01-01" -p "secSymbl=TFCCP" -p "secSymb2=TFTDP" -p "secSymb3=TFINP" -p "actID=01119S" -p "fromDate=11" -p "toDate=333" SampleReport.rptdesign
Re: How to run a BIRT report through command line [message #950320 is a reply to message #949068] Fri, 19 October 2012 20:22 Go to previous messageGo to next message
Vani Ra is currently offline Vani Ra
Messages: 11
Registered: September 2012
Junior Member
Vani Ra wrote on Thu, 18 October 2012 12:51
donino donino wrote on Thu, 18 October 2012 12:33
You could use -p option in your command line:

genReport.bat -p "myParamName1=myParamValue1" -p "myParamName2=myParamValue2" -f PDF -o output.pdf -F sample.rptdesign



Tried that but that doesnt work.. first parameter works fine but the next ones are no recognized...

Here is my command:

genReport.bat -o sample.pdf -f PDF -p "date=1800-01-01" -p "secSymbl=TFCCP" -p "secSymb2=TFTDP" -p "secSymb3=TFINP" -p "actID=01119S" -p "fromDate=11" -p "toDate=333" SampleReport.rptdesign



anybody ??
Re: How to run a BIRT report through command line [message #950593 is a reply to message #950320] Sat, 20 October 2012 01:43 Go to previous messageGo to next message
Michael Williams is currently offline Michael Williams
Messages: 1639
Registered: July 2009
Senior Member

That should work, how you have it. You're not getting any errors? The report is just running with only one parameter set?

Michael

Add interactivity, scheduling, sharing, live Excel export, and JS integration to your BIRT app with the new, free BIRT server, BIRT iHub F-Type.
Re: How to run a BIRT report through command line [message #953871 is a reply to message #950593] Mon, 22 October 2012 15:52 Go to previous messageGo to next message
Vani Ra is currently offline Vani Ra
Messages: 11
Registered: September 2012
Junior Member
Michael Williams wrote on Fri, 19 October 2012 21:43
That should work, how you have it. You're not getting any errors? The report is just running with only one parameter set?



yes i get erro.. the second paramter is not recognized at all. only the first one is picked up correctly.
Re: How to run a BIRT report through command line [message #954220 is a reply to message #953871] Mon, 22 October 2012 21:50 Go to previous message
Michael Williams is currently offline Michael Williams
Messages: 1639
Registered: July 2009
Senior Member

What is the error that you get?

Michael

Add interactivity, scheduling, sharing, live Excel export, and JS integration to your BIRT app with the new, free BIRT server, BIRT iHub F-Type.
Previous Topic:Hide row if element is empty
Next Topic:Render Task - Event Handler, Sorting/Filtering, etc.
Goto Forum:
  


Current Time: Tue Oct 21 13:49:55 GMT 2014

Powered by FUDForum. Page generated in 0.12859 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software