Check for DataSource before sub report load
Posted on 2004-09-21
I am trying to build a report that has multiple subreports. The datasource for the sub reports is a series of CSV files (using an odbc connection). The csv files are created by a third party program that performs exports to csv. If the export is run by the users and there is no data it creates an empty csv file. That file is then read by Crystal Reports (8.5) and the sub report fails. The sub reports called after it also fail. I am wondering if there is a way in Crystal Reports to create a check for the datasource before the sub report loads. It would be ideal if I could check and if the data source does not exist cancel the load of that subreport, thus allowing a load of the next subreport.
Is this possible in Crystal reports? I have seen the Alert feature, but I am not sure how to check for the health of the data source.
Any help you could give would be much appreciated.