sub reports flat don't work for me
Posted on December 4, 2008 at 10:21am
I'm very frustrated with ireport. I can't get a subreport to work in any way, shape or form.
I have tried the simplest of all sub reports and still no go. Can someone post a simple, simple version of a subreport that I can try?
What I'd like to do is have it in my pageHeader band.
Maybe I just need to reinstall iReport.
Has anyone else had such a baffling problem?
Posted on December 4, 2008 at 10:40am
An update. It appears that the problem is only when running in iReport. In other words if I run the report from a java program the subreports will show up.
Makes it hard to use iReport as a developmenet tool. :(
Posted on December 4, 2008 at 6:27pm
Do you have the reports that can be uploaded here, I'll try it in mine to see if I can see anything. Someone here is probably better able to discuss whether / what data is available in when the header of a report is processed/filled with data. I'm guessing that your query isn't processing in the manner/order you think it is. I generally use subreports (mine are filled with data dependent upon 'current' data in the parent report though) in the detail and summary sections.
Posted on December 5, 2008 at 8:57am
Thanks, but I *think* I figured it out. The problem involved database connections. Seems that even if your all text header doesn't need the database, you better put a query in sub query or nothing will show up (or use the no data band). I just put in a 'select * from dual' and it seems to work.
Thanks for offering to help! It's much appreciated.
Posted on December 9, 2008 at 8:22am
Ah, yes. I Have many a report (even though they are 'containers' for subReports - they need no data as a source) that have SELECT 1 AS temp (that way nothing has to travel to/from the database server for naught) as datasource :)