john.v.little Posted August 28, 2014 Share Posted August 28, 2014 I created a new report called slice which is the sub report. In it I used the following SQL:select 1 as registrations, 2 as cashwhich returns this:registrations cash12I then removed all bands except detail, and dragged the two fields one above the other:$F(registrations)$F(cash)Now when I preview this sub report, I get:12Great.Now I create the mail report, and drag the sub report Element into the "Detail 1" section, and select the exisiting sub report "slice".However, when I preview this master report, I just get "Document is Empty", when it certainly should not be.what am I doing wrong? Link to comment Share on other sites More sharing options...
marianol Posted August 28, 2014 Share Posted August 28, 2014 Does the master report has a datasource (or data adapter) selected?Check this tutorial on Sub-Reports http://community.jaspersoft.com/wiki/subreports-jaspersoft-studio Link to comment Share on other sites More sharing options...
Solution john.v.little Posted August 29, 2014 Author Solution Share Posted August 29, 2014 The main report has a data source, but does not have any of its own queries, it only gets data from sub reports.The workaround to fix this bug is to create a dummy querey (I use "select 1"), then it works. Shame you cant have a main report which just has sub-reports. 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