Yes, I understand. But who needs that ?! One collection for a report ? In
every application I have complex reports with SQL queries on the databse,
and only I need to pass parameters.
O.K. Anyway, what I need to change in order that JR result accept Connection
object ? Can I just say: Connection con = stack.finValue("connection"); and
then to call JR fillReport(...) with that object in JR result ?
--
Milan
newton.dave wrote:
>
> That sort of defeats the purpose of using the JR result--the idea behind
> the plugin, AFAICT, was to accept an action's collection property as the
> data source. If you're not going to do that then the JR result may not be
> of much benefit to you.
>
> Dave
>
>
> --- On Thu, 11/20/08, Milan Milanovic <[EMAIL PROTECTED]> wrote:
>
>> From: Milan Milanovic <[EMAIL PROTECTED]>
>> Subject: Re: JasperReports Plugin datasource
>> To: [email protected]
>> Date: Thursday, November 20, 2008, 1:25 PM
>> I found what is the problem. In JasperReportsResult
>> doExecute() method you
>> call report in this way:
>>
>> jasperPrint = JasperFillManager.fillReport(jasperReport,
>> parameters,
>> stackDataSource);
>>
>> where : ValueStackDataSource stackDataSource = new
>> ValueStackDataSource(stack, dataSource);
>>
>> But my dataSource is Connection, and I don't know what
>> ValueStackDataSource
>> accepts here.
>>
>> --
>> Milan
>>
>>
>> newton.dave wrote:
>> >
>> > --- On Thu, 11/20/08, Milan Milanovic wrote:
>> >> WARN
>> >>
>> net.sf.jasperreports.engine.query.JRJdbcQueryExecuter:89 -
>> >> The supplied java.sql.Connection object is null.
>> >>
>> >> I check, my Connection object which is attribute
>> of my
>> >> action class is not null in action method which
>> show report.
>> >> Why my Connection is null, do you have any idea ?
>> >
>> > Not off the top of my head, but I'm not sure how
>> you're trying to use it.
>> > The JR plugin's "dataSource" config
>> element is meant to be a collection
>> > that will be displayed by the report.
>> >
>> > If you're passing the connection object in the
>> parameters map and
>> > accessing it appropriately in the report definition
>> then I don't know why
>> > it wouldn't work, but I've never used the
>> plugin like that--that's a
>> > non-standard usage I haven't needed to explore.
>> >
>> >> One more thing, is it possible to show report in
>> new window
>> >> and that my application redirect to some web page
>> in main window ?
>> >
>> > I suppose, maybe via JavaScript or something.
>> >
>> > Dave
>> >
>> >
>> >
>> ---------------------------------------------------------------------
>> > To unsubscribe, e-mail:
>> [EMAIL PROTECTED]
>> > For additional commands, e-mail:
>> [EMAIL PROTECTED]
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/JasperReports-Plugin-datasource-tp20564743p20607262.html
>> Sent from the Struts - User mailing list archive at
>> Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail:
>> [EMAIL PROTECTED]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
--
View this message in context:
http://www.nabble.com/JasperReports-Plugin-datasource-tp20564743p20608084.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]