bogdan Posted October 24, 2006 Share Posted October 24, 2006 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 More sharing options...
rsilverns.sympatico.ca Posted October 24, 2006 Share Posted October 24, 2006 What is the condition of the subreport and sub-subreport for "When No Data Print"? Could this be hiding one or more reports? Post edited by: rsilver@bfm.bm, at: 2006/10/24 14:32 Link to comment Share on other sites More sharing options...
bogdan Posted October 24, 2006 Author Share Posted October 24, 2006 There is no condition. Link to comment Share on other sites More sharing options...
rsilverns.sympatico.ca Posted October 24, 2006 Share Posted October 24, 2006 There has to be a condition, it will be either... - Blank Page - All Sections No Detail - No Pages Link to comment Share on other sites More sharing options...
bogdan Posted October 25, 2006 Author Share Posted October 25, 2006 I can't find it. You mentioned 3 cases. Can you tell me how to solve each ? Maybe I find a way :) Thanks Link to comment Share on other sites More sharing options...
rsilverns.sympatico.ca Posted October 25, 2006 Share Posted October 25, 2006 If you open up each sub-report in iReport it should list it under report properties. Each report should have the expression set to "All Sections No Detail" which means that the headers/footers/title etc. will be printed even if no records are passed to the subreport. Link to comment Share on other sites More sharing options...
bogdan Posted October 25, 2006 Author Share Posted October 25, 2006 Okay, I found it :)It said 'No Pages' I'll set it to AllSectionsNoDetail, but the text I wanted to display was in the Detail Section. I'll just move it around see what happends and post back :) 10x Link to comment Share on other sites More sharing options...
bogdan Posted October 25, 2006 Author Share Posted October 25, 2006 Okay.. I've tested it .. I moved from the second subreport the text in the title section but still it doesn't display the second subreport. :(( Link to comment Share on other sites More sharing options...
jisidro Posted October 26, 2006 Share Posted October 26, 2006 Hi! I have the same problem whith subreports... I don't know what about jasperReports, but in other report sistems, like Crystal Reports, subreports inside subreports are not suported. Bye! Jordi Link to comment Share on other sites More sharing options...
rsilverns.sympatico.ca Posted October 26, 2006 Share Posted October 26, 2006 Did you check that sub-report as well for the option to be properly set? Link to comment Share on other sites More sharing options...
C-Box Posted October 26, 2006 Share Posted October 26, 2006 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). regardsC-Box Link to comment Share on other sites More sharing options...
bogdan Posted October 26, 2006 Author Share Posted October 26, 2006 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 More sharing options...
rsilverns.sympatico.ca Posted October 27, 2006 Share Posted October 27, 2006 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 More sharing options...
bogdan Posted October 27, 2006 Author Share Posted October 27, 2006 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 More sharing options...
rsilverns.sympatico.ca Posted October 27, 2006 Share Posted October 27, 2006 When a jasperreport does not have any records to display it does one of 3 things, does not print anything, prints blank page, or prints all sections but ignores the detail band. Link to comment Share on other sites More sharing options...
bogdan Posted October 30, 2006 Author Share Posted October 30, 2006 By no Records, do you mean records like from a database/datasource ? Link to comment Share on other sites More sharing options...
rsilverns.sympatico.ca Posted October 30, 2006 Share Posted October 30, 2006 Yes... no records in your datasource. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now