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;
}