Monday, March 19, 2012

How to create a No Records Found message

We have a report that we use to verify that two our systems are in
sync. The only time anyone needs to act on the report would be if
any
results were returned. I'm looking for a best practice that would
allow me to insert a "No Records Found" message if the results were
negative rather than simply just displaying a blank report.
Thanks,On Dec 5, 4:38 pm, mbailey256 <mbaileyst...@.yahoo.com> wrote:
> We have a report that we use to verify that two our systems are in
> sync. The only time anyone needs to act on the report would be if
> any
> results were returned. I'm looking for a best practice that would
> allow me to insert a "No Records Found" message if the results were
> negative rather than simply just displaying a blank report.
> Thanks,
As far as I can tell, only Charts and Subreport objects have a
"NoRows" Property that is used to display text when their associated
DataSets have no rows.
But, since a No Records Found is equivalent to having no rows of data,
you can explicitly try counting the rows. Try doing a TextBox at the
very top of your report with a Visible Expression of:
= ( Count( Fields!OneThatWeKnowIsNotNull.Value, "DataSet" ) = 0
When the Count is zero, the textbox is Visible, and anything in the
Text Expression will be seen.
-- Scott|||On Dec 5, 4:10 pm, Orne <polysilly...@.yahoo.com> wrote:
> On Dec 5, 4:38 pm, mbailey256 <mbaileyst...@.yahoo.com> wrote:
> > We have a report that we use to verify that two our systems are in
> > sync. The only time anyone needs to act on the report would be if
> > any
> > results were returned. I'm looking for a best practice that would
> > allow me to insert a "No Records Found" message if the results were
> > negative rather than simply just displaying a blank report.
> > Thanks,
> As far as I can tell, only Charts and Subreport objects have a
> "NoRows" Property that is used to display text when their associated
> DataSets have no rows.
> But, since a No Records Found is equivalent to having no rows of data,
> you can explicitly try counting the rows. Try doing a TextBox at the
> very top of your report with a Visible Expression of:
> = ( Count( Fields!OneThatWeKnowIsNotNull.Value, "DataSet" ) = 0
> When the Count is zero, the textbox is Visible, and anything in the
> Text Expression will be seen.
> -- Scott
Thanks Scott. I did find the NoRow property for the regular table,
but for my report with multiple tables, your solution fit perfectly!!!

No comments:

Post a Comment