Re: JasperReports Plugin datasource

2008-11-21 Thread Milan Milanovic

O.K. Good. One more thing, it is maybe good to add SUBREPORT_DIR JR param as
a JR result param too, or to use directory location to say that subreport is
located in the same dir. 

--
Milan


newton.dave wrote:
> 
> A patch file would be better, but I can do it this way too.
> 
> 
> --- On Fri, 11/21/08, Milan Milanovic <[EMAIL PROTECTED]> wrote:
> 
>> From: Milan Milanovic <[EMAIL PROTECTED]>
>> Subject: Re: JasperReports Plugin datasource
>> To: user@struts.apache.org
>> Date: Friday, November 21, 2008, 11:49 AM
>> Dave,
>> 
>> I put the fix: 
>> https://issues.apache.org/struts/browse/WW-2884
>> https://issues.apache.org/struts/browse/WW-2884 . 
>> Please check it if I did it correctly.
>> 
>> --
>> Milan
>> 
>> 
>> newton.dave wrote:
>> > 
>> > --- On Fri, 11/21/08, Milan Milanovic wrote:
>> >> O.K. Where can I do this ?
>> > 
>> > On the S2 JIRA at:
>> https://issues.apache.org/struts/secure/Dashboard.jspa
>> > 
>> > (I think)
>> > 
>> > 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-tp20564743p20625106.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-tp20564743p20628219.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]



Re: JasperReports Plugin datasource

2008-11-21 Thread Dave Newton
A patch file would be better, but I can do it this way too.


--- On Fri, 11/21/08, Milan Milanovic <[EMAIL PROTECTED]> wrote:

> From: Milan Milanovic <[EMAIL PROTECTED]>
> Subject: Re: JasperReports Plugin datasource
> To: user@struts.apache.org
> Date: Friday, November 21, 2008, 11:49 AM
> Dave,
> 
> I put the fix: 
> https://issues.apache.org/struts/browse/WW-2884
> https://issues.apache.org/struts/browse/WW-2884 . 
> Please check it if I did it correctly.
> 
> --
> Milan
> 
> 
> newton.dave wrote:
> > 
> > --- On Fri, 11/21/08, Milan Milanovic wrote:
> >> O.K. Where can I do this ?
> > 
> > On the S2 JIRA at:
> https://issues.apache.org/struts/secure/Dashboard.jspa
> > 
> > (I think)
> > 
> > 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-tp20564743p20625106.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]



Re: JasperReports Plugin datasource

2008-11-21 Thread Milan Milanovic

Dave,

I put the fix:  https://issues.apache.org/struts/browse/WW-2884
https://issues.apache.org/struts/browse/WW-2884 . 
Please check it if I did it correctly.

--
Milan


newton.dave wrote:
> 
> --- On Fri, 11/21/08, Milan Milanovic wrote:
>> O.K. Where can I do this ?
> 
> On the S2 JIRA at: https://issues.apache.org/struts/secure/Dashboard.jspa
> 
> (I think)
> 
> 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-tp20564743p20625106.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]



Re: JasperReports Plugin datasource

2008-11-21 Thread Dave Newton
--- On Fri, 11/21/08, Milan Milanovic wrote:
> O.K. Where can I do this ?

On the S2 JIRA at: https://issues.apache.org/struts/secure/Dashboard.jspa

(I think)

Dave


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JasperReports Plugin datasource

2008-11-21 Thread Milan Milanovic

Dave,


newton.dave wrote:
> 
>> I added connection param to the JR result and now it works perfectly 
>> :-)! If connection is found, dataSource is not used. 
> 
> Glad to hear it. If you want, you could create a patch and a JIRA and I'll
> apply it to the JR result and finish some of my earlier work on it.
> 

O.K. Where can I do this ?

-- 
View this message in context: 
http://www.nabble.com/JasperReports-Plugin-datasource-tp20564743p20624536.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]



