Jump to content
JasperReports Library 7.0 is now available ×

bdaetgibson
Go to solution Solved by bdaetgibson,

Recommended Posts

Hi Guys,

I am new to iReport. 

I currently have a report that works. I have a sql query and a Sybase Database connection, I am using one paramter, I know of which will return a result set form my query.

I want this report to now act asa sub-report. So dag and drop in the subreport object into the Detail band. Use the wizard to specify the report i want to use, I specify 'use the same  connection used to fill the master report', I also have made a paramter identicle the one i have in the subreport and pair the expression to the parameter name, then finally specify to use "$P(SUBREPORT_DIR) + reportname" durign the subreport exp step as I want to then move it to JasperServer.

OK,so now I have the subreport object is in the detail band.

So i click preview to run the master report, It asks me for the parameter (which - I hope have specified to be passed to the subreport)

BAM "The document has no pages"


Thanks for any helpful advise.
ps. I do notice there is an XML backing to all of this but, if you do post anything related to XML, I am most likely to not understand what you want me to do unless you are very clear :)

Thanks Again,
Blake

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Click on the subreport element and be sure that:

 

1.) The subreport expression is pointing to the correct place

2.) The connection type is "Use a connection expression"

3.) That the connection expression is set to ${REPORT_CONNECTION}

 

Also be aware that you will need to use the 'repo:/path/to/report' syntax once you deploy them to the server.

 

-Kris

Link to comment
Share on other sites

Hey Blake,

 

I am sure you must ensured that the Main-Report SQL returns some kind of result-set else if it doesn't, the detail band will be empty, hence nothing would be printed including the sub-report.

 

If the Sub-report paramters do not accept any values from the Main Report-SQL dataset, you might want to move the sub-report to the Summary band.

 

Either ways, do make sure that your Main-Report SQL does return some kind of dataset.

 

Let me know if this works.

 

-Jatin

 

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