I am running a report using .Net/C#/Crystal Decisions. The report is loaded, assigned parameters, and either printed or exported entirely in code. I need to find a way to check the Record Count of the Data Set returned by the view at runtime to determine whether or not to skip printing/exporting of the report. I am using ReportDocument to handle the execution of this report. I have looked as deep into ReportDefinition and other parameters as I can find documentation for.
Does anyone know how to access this number at runtime? If not, do you have any ideas for other methods of determining if the report will be blank? I've considered opening the DataDefinition and extracting the selection criteria used by the report but this will be very heavy on execution as it will require 2 large hits to the database should data exist. I've also looked at taking this first initial query and passing it back to the report as the dataset if data exists, but this doesn't sound like it will run well for me.
This is my first question posted at EE so I'm giving all my intial 125 points for the answer. Please be kind with your responses. I hope to be able to pay more after I earn some more points in the future.