I miss "Closed" value in ReportState enumeration, used in XRDesignPanel.ReportStateChanged and XRDesignFormExBase.ReportStateChanged events. We do some actions whe opening reports in designer (ReportState.Opening) and we need to do some actions when the report is closed in designer. Now these actions we do in XRDesignPanel.Deactivated event. It's description says it is for internal use only, but I did not find any other way.
Basically, I have XRDesignPanel for report designing.
1) I need to do something when report is opened in panel. This is simple, I just handle XRDesignPanel.ReportStateChanged event when ReportState is Opening (or Opened).
2) I also need to do something when designed report is closed.
I attached a very small example with some comments, which, I believe, will clarify what I want to achieve.
Thank you, Stano
Thank you for your feedback. When a report is closed, the ReportStateEventArgs.ReportState Property is set to the ReportState.None value.
So, you can handle the XRDesignPanel.ReportStateChanged Event and check whether or not the ReportState property is set to the ReportState.None value.
Please feel free to contact us if you need any further clarification on this issue.
This does not help me at all.
I can check whether ReportState property has ReportState.None value. But I also need to have report which has been closed. But XRDesignPanel.Report property is Nothing at the time ReportStateChanged event with ReportState.None value is fired.
When there are ReportState.Opening and ReportState.Opened values, I think there could be ReportState.Closing and ReportState.Closed values as well. And the report (XRDesignPanel.Report property) should be still accessible - at least for "Closing" state.
Or at least make XRDesignPanel.Report accessible when ReportStateChanged event with value ReportState.None is fired.
As I said, I have a workaround for this, but life would be easier with new ReportState values.
Is your intention to post an answer to your own question?
- If so, then proceed.
- If you simply wanted to post additional information, ask for further clarification, or to just say "Thanks!", please click Leave a Comment.
- If you wish to edit your original question, please use the Edit button in the Toolbox at the top right corner of that entry.