Answered by:
set textbox value to no data available if dataset1 is null

Question
-
I have a table that is populated using dataset1 in my report.
I added =iif(Count("Error1")=0,true, false) to the hidden expression to hide the table if there is no data...this works.
I will like to have a message displayed on a texbox like "no rows returned" and also hide another texbox if there are no data returned from the dataset.
ideas??Wednesday, March 10, 2010 11:54 PM
Answers
-
also there's a NoRows property you can enter a message in for a data region like a table which will then display when that dataset returns no rows
- Marked as answer by seunny Thursday, March 11, 2010 2:42 AM
Thursday, March 11, 2010 1:05 AM
All replies
-
for value , in expression
=iif(count("error1")=0, "No Data", fields!yourfield.value)Thursday, March 11, 2010 12:03 AM -
will this be in the hidden properties of the table? because that code didnt work for me.
- Proposed as answer by Parry2k Thursday, March 11, 2010 2:04 AM
Thursday, March 11, 2010 12:25 AM -
oh i gave you the sample, you have to change the field name as per your table.
it will be on the value property of the text box., does it make sense?Thursday, March 11, 2010 12:26 AM -
also there's a NoRows property you can enter a message in for a data region like a table which will then display when that dataset returns no rows
- Marked as answer by seunny Thursday, March 11, 2010 2:42 AM
Thursday, March 11, 2010 1:05 AM -
Thanks guys, after trying both, the message is still not being displayed.
@also there's a NoRows property you can enter a message in for a data region like a table which will then display when that dataset returns no rows
do i need another control to display the messge in the NoRowsMessage property?Thursday, March 11, 2010 1:19 AM -
ha...
@also there's a NoRows property you can enter a message in for a data region like a table which will then display when that dataset returns no rows
the reason was because the =iif(Count("Error1")=0,true, false) on the table hidden field was not removed. Once i removed it BAM it displayed my message. That solved the problem.
One more thing...is it possible to say iif(isNull(ds1),ReportItems!Textbox4.Hidden=True,Textbox4.Value)Thursday, March 11, 2010 1:24 AM -
Thanks guys, Nehemiah's solution works for meThursday, March 11, 2010 2:42 AM