Command Line Execution

By: steveT - stevetucknott
Command Line Execution
2005-05-31 01:06
Is there a way of 'running' the designed report from the 'command line'?
Assuming that we have used iReport to design and create the jrxml file, and have compiled that report - can I then (somehow) run that report without going through iReport?
Effectively to parameterise any input parameters and the required output format and file path/name...ie
run ./myReport.jasper --myParam1 "abcdef" --myParam2 123 --outputFormat "PDF" --outputFile "/tmp/fred"

Is that possible - or am I asking the wrong list (presumably this is a jasperReports issue?)




By: Giulio Toffoli - gt78
RE: Command Line Execution
2005-05-31 07:47

You can't using ireport, but it should be no complex to write an application that do exactly this.

Giulio




By: steveT - stevetucknott
RE: Command Line Execution
2005-05-31 23:36
...presumably thats a Java application?........
Is there a way to use a scripting tool to run jasperReports with the compiled .jasper file?




By: Giulio Toffoli - gt78
RE: Command Line Execution
2005-06-01 15:55

With JasperReports is shipped an ant task to compile reports. You can modify it to export too
and use ant.


Giulio




By: steveT - stevetucknott
RE: Command Line Execution
2005-07-27 02:42
Just in case anyone has the same problem ....
I have now written a small Java app (the code is appalling as I'm not a Java programmer) that will run a predesigned report and either/and/or preview it or format an output file (pdf,html etc). It picks up any parameters required by the report and prompts the user for the values.
If anyone is interested, contact me off list.
2005 IR Help's picture
Joined: Aug 9 2006 - 3:40am
Last seen: 17 years 1 month ago

4 Answers:

Dear Steve/Giulio,

Can you have a sample application or script whic run a report as a batch process by varying some the parameters like

run ./myReport.jasper --myParam1 "abcdef" --myParam2 123 --outputFormat "PDF" --outputFile "/tmp/fred.pdf"
unnipillai's picture
Joined: Mar 30 2008 - 3:07pm
Last seen: 15 years 5 months ago
unnipillai,

Did you download jasperreports-<ver>-project.zip? It's available as a [url=http://sourceforge.net/project/showfiles.php?group_id=36382]download. That's probably the easiest starting point for a small app that compiles/generates/displays reports.

If you have questions about using it, post to the JasperReports forum.

Regards,
Matt
mdahlman's picture
37340
Joined: Mar 13 2007 - 2:43am
Last seen: 8 years 10 months ago
Matt,

I have download the iReports source code and tried running a compiled report through command line ,but happening.

My Concerns for the product is automatic execution of iReports in a shell script or batch file.

iReports.bat report1.jrxml (report1.jasper) -username -password - timestamp -o ouput.pdf

I request you to look into this . Because Datavision reports provide this facility like the following

datavision.bat -c output.pdf E:\\DataVision-Reports\\samplereport1.xml

Thanks,
Unni
unnipillai's picture
Joined: Mar 30 2008 - 3:07pm
Last seen: 15 years 5 months ago
Unni,

Did you download jasperreports-<ver>-project.zip?

That's probably the easiest starting point. It shows command line compilation and filling of reports. It seems to be exactly what you're describing.

Regards,
Matt
mdahlman's picture
37340
Joined: Mar 13 2007 - 2:43am
Last seen: 8 years 10 months ago
Feedback
randomness