Jump to content
Changes to the Jaspersoft community edition download ×

Help! cant get hello world sub reports to work - always get "Document is empty"


john.v.little
Go to solution Solved by john.v.little,

Recommended Posts

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 cash

which returns this:

registrations cash
12

I 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:

1

2

Great.

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

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • Solution

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

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