You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Thameem <th...@gmail.com> on 2012/02/25 06:20:44 UTC
Struts 2 PASSING CONNECTION TO IREPORT
I have created some reports with iReport BY connecting to sql server
database, and I tried to integrated them with my struts2 web application.
While the documentation for the jasperReport plugin explains how to use a
datasource and a compiled template to generate a report, I wasn't able to
find out how to use a database connection as a datasource and how to pass
parameters to the report. I have the jrxml and jasper files. I need to pass
the connection to ireport. Can anyone give me a solution.?
Thanking you advance.
--
View this message in context: http://struts.1045723.n5.nabble.com/Struts-2-PASSING-CONNECTION-TO-IREPORT-tp5514559p5514559.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Struts 2 PASSING CONNECTION TO IREPORT
Posted by Dave Newton <da...@gmail.com>.
The JR plugin expects the datasource to be the S2 action, not a connection.
If you have an existing JR report you may want to consider just keeping it
as-is and streaming back the result.
Dave
On Sat, Feb 25, 2012 at 12:20 AM, Thameem <th...@gmail.com> wrote:
> I have created some reports with iReport BY connecting to sql server
> database, and I tried to integrated them with my struts2 web application.
> While the documentation for the jasperReport plugin explains how to use a
> datasource and a compiled template to generate a report, I wasn't able to
> find out how to use a database connection as a datasource and how to pass
> parameters to the report. I have the jrxml and jasper files. I need to pass
> the connection to ireport. Can anyone give me a solution.?
> Thanking you advance.
>
> --
> View this message in context:
> http://struts.1045723.n5.nabble.com/Struts-2-PASSING-CONNECTION-TO-IREPORT-tp5514559p5514559.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
RE: [struts-user] Struts 2 PASSING CONNECTION TO IREPORT
Posted by Jason Pyeron <jp...@pdinc.us>.
> -----Original Message-----
> From: Thameem [mailto:thameem.mca@gmail.com]
> Sent: Saturday, February 25, 2012 0:21
> To: user@struts.apache.org
> Subject: [struts-user] Struts 2 PASSING CONNECTION TO IREPORT
>
> I have created some reports with iReport BY connecting to sql
> server database, and I tried to integrated them with my
> struts2 web application.
> While the documentation for the jasperReport plugin explains
> how to use a datasource and a compiled template to generate a
> report, I wasn't able to find out how to use a database
> connection as a datasource and how to pass parameters to the
> report. I have the jrxml and jasper files. I need to pass the
You are not giving much to go on here, are they in the same web application? If
not this may be pointless exercise.
> connection to ireport. Can anyone give me a solution.?
*** THIS SOUNDS FISHY TO ME BUT ***
Try putting the connection in to the request or session scope.
> Thanking you advance.
>
> --
> View this message in context:
> http://struts.1045723.n5.nabble.com/Struts-2-PASSING-CONNECTIO
N-TO-IREPORT-tp5514559p5514559.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Struts 2 PASSING CONNECTION TO IREPORT
Posted by Frans Thamura <fr...@meruvian.org>.
My experience with jasper, i prefer not use s2. Use direct query. It is
painfull map s2 to report.
On Feb 25, 2012 7:20 PM, "Thameem" <th...@gmail.com> wrote:
> I have created some reports with iReport BY connecting to sql server
> database, and I tried to integrated them with my struts2 web application.
> While the documentation for the jasperReport plugin explains how to use a
> datasource and a compiled template to generate a report, I wasn't able to
> find out how to use a database connection as a datasource and how to pass
> parameters to the report. I have the jrxml and jasper files. I need to pass
> the connection to ireport. Can anyone give me a solution.?
> Thanking you advance.
>
> --
> View this message in context:
> http://struts.1045723.n5.nabble.com/Struts-2-PASSING-CONNECTION-TO-IREPORT-tp5514559p5514559.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>