Canceling the .Render()?
-
- Posts: 4
- Joined: Mon Jun 12, 2017 8:36 pm
Canceling the .Render()?
Folks,
I need to give users the ability to cancel a rendering StiReport. I killed two days trying everything I could think of. Any suggestions?
• Tried passing the UI's report object into a BackgroundWorker and firing the report.Render() routine inside it. That failed because of cross-threading issues. The stack-trace indicates some kind of TextBox or font-sizing issue going on inside.
• Tried passing the report object into another Thread entirely using Tasks. Same issue.
• Tried creating code-only versions of the StiReport object to avoid any connection to the UI. Same issue.
• I tried to make a disconnected clone by serializing the report to JSON and back – but the serialization failed because an internal property had no value.
o Tried to instantiate that property (PageNumberThrough, an int property) but it’s read-only and apparently only created when rendering begins
• I did manage to hook up the Report_Rendering event, which fires once per page. I figured with this I could let the user click the Cancel button, set some flag-Boolean to false, and the next time the Rendering event fires I would call report.IsStopped=true to stop it. BUT…the user cannot click the Cancel button, because the .Render routine “owns” the UI thread.
• Tried to implement Application.DoEvents() to let the UI “listen” to other UI activity, like a user clicking Cancel. But Silverlight doesn’t have a .DoEvents() method.
Ideas?
I need to give users the ability to cancel a rendering StiReport. I killed two days trying everything I could think of. Any suggestions?
• Tried passing the UI's report object into a BackgroundWorker and firing the report.Render() routine inside it. That failed because of cross-threading issues. The stack-trace indicates some kind of TextBox or font-sizing issue going on inside.
• Tried passing the report object into another Thread entirely using Tasks. Same issue.
• Tried creating code-only versions of the StiReport object to avoid any connection to the UI. Same issue.
• I tried to make a disconnected clone by serializing the report to JSON and back – but the serialization failed because an internal property had no value.
o Tried to instantiate that property (PageNumberThrough, an int property) but it’s read-only and apparently only created when rendering begins
• I did manage to hook up the Report_Rendering event, which fires once per page. I figured with this I could let the user click the Cancel button, set some flag-Boolean to false, and the next time the Rendering event fires I would call report.IsStopped=true to stop it. BUT…the user cannot click the Cancel button, because the .Render routine “owns” the UI thread.
• Tried to implement Application.DoEvents() to let the UI “listen” to other UI activity, like a user clicking Cancel. But Silverlight doesn’t have a .DoEvents() method.
Ideas?
Re: Canceling the .Render()?
Hello,
Please send us your request with detailed description on support@stimulsoft.com. We will check it and will reply to you by email fast as possible.
Thank you.
Please send us your request with detailed description on support@stimulsoft.com. We will check it and will reply to you by email fast as possible.
Thank you.
Re: Canceling the .Render()?
Hi Alex,
I would like to know the outcome of this too. I need my users to have the ability to cancel the rendering event too. Can you please send me a sample project?
Cheers,
Vineet
I would like to know the outcome of this too. I need my users to have the ability to cancel the rendering event too. Can you please send me a sample project?
Cheers,
Vineet
Re: Canceling the .Render()?
Hello, Vineet.
Could you specify the Viewer or Designer that you use?
We need to know its name and version.
Thank you.
Could you specify the Viewer or Designer that you use?
We need to know its name and version.
Thank you.
Re: Canceling the .Render()?
Stimulsoft.Web 2018.2.3 --> StiWebViewer
-
- Posts: 6344
- Joined: Tue Mar 20, 2018 5:34 am
Re: Canceling the .Render()?
Hello,
We need some additional time to investigate the issue.
Thank you.
We need some additional time to investigate the issue.
Thank you.
Re: Canceling the .Render()?
What about cancel Render? It is possible now?
-
- Posts: 6344
- Joined: Tue Mar 20, 2018 5:34 am
Re: Canceling the .Render()?
Hello,
Unfortunately, in the web version s it is not possible.
Thank you.
Unfortunately, in the web version s it is not possible.
Thank you.