report compile

Stimulsoft Reports.NET discussion
Post Reply
srini_morapaka
Posts: 7
Joined: Tue Feb 10, 2009 7:47 am
Location: Hyderabad, India

report compile

Post by srini_morapaka »

Hai,

I am designing a report and storing the report template in sql express database.
After designing and compiling the report, i want to store the report template in the database, if the report does not have any errors.
If the report has any errors, i should not allow the report to be saved.

how do i find whether the report has any errors.

thanks in advance
Srinivas
Brendan
Posts: 309
Joined: Sun Jul 16, 2006 12:42 pm
Location: Ireland

report compile

Post by Brendan »

You could wrap the Render() method in a try/catch block to supress any exceptions and then check the report.IsRendered property for true or false.

Code: Select all

try
{
    report.Render(false);
}
catch {}

Console.WriteLine("Report Rendered: {0}", report.IsRendered);
If report.IsRendered is true then it should be ok. As far as I know, if there's an error in the report it will throw an exception during the render process.
Post Reply