Skip to Content
0
Sep 20, 2016 at 08:02 PM

Detecting records in subreport

51 Views

Using SAP Crystal runtime for .NET 13.0.17.

We have been unsuccessful in being able to detect whether or not a subreport is returning records on a consistent basis. The scenarios are:

  1. Report consisting of only subreports and no main report
  2. Report consisting of both main and subreports
  3. Reports with and without parameters

We have seen the discussions and , but are not able to properly use the SDK to determine whether a report containing subreports is empty or not.

We have used both the subReport.HasRecords and subReport.Rows.Count properties, but none seem to work consistently. Is there a foolproof method to determine this for all the above scenarios?

The problem does not seem to occur with main reports, using reportDocument.Rows.Count.

Any assistance would be appreciated.