Jump to content
JasperReports Library 7.0 is now available ×

Jasper Along With Ireports Help...Urgent


ktrinad

Recommended Posts

By: vasanthvaradan - vasanthvaradan

Jasper Along With Ireports Help...Urgent

2003-05-23 06:31

can nyone explain in steps how to use data retreived from more than one SQL.If i can use subreports hw in detail.i want to design the report in ireports and want to deploy remotely with dynamic parameters.need imm answers..

 

 

 

 

By: Giulio Toffoli - gt78

RE: Jasper Along With Ireports Help...Urgent

2003-05-23 11:16

 

With iReport you can only design the report, but you need an external program tu run it with 2 queries.

I don't know what you want to do with 2 queries, there is a lot of combinatoins to use it (1 master and 1 subreport, 1 master with no records and 2 subreport, etc...)

 

Remember: a SQL resultset is incapsulated in a JRResultSetDataSource (a derived class fron dori.jasper.engine.JRDataSource.

You can create how many JRResultSetDataSources objects you want starting from a set of SQL result sets. Every JRResultSetDAtaSource will rappresents a ResultSet and it will passed to the report as parameter. In this way you'll have several parameter like datasource1, datasource2 [, .... datasourceN].

At this point you can design a report *no based on a datasource*. Set the PrintWhenNoDataType to PrintAllNoDetail, and add how many subreports you want on the title band (this because you have not records to be printed in detail for the master page). Set as expressionDataSource for any subreport, the parameter that rappresents your specific datasource (i.e. Subreport1 will have a DataSourceExpression = $P{JRDataSource1}).

Remember that the type of your datasource parameters must be dori.jasper.engine.JRDataSource

 

Your program must instance 2 JRDataSourceResultSet, pass they to your report using the parameters map and run the report using i.e. an JREmptyDataSource. The 2 JRDataSourceResultSets will fill your two subreports.

 

I hope that this helps you

 

Giulio

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