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

To print an error message


nikitha

Recommended Posts

Hi All,

I have a requirement to display an error message in a template designed using Ireport 2.0v.

I have created a template and also displaying the data from database successfully by passing some parameters to report query.

My issue is, when i passs some wrong data to report( wrong parameters) to report, by default it is displaying an empty page with out any data.

if we pass correct parameters, the report is getting the output with results.

But, i need to disply a message to user i.e,

No Records to Display.

Is this possible using ireport.

Please help me

Regards,

Naveen

 

 

 

 

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

There are a few different way to do this. Newer version have a no data section. For v2.0 do the following

1. In one of your unused bands expect for the deatil band. Place a field with the text that you want to display.

2. In the bands print when expression

new Boolean($V{REPORT_COUNT}.intValue()==0)

3. In Edit -> Report Properties -> More tab

Set "When no data" to "All sections, no details".

 

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