subreport resource

By: ibisabel - ibisabel
subreport resource
2006-06-13 13:30
hey - I just started using JasperServer 0.92
and I'm attempting to add a sub-report as a resource to a report, but I don't see where or how to do it. The users guide specifies that there should be a prompt when creating a new report unit, but I've not seen such an option.
can someone plese let me know how to do this?
-thx


By: T Kavanagh - tkavanagh
RE: subreport resource
2006-06-13 15:40
Hi,

The main jasperreport (jrxml) needs to specify the sub-report which is also, of course, a jasperreport (jrxml).

The User Guide has a section that walks through the creation of a "simple report unit". The next section walks through the creation of a "complex report unit". This one uses the sample jasperreport SalesByMonth. This jasperreport uses a sub-report SalesByMonthDetail.

When creating the new report unit in JasperServer, after loading the "main jasperreport" (via file browse) the user is prompted to enter the resources that are immediately known to be needed. So, you should get prompted for any sub-reports that the main report needs.

You would load the sub-report via clicking the "Add Now" link to the right of the listed sub-report resource (you will get prompted with a file system browse dialog).

Take a look at the user guide section "create a complex report unit" and also take a look at the actual jrxml for the SaleByMonth report (and how it defines the sub-report).

Also, let me know if you still have trouble.

-Tony


By: ibisabel - ibisabel
RE: subreport resource
2006-06-14 14:41
Thanks Tony. I got it to work.

I ended up looking at the JRXML for the SalesByMonth as you suggested and noticed that the subreport parameter expression used "repo:SalesByMonthDetail". Once I changed my report to use the "repo:" denoter in iReport the JasperServer subreport prompt appeared.
ktrinad's picture
1157
Joined: Aug 9 2006 - 2:36am
Last seen: 17 years 1 month ago

0 Answers:

No answers yet
Feedback