I am having troubles trying to retrieve all the exception messages from C# API ReportDocument.ExportToDisk.
Under certain conditions Stored Procedure which is the source of the data for the report throws an exception (MSSQL RAISERROR). When running from Crystal Reports 2008 application several messages are popping up in the following order:
1. Failed to retrieve data from the database.
2. Failed to retrieve data from the database.
3. Database Connector Error: '42000: [Microsoft][ODBC Driver 11 for SQL Server][SQL Server] [TEXT OF THE EXCEPTION FROM STORED PROCEDURE]'
But when running form C# API by calling ReportDocument.ExportToDisk exception is thrown only for the first message (Failed to retrieve data from the database.) and execution stops. Inner exception of this exception does not contain any additional information.
What I need is to get the text of the message from Stored Procedure which is the 3rd message when running from Crystal Report 2008 application.
Crystal Runtime 18.104.22.1682.(2008)
Any advise on the topic is really appreciated.