2005 IR Help Posted September 2, 2006 Share Posted September 2, 2006 By: cyberal82 - cyberal82 Number of lines returned by an select request 2005-06-29 05:29 hi all, how to know the number of lines returned by the select request for a report ? (an equivalent of php function mysql_num_rows) I want to display un static text "No recording" when the select request of the report does not retourn anything. thanks for help By: eileene_c - eileene_c RE: Number of lines returned by an select request 2005-06-30 00:14 You could use the pre-defined variable: REPORT_COUNT You could set the Print When Expression of a band to: new Boolean($V{REPORT_COUNT}.intValue()==0) to display "No record" By: cyberal82 - cyberal82 RE: Number of lines returned by an select req 2005-06-30 01:47 thanks for answer but that doesn't work. When I create a report to test that, if the query return 0 line, the document has no page. ++ By: C-Box - c-box RE: Number of lines returned by an select req 2005-06-30 06:02 You must set the attribute "WhenNoData" at the reportProperties to "AllSectionsNoDetail" or "Blank Page" instead of "NoPages" than you can use custom staticTextField with printWhenExpression like eileene_c suggested. hth C-Box By: cyberal82 - cyberal82 RE: Number of lines returned by an select req 2005-06-30 07:47 thanks c-box but that doesn't work. I set the attribute "WhenNoData" in the reportProperties to "AllSectionsNoDetail" and I have to create a staticTextField in page header with printWhenExpression : new Boolean($V{REPORT_COUNT}.intValue()==0) and No record is always displayed (when there are rows selected and when there aren't rows selected) :( If I put my staticTExField in detail band it is not visible when there are no row selected and if I set the attribute "WhenNoData" at the reportProperties to "Blank Page", the page is always blank when there are no row selected by the query thanks for help. 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