Jump to content
We've recently updated our Privacy Statement, available here ×

Subreport in subreport


bogdan

Recommended Posts

Hello,

 

I have a problem.

I have a master report that contains a subreport (or more than 1). And the subreports contained in the master reports also have subreports of their own.

 

My problem is, I can't see what in the 2nd subreport.

So I see the master report, i see the .. let's call them .. first level subreports, but I can't see the others.

 

For testing, I only used one sub-subreport.

 

So I can view the master report and the first level subreport. The subreport within the first level subreport only has a static text field where it says 'text'.

 

Any ideas ?

 

Thanks in advance

Link to comment
Share on other sites

  • Replies 16
  • Created
  • Last Reply

Top Posters In This Topic

Hi,

 

first: nested SubReports are working fine with Jasper! B)

 

So you must be careful with the datasources you pass. If you have rewindable datasources and reuse the same datasources within several (nested) subreports you should clone them (so I do) or remember the current pos (if custom datasources are used)

 

Also be careful with the position type (standard = FixRelativeToTop) it should be "float" instead, that the subreports don't overlap each other.

 

At last, you should abstract your report from datasources and just try with static texts and parameters to get it working and then use your datasources again. (helps sometimes, to find the error).

 

regards

C-Box

Link to comment
Share on other sites

Hei,

 

so... to recap.. I have a Masterreport that uses database connection.

I have one subreport in the masterreport that uses a connection because it's select depends on the parameter it gets from the master report.

in this subreport i have another subreport that only has static text(for testing purposes only!!)

 

the masterreport and the subreport show up just fine.

the subreport that contains the static text doesn't show up at all.

 

this is my problem

 

also, what does it mean when one has ! in a parameter like $P!{nameOfParam}

 

10x

Link to comment
Share on other sites

And you have confirmed that the 2nd sub-report .. the sub-sub report has "All Sections No Detail" option set. Could it be that the 1st sub-report has no records being retrieved from the database so it is printing its all sections no detail option and the 2nd sub-report is in the detail band?

 

The $P!{nameOfParam} is used when creating parameterized query strings. It is analagous to using the ? notation in your SQL query as far as I know. Am a bit fuzzy on the distinction between $P{} and $P!{} in querySTrings myself ;).

 

HTH,

Robin

Link to comment
Share on other sites

I think I found the problem.

 

So.. in my subreport I had the subreport in the detail section.

In the subsub report I had a title and smtg in the detail section (with no connection/data sources and AllSectionsNoDetail set).

 

When I run like this.. the subsub report doesn't display.

 

When i moved the subsubreport in the subreport from the detail section to the title section it worked (I mean it displayed the title).

 

Why didn't it work before? Must it have a DataSource/Connection in order to display the Detail section ?

 

10x

Link to comment
Share on other sites

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