Exceptions

Stimulsoft Reports.NET discussion
Post Reply
Sandy Pham
Posts: 62
Joined: Mon Dec 11, 2006 1:43 pm
Location: U.S.A.

Exceptions

Post by Sandy Pham »

If my report fails when it is run, I get a huge exception message with all of the compiler errors in it. Is there any way that I can just get the first compile error because that is most likely what the problem is. I want to display an error dialog to my user that doesn't look so intimidating.

Thanks,

Sandy
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

Exceptions

Post by Vital »

You can use following code:

Code: Select all

report.Compile();
if (report.CompilerResults 1= null && report.CompilerResults.Errors.Count > 0)
MessageBox.Show(report.CompilerResults.Errors[0].ErrorText);
Thank you.
Post Reply