This is a migrated thread and some comments may be shown as answers.

Unable to catch error with ReportProcessor

2 Answers 151 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Michele
Top achievements
Rank 2
Michele asked on 12 Jan 2011, 09:38 AM
Hello,
I use a reportProcessor to generate PDF directly from a report, I'm unable to catch the exception that are thrown inside the subreports
I always get

RenderingResult res =reportProcessor.RenderReport("PDF", report, null);
bool hasError = res.HasErrors <- false

What I've been able to do till now is :

public xxx()
        {
            InitializeComponent();
            reportFactory = new ReportFactory();
            this.NeedDataSource += new EventHandler(xxx_NeedDataSource);
            this.subReport1.ReportSource.Error += new Telerik.Reporting.ErrorEventHandler(ReportSource_Error);
        }
 
        private void ReportSource_Error(object sender, Telerik.Reporting.ErrorEventArgs eventArgs)
        {
             
         //how do I propagate the error here to the reportrender?
             
        }

Thanks in advance
Paolo

2 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 14 Jan 2011, 05:59 PM
Hello Paolo,

We reproduced the behavior as you describe it and it seems more logically the error to bubble up to the master report. We've logged that in our TODO list and will implement it as soon as possible.

Regards,
Steve
the Telerik team
Get started with Telerik Reporting with numerous videos and detailed documentation.
0
Beau Button
Top achievements
Rank 1
answered on 17 Feb 2011, 08:24 PM
Do you all have a work around until this is fixed? i.e. a method to attach to the error event for sub-reports?
Tags
General Discussions
Asked by
Michele
Top achievements
Rank 2
Answers by
Steve
Telerik team
Beau Button
Top achievements
Rank 1
Share this question
or