Ticket T1285714
Visible to All Users
Duplicate

Why does a ReportDocument have changes after being previewed?

created 6 days ago

Hi, I've noticed that when previewing a ReportDocument in the WPF Report Designer and then switching back to 'Designer' mode, the ReportDocument.HasChanges property becomes true, even though nothing has actually been changed. Why does it think it has been changed?

I have attached an app showing the issue. At the top of the window I am showing the status of the ReportDocument.HasChanges property. If you switch to 'Previewing' mode and then back again, you'll see it change to True even though nothing has actually been modified in the Report Document. If you try to close the window, the Report Designer prompts you to save the changes even though nothing has actually changed.

In my main app, I use the ReportDocument.HasChanges property to monitor if the Report is dirty or not, so this issue is giving me a false 'dirtyness' for the report. Is there a way to prevent this behaviour?

Thanks

Answers approved by DevExpress Support

created 6 days ago

Hi Shane,

Why does it think it has been changed?

My guess is that this happens because when previewing the report, the state of the report is saved to ensure that any changes made during the preview don't affect the original report. The report is serialized and then deserialized on returning to the designer to restore the original state. We didn't consider this edge case, which is why it incorrectly thinks the report has been changed.

I've created a separate bug report for this issue. You can follow the progress and receive notifications about this issue on the bug report page: WPF end-user designer (EUD) - Report state indicates 'changed' after previewing and returning to Designer without any modifications to the report.

Regards,
Denis

    Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

    Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.