Page 1 of 1

Exceptions

Posted: Mon Feb 26, 2007 10:34 pm
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

Exceptions

Posted: Tue Feb 27, 2007 2:48 am
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.