Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Two SQL query inside single JasperReport

We are generating reports based on iReports and JasperReports for web application.

Using iReports I found I am struck with big problem.

I want to use two SQL query to fill up my main report... In query designer I can only write one query..

For another query I cannot use sub-reports...

How do I write second query which will return different fields and include them in my report..

Please guide...

I cannot use sub-reports...

like image 490
AngelsandDemons Avatar asked Jul 23 '12 06:07

AngelsandDemons


1 Answers

As far as Ireports are concerned, the main report can comprise only one query. And if you wanna use multiple queries in your report, it is possible in the following ways.

  • Sub Report
  • Table Dataset.
  • sub Dataset.

since you don wish to use a sub report, you can go for a Table Dataset. Anything you would do with a sub report is possible with table dataset too(Except for returning variables). You can use sub datasets with charts and graphs. Table set will be of use to you i hope.

like image 151
Gopinagh.R Avatar answered Nov 13 '22 14:11

Gopinagh.R