Re: JasperReports Plugin datasource

2008-11-21 Thread Dave Newton
--- On Fri, 11/21/08, Milan Milanovic wrote:
> I found what is the problem. Query that JR report run returned no rows,
> so it show it like empty.

[OT] There's a JR parameter for that, btw, so if it's a report with no data 
elements it'll still print out something.

> I added connection param to the JR result and now it works perfectly 
> :-)! If connection is found, dataSource is not used. 

Glad to hear it. If you want, you could create a patch and a JIRA and I'll 
apply it to the JR result and finish some of my earlier work on it.

Dave


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JasperReports Plugin datasource

2008-11-21 Thread Milan Milanovic

Hi Dave,

I found what is the problem. Query that JR report run returned no rows, so
it show it like empty. I added connection param to the JR result and now it
works perfectly :-)! If connection is found, dataSource is not used. 

Great job, thanks!

--
Milan


newton.dave wrote:
> 
> --- On Fri, 11/21/08, Milan Milanovic <[EMAIL PROTECTED]> wrote:
>> I managed to call fillReport with open Connection object,
>> but I just get an empty report page?! If I try to pass Connection object
>> as dataSource in JR result, then I get that exception that Connection is 
>> null and I see report contents but with null values ?
> 
> Second comment first: Passing a connection object as the dataSource won't
> work--it's expecting a data source, not a connection.
> 
> Since I don't know what your code is doing with fillReport I have zero
> chance of providing any useful feedback.
> 
> Again: if you're not using the JR result plugin as intended it might make
> more sense to just use JR normally and stream the PDF contents back. If
> you add a connection parameter to the result and are using it correctly in
> a fillReport call then you'd have to look more on the JR side of things.
> 
> 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-tp20564743p20623288.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]



Re: JasperReports Plugin datasource

2008-11-21 Thread Dave Newton
--- On Fri, 11/21/08, Milan Milanovic <[EMAIL PROTECTED]> wrote:
> I managed to call fillReport with open Connection object,
> but I just get an empty report page?! If I try to pass Connection object
> as dataSource in JR result, then I get that exception that Connection is 
> null and I see report contents but with null values ?

Second comment first: Passing a connection object as the dataSource won't 
work--it's expecting a data source, not a connection.

Since I don't know what your code is doing with fillReport I have zero chance 
of providing any useful feedback.

Again: if you're not using the JR result plugin as intended it might make more 
sense to just use JR normally and stream the PDF contents back. If you add a 
connection parameter to the result and are using it correctly in a fillReport 
call then you'd have to look more on the JR side of things.

Dave


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JasperReports Plugin datasource

2008-11-21 Thread Milan Milanovic

I managed to call fillReport with open Connection object, but I just get an
empty report page?! If I try to pass Connection object as dataSource in JR
result, then I get that exception that Connection is null and I see report
contents but with null values ?

--
Milan


newton.dave wrote:
> 
> --- On Thu, 11/20/08, Milan Milanovic wrote:
>> Yes, I understand. But who needs that?!
> 
> Lots of people. Many JR reports are simply well-formatted tabular data
> which is trivially represented by a list, potentially of composite
> objects. In fact that's all I've ever used it for over a half-decade.
> 
>> 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 ?
> 
> No clue. AFAIK you could just pass in the connection object in the
> parameter map and access it in the report that way, I think someone at my
> current gig is doing that, but I don't know any of the details.
> 
> Again--if you're not using the result as intended I don't really see any
> benefit in using the result at all and it'd probably be just as simple to
> stream the PDF to the browser manually.
> 
> Or you could take the code from the S2.1 result, add a result
> configuration parameter for a connection, and do whatever you want with
> JR.
> 
> 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-tp20564743p20622753.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]



Re: JasperReports Plugin datasource

2008-11-20 Thread Dave Newton
--- On Thu, 11/20/08, Milan Milanovic wrote:
> Yes, I understand. But who needs that?!

