How to create subrepot in Jaspersoft Studio

Hello all,

I need you help for subreport problem in TIBCO Jaspersoft Studio-6.1.0.final.

I need a report include a pie char and a bar char with different data source, so bast way is supreport, but no related information can be found in network,many cases was ireport, wasn’t jaspersoft studio, although the two software are similar, but still some parameters let me feel dizzy .

I made a main report with a paramete f_agent (class : java.lang.String) and added it into SQL query. 

I added an exist report (Blank_A4_2.jasper) into the main report as subreport, in connection step, I chose “Don’t use any connection or Date Source”, then clicked “Finish”

some settings for the subreport as below:

In sub report, I had same paramete f_agent (class : java.lang.String).

Currently, I can double click the subreport from main report, the preview is ok. 

But preview the main report, only main report displayed, not subreport ( the subreport is not without data ).

I think the problem is the link failed between main report and sub report, but I don’t know how to define it. 

Anyone can tell me the detail step for the settings. or tell me the URL if same problem appeared.

Thank you in advance.

Kelly Pan

 

panlj2004's picture
385
Joined: Jul 20 2015 - 12:17am
Last seen: 7 years 9 months ago

3 Answers:

You should pass the main report parameter to subreport. You have defined the parameters on main report and subreport, but you have not map the main parametert o subreport parameter.

Select the subreport and go to properties. In subreport section, go to "Parameters". Map the parameters and run the report.

zh3ntil's picture
3297
Joined: Nov 19 2014 - 11:02pm
Last seen: 6 years 10 months ago

pass parameter in subreport'properties,,,,,,,,,,,,, that r  same in both report,,,,,,,

Tarun Gupta's picture
Joined: Jun 17 2015 - 4:11am
Last seen: 7 years 5 months ago

Did you try using Dataset instead of subreports? it's possible for each chart to have their own dataset.

http://community.jaspersoft.com/documentation/tibco-jaspersoft-studio-us...

hozawa's picture
176469
Joined: Apr 24 2010 - 4:31pm
Last seen: 3 years 11 months ago
Feedback