Ticket T180724
Visible to All Users

XtraReport 10.1 preview from within WindowsFormsHost showing empty report until toolbar reset

created 10 years ago

Hi,

currently extending a old software using Xtrareports v10.1 (<- from filenam; product version 10.1.6.0) where I need to show a report preview dialog from within a WindowsFormsHost Control.

The thing that currently driving me nuts is, that the preview dialog showing "The document does not contain any pages" until I click "View"->"Customize"->"Toolbars"->"Reset". It then shows the correct content.

Any hints what I am doing wrong?
Opening a preview directly from winform windows/controls works perfectly fine in the old one.

Attached is an example project (vs2013) containing a wpf application with a WindowsFormsHost in a WPF window. The host contains a winform control that shows a simple preview wich reproduces the behaviour perfectly on our machines.

Regards,
Bernd Boruttau

Answers approved by DevExpress Support

created 10 years ago (modified 10 years ago)

Hi Bernd,
Thank you for the provided project. The issue you've encountered is not specific to version 10.1, but rather to interoperability issues between WPF and WinForms components. Please review Andrew's answer from the XtraReport shows no data ticket to see why exactly this situation occurs and what workaround can be used to resolve this problem.
I'm looking forward to your results.

    Comments (1)

      Hi,
      "report.CreateDocument(false);" between new Report() and ShowPreview() fixed the problem.
      Thanks a lot.

      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.