Lots of people. Many JR reports are simply well-formatted tabular data which is 
trivially represented by a list, potentially of composite objects. In fact 
that's all I've ever used it for over a half-decade.

> 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 ?

No clue. AFAIK you could just pass in the connection object in the parameter 
map and access it in the report that way, I think someone at my current gig is 
doing that, but I don't know any of the details.

Again--if you're not using the result as intended I don't really see any 
benefit in using the result at all and it'd probably be just as simple to 
stream the PDF to the browser manually.

Or you could take the code from the S2.1 result, add a result configuration 
parameter for a connection, and do whatever you want with JR.

Dave


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JasperReports Plugin datasource

2008-11-20 Thread Milan Milanovic

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: user@struts.apache.org
>> 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]



Re: JasperReports Plugin datasource

2008-11-20 Thread Dave Newton
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: user@struts.apache.org
> 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]



Re: JasperReports Plugin datasource

2008-11-20 Thread Milan Milanovic

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]



Re: JasperReports Plugin datasource

2008-11-20 Thread Milan Milanovic

Dear Dave,


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.
> 

Well, fillReport() of JasperReports accept Connection object and parameters,
too. I used this before many times. I'm just not sure why I get this error,
it seems that Connection object is destroyed in JasperReportsResult class or
something.


newton.dave wrote:
> 
>> 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.
> 
> 

O.K. I'll check this.

--
Milan

-- 
View this message in context: 
http://www.nabble.com/JasperReports-Plugin-datasource-tp20564743p20607037.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]



Re: JasperReports Plugin datasource

2008-11-20 Thread Dave Newton
--- 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]



Re: JasperReports Plugin datasource

2008-11-20 Thread Milan Milanovic

Dear Dave,

It works now. I get report, but with null values. In console I get this:

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 ?

One more thing, is it possible to show report in new window and that my
application redirect to some web page in main window ?

--
Thx, Milan



Milan Milanovic wrote:
> 
> Yep, I have struts2-jasperreports-plugin-2.0.11.1.jar in my
> project/WEB-INF/lib. I don't know why it doesn't recognize those classes.
> I'll check this.
> 
> 
> newton.dave wrote:
>> 
>> --- On Thu, 11/20/08, Milan Milanovic wrote:
>>> when I copied this class to my project, it say that I
>>> don't have these two classes: ValueStackDataSource and 
>>> ValueStackShadowMap. Should I copy them too ?
>> 
>> Hmm, maybe so--the work I did on this was awhile ago so I don't really
>> recall. Do you have the original S2.0 JR plugin on your classpath?
>> 
>> 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-tp20564743p20606415.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]



Re: JasperReports Plugin datasource

2008-11-20 Thread Milan Milanovic

Yep, I have struts2-jasperreports-plugin-2.0.11.1.jar in my
project/WEB-INF/lib. I don't know why it doesn't recognize those classes.
I'll check this.


newton.dave wrote:
> 
> --- On Thu, 11/20/08, Milan Milanovic wrote:
>> when I copied this class to my project, it say that I
>> don't have these two classes: ValueStackDataSource and 
>> ValueStackShadowMap. Should I copy them too ?
> 
> Hmm, maybe so--the work I did on this was awhile ago so I don't really
> recall. Do you have the original S2.0 JR plugin on your classpath?
> 
> 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-tp20564743p20604678.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]



Re: JasperReports Plugin datasource

2008-11-20 Thread Dave Newton
--- On Thu, 11/20/08, Milan Milanovic wrote:
> when I copied this class to my project, it say that I
> don't have these two classes: ValueStackDataSource and 
> ValueStackShadowMap. Should I copy them too ?

Hmm, maybe so--the work I did on this was awhile ago so I don't really recall. 
Do you have the original S2.0 JR plugin on your classpath?

Dave


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JasperReports Plugin datasource

2008-11-20 Thread Milan Milanovic

