Jump to content
Changes to the Jaspersoft community edition download ×

whenNoDataType='NoPages': still blank pages


2005 IR Help

Recommended Posts

By: KHollister - khollister

whenNoDataType='NoPages': still blank pages

2004-10-06 12:17

Hi,

 

I have several reports where I have whenNoDataType='NoPages', however, I am still getting blank pages, even when I have no data.

 

I was under the impression that when I call JasperRunManager.runReportToPdfFile(), it will not produce a file if there is no data. Am I incorrect?

 

Thanks,

 

Ken Hollister

 

 

 

 

By: ani - vijani

RE: whenNoDataType='NoPages': still blank pages

2004-10-06 18:40

What is assuming seems to be not correct. Even i used to get pdf opened when there were no pages. the best solution what i found was to use following code and redirect to your standard no report page.

 

JasperPrint _prnt = JasperManager.fillReport( _rep, params, conn);

 

//check for pages here.--no pages helps here.

if(_prnt.getPages().size()==0){

//redirect to std page

}

 

 

 

 

 

By: KHollister - khollister

RE: whenNoDataType='NoPages': still blank pages

2004-10-06 19:07

Thank you. I certainly appreciate the help!

 

 

Ken

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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