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

how to display message if the report is empty


2005 IR Help

Recommended Posts

By: Vishy - vishyn

how to display message if the report is empty

2004-05-07 08:15

Hi,

 

How can I just display a message " No records matching such report criteria" if the report is empty.

 

As jasper report expects a datacollection and if that collection is empty, I just wanna display a String. I tried several ways, checking for Boolean Value of Collection etc but the closest I could come was display the labels with field values as null.

 

I just want to print one message " No records to match"

 

Thanks

Vishy

 

 

 

 

By: stoichkov - stoichkov

RE: how to display message if the report is e

2004-11-12 02:07

Hi everyone, this is my first post and just to say I have a similar problem.

 

I have a select what always return 3 registers, but usually 1 or 2 of them have one of their columns at null, then I wouldn't like to print them, or print a determinated string.

 

I use JasperAssistant, althoug this question, I suppose, it's more directly related to JasperReports.

 

Thanks in advance

 

 

 

 

By: Plamen - plpetrov

RE: how to display message if the report is empty

2004-11-12 04:22

Hi,

 

I use the next expression for "printWhenExpression" attribute: new Boolean($F{Name}!=null), it works to me. There is also an attribute named "isRemoveLineWhenBlank", but setting it to true doesn't affect the report when the value is null.

 

Regards,

Plamen

 

 

 

 

 

By: stoichkov - stoichkov

RE: how to display message if the report is e

2004-11-12 07:27

Thanks a lot, it works!

 

There's any option to print a determinated string if is null, instead of no print it?

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