Dave,

when I copied this class to my project, it say that I don't have these two
classes:
ValueStackDataSource and ValueStackShadowMap. Should I copy them too ?

--
Regards, Milan


newton.dave wrote:
> 
> --- On Thu, 11/20/08, Milan Milanovic wrote:
>> Great Dave! Thanks very much. This is very helpful for anyone who 
>> deals with business applications that includes S2 and JR.
> 
> Keep me posted and let me know if there are other JR needs.
> 
> 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-tp20564743p20604349.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]



Re: JasperReports Plugin datasource

2008-11-20 Thread Dave Newton
--- On Thu, 11/20/08, Milan Milanovic wrote:
> Great Dave! Thanks very much. This is very helpful for anyone who 
> deals with business applications that includes S2 and JR.

Keep me posted and let me know if there are other JR needs.

Dave


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JasperReports Plugin datasource

2008-11-20 Thread Milan Milanovic

Great Dave! Thanks very much. This is very helpful for anyone who deals with
business applications that includes S2 and JR.

I'll try to use this solution.

--
Regards, Milan


newton.dave wrote:
> 
> --- On Thu, 11/20/08, Milan Milanovic wrote:
>> O.K. Thank you. Please, send me that class or a link to
>> S2.1 source where can I find it.
> 
> Use [1] and cut-and-paste, or follow the standard checkout process and
> copy it into your project.
> 
>> Just one more thing, how can I include this class in my
>> Struts 2.0.11.1 installation ? Please don't tell me that 
>> I need to checkout Struts source and recompile it with new class ?
> 
> You can include it in your own project's code and configure it like you
> would any other custom result type [2, 3]. (I'll expand this section of
> the wiki with a quick example over the weekend.)
> 
> Dave
> 
> [1]
> http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java?revision=670172&view=markup
> 
> [2] http://struts.apache.org/2.x/docs/result-types.html
> [3] http://struts.apache.org/2.x/docs/result-configuration.html
> 
> 
> -
> 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-tp20564743p20604014.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]



Re: JasperReports Plugin datasource

2008-11-20 Thread Dave Newton
--- On Thu, 11/20/08, Milan Milanovic wrote:
> O.K. Thank you. Please, send me that class or a link to
> S2.1 source where can I find it.

Use [1] and cut-and-paste, or follow the standard checkout process and copy it 
into your project.

> Just one more thing, how can I include this class in my
> Struts 2.0.11.1 installation ? Please don't tell me that 
> I need to checkout Struts source and recompile it with new class ?

You can include it in your own project's code and configure it like you would 
any other custom result type [2, 3]. (I'll expand this section of the wiki with 
a quick example over the weekend.)

Dave

[1] 
http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java?revision=670172&view=markup

[2] http://struts.apache.org/2.x/docs/result-types.html
[3] http://struts.apache.org/2.x/docs/result-configuration.html


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JasperReports Plugin datasource

2008-11-20 Thread Milan Milanovic

Dear Dave,

O.K. Thank you. Please, send me that class or a link to S2.1 source where
can I find it.

Just one more thing, how can I include this class in my Struts 2.0.11.1
installation ? Please don't tell me that I need to checkout Struts source
and recompile it with new class ?

--
Best regards, Milan


newton.dave wrote:
> 
> --- On Thu, 11/20/08, Milan Milanovic wrote:
>> Does ANYONE know how to pass parameters to report in Struts
>> 2 when JasperReportsResult is used ?!
> 
> I will send you a sanitized version of my custom JR result, or you can
> just look in the S2.1 source where the patch has been applied.
> 
> 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-tp20564743p20603103.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]



Re: JasperReports Plugin datasource

2008-11-20 Thread Dave Newton
Actually, just use the S2.1 jasper result, IIRC I didn't do anything in 
particular for the S2.1 version, and (believe it or not) it's cleaner than the 
version I would have emailed you--our in-house version is structurally quite 
different, the S2.1 version doesn't have the same extreme changes (although 
when I have time I'll deal with that one too).

