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

How to get the exception inside the subreports to the main report?

6 Answers 115 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Michele
Top achievements
Rank 2
Michele asked on 07 Jan 2011, 09:41 AM
Hello,
I've got a report that contains 5 subreport...sometimes I get a object not set to an istance of an object excetpion in a subreport when generating the report using

       res = reportProcessor.RenderReport("PDF", report, null);

checking for res.Error returns me string.Empty always... I've debugged and if I put the Error event handler in the nested report I got the exception.... since I generate the report in parallel (almost 18.000 reports) I need to know which report failed in order to regenerate it later....

Is there a way of generating the report and the subreport in an sync way? I think that the report generate in an async way calling the subreport's report for increasing performance but in my case I can wait and have it to be generated slower but safer...

Thanks

6 Answers, 1 is accepted

Sort by
0
Michele
Top achievements
Rank 2
answered on 07 Jan 2011, 01:27 PM
I've found the exception I got and  it's this one :
StackTrace  "   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at Telerik.Reporting.Expressions.FunctionNode.Eval(Object row, Object context)
at Telerik.Reporting.Expressions.AggregateFunctionProxy.Accumulate(Object data, Object context)
at Telerik.Reporting.Processing.Data.DataMember.Accept(IDataObject data, Object expressionContext)
at Telerik.Reporting.Processing.Data.MemberExpression.Accept(DataMember parent, Int32 slot, IDataObject data)
at Telerik.Reporting.Processing.Data.MemberExpression.Accept(DataMember parent, Int32 slot, IDataObject data)
at Telerik.Reporting.Processing.Data.MemberExpression.Accept(DataMember parent, Int32 slot, IDataObject data)
at Telerik.Reporting.Processing.Data.MemberExpression.Accept(DataMember parent, Int32 slot, IDataObject data)
at Telerik.Reporting.Processing.Data.MemberExpression.Accept(DataMember parent, Int32 slot, IDataObject data)
at Telerik.Reporting.Processing.Data.ResultSet.Fill(IEnumerable`1 data)
at Telerik.Reporting.Processing.Data.ObjectQueryProvider.Execute(MultidimensionalQuery query)
at Telerik.Reporting.Processing.Report.ProcessItem()
at Telerik.Reporting.Processing.ReportItemBase.Process(DataMember data)"    string

This happens randomly when generating reports in parallel.... Telerik can you please ensure me your DLL's are thread-safe?
Thanks

Paolo
0
Milen | Product Manager @DX
Telerik team
answered on 13 Jan 2011, 07:09 PM
Hello Paolo,

First I want to apologize for the late response.

The issue that subreport errors do not bubble up to the master report is already addressed in another of your tickets.

Subreports are not rendered in separate thread. The multi threading occurs from the way that web sites work.

The stack trace you have attached helped us identify the incorrect behavior you are facing and also will be addressed in the future releases.

Thank you.

All the best,
Milen
the Telerik team
Get started with Telerik Reporting with numerous videos and detailed documentation.
0
Michele
Top achievements
Rank 2
answered on 14 Jan 2011, 08:26 AM
Hello Milen,
so the problem I reported here is not bound to the fact that the report doesn't catch the subreport's error? am I right? when a future release will be addressed?
Thanks
0
Steve
Telerik team
answered on 17 Jan 2011, 06:29 PM
Hi Paolo,

Both problems (bubbling the subreport errors to master report and the exception when generating reports in parallel) would be addressed for subsequent version of the product. We cannot provide a timeframe at this point as we would need to research on the issue first.

Kind regards,
Steve
the Telerik team
Get started with Telerik Reporting with numerous videos and detailed documentation.
0
Michele
Top achievements
Rank 2
answered on 25 Jan 2011, 10:20 PM
Hello,
have this iussue been addressed with the last internal build?
Thanks
0
Steve
Telerik team
answered on 28 Jan 2011, 05:52 PM
Hello Paolo,

The release notes for the internal build are available here. Only the second problem you mention has been addressed at this time, namely: Fixed: An error occurs when evaluating expressions in multi-threading environment.

Best wishes,
Steve
the Telerik team
Get started with Telerik Reporting with numerous videos and detailed documentation.
Tags
General Discussions
Asked by
Michele
Top achievements
Rank 2
Answers by
Michele
Top achievements
Rank 2
Milen | Product Manager @DX
Telerik team
Steve
Telerik team
Share this question
or