2005 IR Help Posted August 27, 2006 Share Posted August 27, 2006 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 More sharing options...
venkateshm Posted April 20, 2011 Share Posted April 20, 2011 Code:I tried with this its not working, please some help on this Link to comment Share on other sites More sharing options...
venkateshm Posted April 20, 2011 Share Posted April 20, 2011 i implemented it in another way, i took a parameter and i had sent blank string when data available and i had sent some text if data not present .its working fine Link to comment Share on other sites More sharing options...
arumugam Posted April 20, 2011 Share Posted April 20, 2011 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 bandthen 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 More sharing options...
icucmail Posted February 5, 2013 Share Posted February 5, 2013 This is working and thanks for sharing. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now