Dave

--- On Thu, 11/20/08, Dave Newton <[EMAIL PROTECTED]> wrote:
> --- On Thu, 11/20/08, Milan Milanovic wrote:
> > Does ANYONE know how to pass parameters to report in
> Struts
> > 2 when JasperReportsResult is used ?!
> 
> I will send you a sanitized version of my custom JR result,
> or you can just look in the S2.1 source where the patch has
> been applied.
> 
> Dave
> 
> 
> -
> 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]



Re: JasperReports Plugin datasource

2008-11-20 Thread Dave Newton
--- On Thu, 11/20/08, Milan Milanovic wrote:
> Does ANYONE know how to pass parameters to report in Struts
> 2 when JasperReportsResult is used ?!

I will send you a sanitized version of my custom JR result, or you can just 
look in the S2.1 source where the patch has been applied.

Dave


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JasperReports Plugin datasource

2008-11-20 Thread Milan Milanovic

Does ANYONE know how to pass parameters to report in Struts 2 when
JasperReportsResult is used ?!



Milan Milanovic wrote:
> 
> Hi, 
> 
> I want to use JasperReports from my Struts 2 app. But I have a problem
> with datasource param. I want to pass Connection object (created or if
> possible  class="org.springframework.jdbc.datasource.DriverManagerDataSource"...>
> spring bean) as a parameter and not a list, because my report doesn't need
> any input list (it get data directly from database), I just need to pass
> some params to it. How can I define this ?
> 
> 
> --
> Thx, Miki
> 

-- 
View this message in context: 
http://www.nabble.com/JasperReports-Plugin-datasource-tp20564743p20602489.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]



Re: JasperReports Plugin datasource

2008-11-19 Thread Milan Milanovic

Dave,

what do you recommend me to do ? I just want to do the MOST SIMPLE thing,
like I did many times in plain Java apps, to create JasperReports object, to
pass to it connection and parameters and to show it ?

--
Thx, M.


newton.dave wrote:
> 
> --- On Tue, 11/18/08, Milan Milanovic wrote:
>> I want to use JasperReports from my Struts 2 app. But I
>> have a problem with datasource param. I want to pass 
>> Connection object (created or if possible
>> > class="org.springframework.jdbc.datasource.DriverManagerDataSource"...>
>> spring bean) as a parameter and not a list, because my
>> report doesn't need any input list (it get data directly 
>> from database), I just need to pass some params to it. How can I define
>> this ?
> 
> The current version of the S2 JR plugin accepts a map of parameters; I
> don't think I back-ported it to the S2.0 code, though. I can provide a
> copy of my JR result type if you need it, though--I've just been too
> swamped to get it in to the mainline code. It's trivial to implement,
> though; it might just be easier and quicker for you to take the existing
> JR result class and throw in the changes yourself.
> 
> 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-tp20564743p20587912.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]



Re: JasperReports Plugin datasource

2008-11-18 Thread Milan Milanovic

Dear Dave,

I'm not sure how to use this. Can you please show an example ?

--
Milan


newton.dave wrote:
> 
> --- On Tue, 11/18/08, Milan Milanovic wrote:
>> I want to use JasperReports from my Struts 2 app. But I
>> have a problem with datasource param. I want to pass 
>> Connection object (created or if possible
>> > class="org.springframework.jdbc.datasource.DriverManagerDataSource"...>
>> spring bean) as a parameter and not a list, because my
>> report doesn't need any input list (it get data directly 
>> from database), I just need to pass some params to it. How can I define
>> this ?
> 
> The current version of the S2 JR plugin accepts a map of parameters; I
> don't think I back-ported it to the S2.0 code, though. I can provide a
> copy of my JR result type if you need it, though--I've just been too
> swamped to get it in to the mainline code. It's trivial to implement,
> though; it might just be easier and quicker for you to take the existing
> JR result class and throw in the changes yourself.
> 
> 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-tp20564743p20569375.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]



