Jump to content
JasperReports Library 7.0 is now available ×

Subreport disappear


2004 IR Help

Recommended Posts

By: bug123 - bug123

Subreport disappear

2004-07-13 01:33

I have create a subreport. Main report passes $P{REPORT_PARAMETERS_MAP} and $P{REPORT_DATA_SOURCE} to the subreport.

And I just print some static text in the subreport for testing. But, nothing can be seen. Can anyone help me? Thanks.

 

 

 

 

By: bug123 - bug123

RE: Subreport disappear

2004-07-13 18:02

The main report can locate the subreport. But I don't know why the subreport disappear. Can anyone help me? Thanks.

 

 

 

 

By: bug123 - bug123

RE: Subreport disappear

2004-07-13 19:56

I can load the subreport right and print the static text now. But no record is printed. I am using $P{REPORT_DATA_SOURCE} as the datasource expression in the subreport section of main report. Am I right? Thanks.

 

 

 

 

By: C-Box - c-box

RE: Subreport disappear

2004-07-13 23:52

Well I guess NO...

 

if you want to show some data by a SubReport you will need to use an extra DataSource or an extra Query that returns your recordsset at runtime...

 

If you use direct database connection, than you can use the report connection and a query that get some records concerning your current masterreport record (e.g. Master-Detail scenario for country and cities)

 

If you use custom datasource, then you will have to pass it as datasource-expression to the SubReport. But it should NOT be the same like in MasterReport... because an internal counter will consume all records and you won't get a result you expected.

 

So put your data into an extra CustomDataSource (e.g. "DSSR1") and pass it as parameter to the masterreport when filling.

In datasourceexpression you can use "$P{DSSR1}" and that's it.

 

hth

C-Box

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

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