SQL

By: Brian Deffenbaugh - bdeffenbaugh
SQL
2002-07-25 06:35
Is it possible to design the XML file to accept the SQL Statement as a paremeter? I have found examples passing in Titles and other information, but am unable to use the $P as a value for the <querystring> tag.




By: Teodor Danciu - teodord
RE: SQL
2002-08-05 00:46

Hi,

No, this is not possible.

But I think what you need is to execute the SQL
query outside JasperReports and pass the
ResultSet object to the report filling methods.

This is perfectly feasible.

Check the JasperFillManager class to see all the
methods that can be used to fill a report and you
will find some that receive a JRDataSource object
as a parameter.
You can wrap your ResultSet object into
a JRDataSource object using the
JRResultSetDataSource class.

Good luck!
Teodor
2006 IR Open Dicussion's picture
Joined: Aug 10 2006 - 3:24am
Last seen: 16 years 10 months ago

0 Answers:

No answers yet
Feedback
randomness