Re: JasperReports Plugin datasource

2008-11-18 Thread Milan Milanovic

Dear Dave,

as far as I can see, I can pass Connection object as dataSource parameter
from my action class ? Altough I don't know how to pass dataSource bean from
Spring configuration. But, it seems that JR result type use parameters from
value stack that can be used directly in report (without passing and calling
fillReport) ?

--
 Milan


newton.dave wrote:
> 
> --- On Tue, 11/18/08, Milan Milanovic wrote:
>> I want to use JasperReports from my Struts 2 app. But I
>> have a problem with datasource param. I want to pass 
>> Connection object (created or if possible
>> > class="org.springframework.jdbc.datasource.DriverManagerDataSource"...>
>> spring bean) as a parameter and not a list, because my
>> report doesn't need any input list (it get data directly 
>> from database), I just need to pass some params to it. How can I define
>> this ?
> 
> The current version of the S2 JR plugin accepts a map of parameters; I
> don't think I back-ported it to the S2.0 code, though. I can provide a
> copy of my JR result type if you need it, though--I've just been too
> swamped to get it in to the mainline code. It's trivial to implement,
> though; it might just be easier and quicker for you to take the existing
> JR result class and throw in the changes yourself.
> 
> 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-tp20564743p20569314.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]



Re: JasperReports Plugin datasource

2008-11-18 Thread Milan Milanovic

Dear Dave,

as far as I can see, I can pass Connection object as dataSource parameter
from my action class ? Altough I don't know how to pass dataSource bean from
Spring configuration. But, it seems that JR result type use parameters from
value stack that can be used directly in report (without passing and calling
fillReport) ?

--
 Milan


newton.dave wrote:
> 
> --- On Tue, 11/18/08, Milan Milanovic wrote:
>> I want to use JasperReports from my Struts 2 app. But I
>> have a problem with datasource param. I want to pass 
>> Connection object (created or if possible
>> > class="org.springframework.jdbc.datasource.DriverManagerDataSource"...>
>> spring bean) as a parameter and not a list, because my
>> report doesn't need any input list (it get data directly 
>> from database), I just need to pass some params to it. How can I define
>> this ?
> 
> The current version of the S2 JR plugin accepts a map of parameters; I
> don't think I back-ported it to the S2.0 code, though. I can provide a
> copy of my JR result type if you need it, though--I've just been too
> swamped to get it in to the mainline code. It's trivial to implement,
> though; it might just be easier and quicker for you to take the existing
> JR result class and throw in the changes yourself.
> 
> 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-tp20564743p20569135.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]



Re: JasperReports Plugin datasource

2008-11-18 Thread Milan Milanovic

Dear Dave,

as far as I can see, I can pass Connection object as dataSource parameter
from my action class ? Altough I don't know how to pass dataSource bean from
Spring configuration. But, it seems that JR result type use parameters from
value stack that can be used directly in report (without passing and calling
fillReport) ?

--
 Milan


newton.dave wrote:
> 
> --- On Tue, 11/18/08, Milan Milanovic wrote:
>> I want to use JasperReports from my Struts 2 app. But I
>> have a problem with datasource param. I want to pass 
>> Connection object (created or if possible
>> > class="org.springframework.jdbc.datasource.DriverManagerDataSource"...>
>> spring bean) as a parameter and not a list, because my
>> report doesn't need any input list (it get data directly 
>> from database), I just need to pass some params to it. How can I define
>> this ?
> 
> The current version of the S2 JR plugin accepts a map of parameters; I
> don't think I back-ported it to the S2.0 code, though. I can provide a
> copy of my JR result type if you need it, though--I've just been too
> swamped to get it in to the mainline code. It's trivial to implement,
> though; it might just be easier and quicker for you to take the existing
> JR result class and throw in the changes yourself.
> 
> 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-tp20564743p20569134.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]



