0

Similarly i have an requirement that, in one main excel report should have tittle only, and then need to call two independent queries and display the results below the tittle. Just need to send counts of records from both queries to main report.

I don't want to repeat the results just display once.

Alex K
  • 22,315
  • 19
  • 108
  • 236
  • Does this answer your question? [JasperReports: is it possible to use multiple data sources, or if not, to use collections in parameters?](https://stackoverflow.com/questions/2425807/jasperreports-is-it-possible-to-use-multiple-data-sources-or-if-not-to-use-co) & [Multiple queries in a single jasper document ](https://stackoverflow.com/q/7482412/876298) – Alex K Jan 24 '20 at 21:40

1 Answers1

0

Thats basically what subreports are for. You can create one JRXML-report which contains two child (sub)reports. Each subreport can have its own Query.

PS : The detail Band is rendered once per Resultset. So maybe it is enought to use this.

eckad158
  • 385
  • 6
  • 19
  • But in Main report I don't have any query to call. But all sub reports will take reference of main report data source and gives weird responses. like printing 1000 of records – Umesh B S Jan 24 '20 at 11:26
  • i my case no need to pass any parameter from main report to sub reports means no need to call any query. But for two sub reports happen to select the DB connection from main report then results will not appear as expected. – Umesh B S Jan 25 '20 at 18:16
  • Can anyone help on this ?. main report used for title only two subreport will call different and independent queries and should appear as one main report. – Umesh B S Jan 27 '20 at 15:30
  • i'd recommend you to upload the jrxml files plus maybe some sample table data, the problem is not very clear to me in general. maybe there is something wrong with your sql queries or the band alignment. – eckad158 Jan 29 '20 at 07:03