When "Databand" empty - Display "No Records Found" Message.
Posted: Tue Jul 23, 2013 3:34 pm
Dear Members,
I have come across an issue while generating the report.
ISSUE:
I have placed a textbox over the Databand control.Here, i need to display the textbox with message "No Records Found" when DataSource returns no records to the Data band control.
I have done the following steps to achieve it.
step1: Under textbox properties, i have changed "Process at" = EndOfReport.
step2: Under Report properties-> EndRender event (i have implemented the following code)
By doing the above steps, textbox is visible in both scenerio(no matter of DataBand whether it is empty or not)
Later by referring the explanation as given in the link(http://forum.stimulsoft.com/viewtopic.php?f=8&t=35996) i have modified the code as
But nothing seems to be worked. Here i request you please put me in the right direction to solve the issue.
I have come across an issue while generating the report.
ISSUE:
I have placed a textbox over the Databand control.Here, i need to display the textbox with message "No Records Found" when DataSource returns no records to the Data band control.
I have done the following steps to achieve it.
step1: Under textbox properties, i have changed "Process at" = EndOfReport.
step2: Under Report properties-> EndRender event (i have implemented the following code)
Code: Select all
if(Totals.Count(DataBand1)>0)
{
TextMessage.Enabled=false;
}
else
{
TextMessage.Enabled=true;
}
Later by referring the explanation as given in the link(http://forum.stimulsoft.com/viewtopic.php?f=8&t=35996) i have modified the code as
Code: Select all
if(Count(DataBand1)>0)
{
TextMessage.Enabled=false;
}
else
{
TextMessage.Enabled=true;
}