Jump to content
We've recently updated our Privacy Statement, available here ×

How to create subrepot in Jaspersoft Studio


panlj2004

Recommended Posts

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. 

main(2).PNG.ac718329840d4e85371bd70c5b07eacd.PNG

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:

subreport(1).PNG.6654af3981102ee1ddff70d7c973dd78.PNG

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

main(3).PNG.678153c9a9c7ee2d13c211962e1ded45.PNG

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

 

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

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.

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