Jump to content
Changes to the Jaspersoft community edition download ×

2005 IR Help

Recommended Posts

By: kler44 - kler44

no data

2004-12-03 02:58

Hi !

I would like to print a message on the report when there are now rows in the data source.

How is it possible to do that ?

 

 

 

 

By: kler44 - kler44

RE: no data

2004-12-03 05:30

It doesn't work, because I'm using my datasource in a subreport...

Is there a way to know if a datasource is empty ?

 

 

 

 

By: C-Box - c-box

RE: no data

2004-12-03 04:56

Try to put a textfield with your text within and as PrintWhenExpression:

 

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

 

and as EvaluationTime set "Report" ....

 

not tried .... just an idea! :-)

 

Post if it's working.

 

hth

C-Box

 

PS: I think it won't work if you're using some SubReports with other queries/tables/CustomDataSources. Then it gets more complicated.

 

 

 

 

By: C-Box - c-box

RE: no data

2004-12-03 07:52

Opps I see it should have been

 

 

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

 

but I guess you've seen the spelling mistake?!?!

 

Well I'm also using my own CustomDataSources for SubReports... so just put an IntegerValue to your extended CustomdataSource that you set while filling it. So it always holds the number of elements in your CustomDataSource and that attribute you could ask. So you call the getMethod for that attribute and use it for the printWhenExpression.

 

But that's just a hint... I also didn't test it.

 

hth

C-Box

Link to comment
Share on other sites

  • 4 years later...
  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Hi ,

If you want to print NO DATA FOUND or some text while no data there in report generated means ,

There is an option in the i- reports inspector  --  NO DATA .. right click on that and choose the option add band

then place an static text over there with the content what ever you like to display in that 

and then you have to change the property of the report .. it ll be like   when no data --- 4 optionds will be there in that choose NO DATA option , nothing more has to done and save the report and complie.

Now when you complie the report and when there is no record for that mean .. it will display the NODATA section of your report .

Regards,

Aru

Link to comment
Share on other sites

  • 1 year later...

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