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
report compile
-
- Posts: 7
- Joined: Tue Feb 10, 2009 7:47 am
- Location: Hyderabad, India
report compile
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.
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.
Code: Select all
try
{
report.Render(false);
}
catch {}
Console.WriteLine("Report Rendered: {0}", report.IsRendered);