Jump to content
JasperReports Library 7.0 is now available ×

Recommended Posts

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

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...