| Invert |
Bernd Truckses
11/05/2009 08:37
Exception in designer when previewing with non-existing Master report
Hello,
in the designer i have an unhandled exception when I define a nonexisting MasterReport like "hrxlfrxl".
This bug can be reproduced in the samples center or the SimpleList example
How to reproduce:
1) open sample project "SimpleList", compile and run
2) click on "Design" - Button
3) in the Document properties, type in "hrxlfrxl" for MasterReport
4) click on Preview-Button
=> InvalidOperationException "MasterReport is null"
In principle this is OK, because the MasterReport actually is null, but I have no chance to catch that Exception anywhere.
Debuging it down (we've got a sourcecode license...) I've found this:
1) in RenderingEngine.cs -> InternalRenderDocument() the method
site.HandleRenderingException( exc ) will be called
2) in ReportSlotRenderSite.cs -> HandleRenderingException() the method
reportSlot.OnRenderingError( args ) will be called
3) we finally land in ReportSlot.cs -> OnRenderingError()
BUT the RenderingError - event is null alhtough I've subscribed to it before (modified the project and subscribed in Form1_Load()...)
So I never land in my own error handling routine.
Could you please help me out
Best regards,
Bernd
|
Dmitry Zhukov
11/06/2009 02:43
Exception in designer when previewing with non-existing Master report
Hello,
In order to catch the exceptions appearing during report generation, you can subscribe to RenderingError ? ReportSlot event. Or you can create your class which implements IrenderSite interface, or use EmptyRenderSite, ReportSlotRenderSite classes. You can subscribe to the events related with bugs handling of the class which implements IRenderSite interface. It’s necessary to pass this class to RenderDocument function.
Best regards,
Dmitry Zhukov
Perpetuum Software Support Team
|
Bernd Truckses
11/06/2009 05:08
Exception in designer when previewing with non-existing Master report
Hello,
1) I've already subscribed to RenderingError as I wrote in my first post just above the "best regards". Be sure that this was the first thing I've tried.
It does not work, because in ReportSlot.OnRenderingError() the event is null - although I've assigned it before. That's why I've posted the issue in this forum!
2) This bug can be reproduced in your sample projects, so it's not an exotic missuse of the ReportDesigner but a general error.
3) Writing my own RenderSite to work around a general bug which is deeply nested in the component (we've paid) for is not an option.
As I've wrote in my first post, the error occures inside the designer form when clicking on the preview button of the designer.
This means: nested somewhere deep inside the designer component something is rendered. Where and How should I inject my self-written IRenderSite class there? Where is this documented at all?
To be exact: in the class ReportDesigner.cs there is the private method Preview() which calls slot.Prepare(). So how should I pass my own IRenderSite to that without rewriting the Designer?
And how should someone supposed to do that without sourcecode licence?
best regards,
Bernd
|
Dmitry Zhukov
11/09/2009 03:25
Exception in designer when previewing with non-existing Master report
Here is the example. Everything works correctly.
http://www.perpetuumsoftware.com/support/RSS/SampleHandleException.zip
You can change actions of designer form implemented while pressing preview button. In order to do this you should subscribe to Executing event and implement your behaviour in event hadler.
designerForm.Designer.Actions["Preview"].Executing += new EventHandler(Preview_Executing);
Best regards,
Dmitry Zhukov
Perpetuum Software Support Team
|
Bernd Truckses
11/09/2009 08:31
Exception in designer when previewing with non-existing Master report
Hello,
thank you for the solution, but this one fails too. Maybe this is an issue of VS 2008 and and .Net Framework 3.5 SP1
How to reproduce the bug in the provided example:
1) open solution in VS2008
2) compile and run
3) click on design-button => designer form pops up
4) in the property-sheet on the right, type in some nonsense for "Master Report" property ('ve seen you've already typed in "asdf"
5) click on the preview button in the toolbox
=>
1) InvalidOperationException occures
2) Click OK and run =>Empty preview dialog pops up
3) Close empty preview dialog => the whole app is closed...
I'm using VS2008 and .Net Framework 3.5 SP1
Also setting ExceptionMode to "Ignore" for the ReportSlot does not help.
best regards,
Bernd
|
Dmitry Zhukov
11/11/2009 20:19
Exception in designer when previewing with non-existing Master report
Hello,
In this case you should create a designer form separately and redefine actions to preview button in it. I made all the necessary changes for this in the previous example.
http://www.perpetuumsoftware.com/support/RSS/SampleHandleException.zip
Best regards,
Dmitry Zhukov
Perpetuum Software Support Team
|
Bernd Truckses
11/26/2009 08:19
Exception in designer when previewing with non-existing Master report
Hello,
sorry for my late reply - I was busy in another project in the meantime...
Thank you for the 2nd workaround - that one works now.
Btw.: is it considered to check and fix this bug for future releases?
Best regards,
Bernd
|
Dmitry Zhukov
12/14/2009 02:50
Exception in designer when previewing with non-existing Master report
Hello,
We will fix this bug in future releases.
Best regards,
Dmitry Zhukov
Perpetuum Software Support Team
|