Re: JasperReports Plugin datasource

2008-11-18 Thread Milan Milanovic

Dear Dave,

as far as I can see, I can pass Connection object as dataSource parameter
from my action class ? Altough I don't know how to pass dataSource bean from
Spring configuration. But, it seems that JR result type use parameters from
value stack that can be used directly in report (without passing and calling
fillReport) ?

--
Thx, Milan


newton.dave wrote:
> 
> --- On Tue, 11/18/08, Milan Milanovic wrote:
>> I want to use JasperReports from my Struts 2 app. But I
>> have a problem with datasource param. I want to pass 
>> Connection object (created or if possible
>> > class="org.springframework.jdbc.datasource.DriverManagerDataSource"...>
>> spring bean) as a parameter and not a list, because my
>> report doesn't need any input list (it get data directly 
>> from database), I just need to pass some params to it. How can I define
>> this ?
> 
> The current version of the S2 JR plugin accepts a map of parameters; I
> don't think I back-ported it to the S2.0 code, though. I can provide a
> copy of my JR result type if you need it, though--I've just been too
> swamped to get it in to the mainline code. It's trivial to implement,
> though; it might just be easier and quicker for you to take the existing
> JR result class and throw in the changes yourself.
> 
> 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-tp20564743p20569131.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]



Re: JasperReports Plugin datasource

2008-11-18 Thread Milan Milanovic

Dear Dave,

I'm not sure how to do this. Please, give me an example.

--
Thank you in advance, Milan


newton.dave wrote:
> 
> --- On Tue, 11/18/08, Milan Milanovic wrote:
>> I want to use JasperReports from my Struts 2 app. But I
>> have a problem with datasource param. I want to pass 
>> Connection object (created or if possible
>> > class="org.springframework.jdbc.datasource.DriverManagerDataSource"...>
>> spring bean) as a parameter and not a list, because my
>> report doesn't need any input list (it get data directly 
>> from database), I just need to pass some params to it. How can I define
>> this ?
> 
> The current version of the S2 JR plugin accepts a map of parameters; I
> don't think I back-ported it to the S2.0 code, though. I can provide a
> copy of my JR result type if you need it, though--I've just been too
> swamped to get it in to the mainline code. It's trivial to implement,
> though; it might just be easier and quicker for you to take the existing
> JR result class and throw in the changes yourself.
> 
> 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-tp20564743p20566266.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]



Re: JasperReports Plugin datasource

2008-11-18 Thread Dave Newton
--- On Tue, 11/18/08, Milan Milanovic wrote:
> I want to use JasperReports from my Struts 2 app. But I
> have a problem with datasource param. I want to pass 
> Connection object (created or if possible
>  class="org.springframework.jdbc.datasource.DriverManagerDataSource"...>
> spring bean) as a parameter and not a list, because my
> report doesn't need any input list (it get data directly 
> from database), I just need to pass some params to it. How can I define this ?

The current version of the S2 JR plugin accepts a map of parameters; I don't 
think I back-ported it to the S2.0 code, though. I can provide a copy of my JR 
result type if you need it, though--I've just been too swamped to get it in to 
the mainline code. It's trivial to implement, though; it might just be easier 
and quicker for you to take the existing JR result class and throw in the 
changes yourself.

Dave


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



JasperReports Plugin datasource

2008-11-18 Thread Milan Milanovic

Hi, 

I want to use JasperReports from my Struts 2 app. But I have a problem with
datasource param. I want to pass Connection object (created or if possible

spring bean) as a parameter and not a list, because my report doesn't need
any input list (it get data directly from database), I just need to pass
some params to it. How can I define this ?


--
Thx, Miki
-- 
View this message in context: 
http://www.nabble.com/JasperReports-Plugin-datasource-tp20564743p20564743.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]