As detect whether a report has information
As detect whether a report has information
I need to detect whether the report brings information, in order not to show blank sheet
Thanks
Patricio
As detect whether a report has information
Hello Patricio,
You can use following code:
Thank you.
You can use following code:
Code: Select all
report.Render();
bool reportIsEmpty = report.RenderedPages.Count == 1 && report.RenderedPages[0].Components.Count == 0;
if (!reportIsEmpty)report.Show();
As detect whether a report has information
Hello Vital.
It does not work if there objects texts in the report.
The Report.RenderedPages[0].Components.Count returns greater than zero
I'm interested detect whether datasource returns data
Thank you.
It does not work if there objects texts in the report.
The Report.RenderedPages[0].Components.Count returns greater than zero
I'm interested detect whether datasource returns data
Thank you.
As detect whether a report has information
Please use DataSource.Count property for analysis of the records count in the DataSource.
Thank you.
Thank you.
As detect whether a report has information
Sorry my English is not good, I will try again to explain my query
The report.Datasource.count, only indicates amount DataSource in the report. What we need is whether after report.render, the DataSource of the report returned information
Thank you.
The report.Datasource.count, only indicates amount DataSource in the report. What we need is whether after report.render, the DataSource of the report returned information
Thank you.
As detect whether a report has information
Sorry for unclear answer. Let's suppose that Categories is one of the DataSources from the report's Dictionary.
I meant to use the expression:
{Categories.Count}
instead of
{report.DataSources.Count}
First expression means amount of records in Categories DataSource, second expression means a quantity of DataSources in the Dictionary of the report.
Thank you.
I meant to use the expression:
{Categories.Count}
instead of
{report.DataSources.Count}
First expression means amount of records in Categories DataSource, second expression means a quantity of DataSources in the Dictionary of the report.
Thank you.
As detect whether a report has information
Thank you.
I have already solved
Patricio
I have already solved
Patricio
As detect whether a report has information
Please let us know if any help is required.
Thank you.
Thank you.