AR 13 WPF Viewer problem - when report loaded, report always on top

Posted by: dlipsy on 24 August 2020, 7:41 am EST

    • Post Options:
    • Link

    Posted 24 August 2020, 7:41 am EST

    I am encountering some odd behavior with the AR 13 WPF viewer when a report has been loaded. I’m trying to put a pop-over fly-out panel on top of the report, but once a report has been loaded in the viewer, I’m unable to see the pop-over panel. Please see attached MP4 video and Zip file with code (based on WPF Viewer sample).

    sample-updated.zip

  • Posted 24 August 2020, 7:42 am EST

    Attached is a ZIP with a MP4 video showing what happens (erroneously) when loading a report in the viewer.

    wpf-viewer-after-load-always-on-top.zip

  • Posted 24 August 2020, 11:32 pm EST

    Hello,

    I am able to reproduce the issue. I have escalated the issue to the development team and will inform you once I get any information from them.

    Thanks,

    Mohit

  • Posted 25 August 2020, 12:07 am EST

    Hello,

    Can you use the following line of code as workaround:

    ReportViewer.ViewType = GrapeCity.Viewer.Common.Model.ViewType.SinglePage;

    Thanks,

    Mohit

  • Posted 25 August 2020, 2:34 am EST

    [quote]Can you use the following line of code as workaround:

    ReportViewer.ViewType = GrapeCity.Viewer.Common.Model.ViewType.SinglePage;

    Thanks,

    Mohit

    [/quote]

    We need the report to be in continuous mode, however, so a user can scroll through the pages in the report.

  • Posted 26 August 2020, 12:18 am EST

    Hello,

    I have escalated this to our development team(AR-24999).

    Thanks,

    Mohit

  • Posted 26 August 2020, 4:35 am EST

    Thanks, Mohit. I will check back in a day or two and see if there are any bug fixes or other workarounds.

  • Posted 27 August 2020, 6:24 am EST

    Hello Mohit,

    Do you have any update on the AR-24999 issue? Is there a more widespread issue with the viewer when in Continuous mode?

    Thanks,

    Dan

  • Posted 30 August 2020, 11:16 pm EST

    Mohit, do you have any update?

  • Posted 31 August 2020, 2:08 am EST

    Hello,

    Could you please explain that what is your actual requirement to have fly-out panel in WPF Viewer.

    Thanks,

    Mohit

  • Posted 31 August 2020, 2:16 am EST

    Yes, the fly-out panel contains report configuration, which sets certain headers for the report that will display in the viewer.

  • Posted 31 August 2020, 2:18 am EST

    Hello,

    Thanks for the information. I have forwarded this information to the development team.

    Thanks,

    Mohit

  • Posted 1 September 2020, 12:34 am EST

    Hello Dan,

    It is a limitation of WPF viewer in continuous mode. You can use panel outside the viewer to achieve your requirement.

    Thanks,

    Mohit

  • Posted 1 September 2020, 12:23 pm EST

    Sorry, Mohit, this is not an acceptable answer / solution. Something is pretty broken in the continuous mode. Please use the same sample I have attached above and you will see an even bigger issue - when you change the Windows 10 scale, the viewer in continuous mode completely falls apart. You can reproduce by following the steps I show in the attached screen capture videos. wpf-viewer-after-scale-change-1.zipwpf-viewer-after-scale-change-2.zip

  • Posted 2 September 2020, 2:45 am EST

    Thank you - I will have to review Airspace workarounds. Thanks for escalating the other issue - appreciate your help.

  • Posted 2 September 2020, 3:01 am EST

    Hello,

    Actually, WPF viewer uses WindowsFormsHost internally to show the continuous mode in WPF viewer. It is known bug of this control - it renders its content over WPF controls:

    https://stackoverflow.com/questions/5978917/render-wpf-control-on-top-of-windowsformshost

    Regarding scaling issue, I have escalated this to our development team(AR-25032) and will inform you once I get any information from them.

    Thanks,

    Mohit

  • Posted 3 September 2020, 6:59 am EST

    Please let the DEV team know that the workaround is a workaround for this particular issue.

    There is a NuGet package that implements the GitHub solution:

    https://github.com/chris84948/AirspaceFixer

  • Posted 3 September 2020, 3:16 pm EST

    Hello,

    Thanks for sharing with us. I am glad your problem is solved now.

    Thanks,

    Mohit

  • Posted 4 September 2020, 3:59 am EST

    Hello Dan,

    Could you please try after setting the Continuous mode in LoadComplete event of the Viewer instead of XAML code:

    Viewer.LoadCompleted += (_, __) =>
    {
    Viewer.ViewType = GrapeCity.Viewer.Common.Model.ViewType.Continuous;
    };
    

    Thanks,

    Mohit

  • Posted 4 September 2020, 4:02 am EST

    Thanks, I’ll take a look at that workaround. Thanks for your help, Mohit.

  • Posted 4 September 2020, 4:19 am EST

    Unfortunately, I hit this snag - how do I get past that?

    The type ‘ViewType’ exists in both ‘GrapeCity.ActiveReports.Viewer.Win, Version=13.2.18250.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff’ and ‘GrapeCity.ActiveReports.Viewer.Wpf, Version=13.2.18250.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff’

  • Posted 4 September 2020, 4:58 am EST

    I used extern for the GrapeCity.ActiveReports.Viewer.Win library, as detailed here:

    https://stackoverflow.com/a/17651003

    That definitely works a bit better than setting in XAML.

  • Posted 6 September 2020, 9:36 pm EST

    Hello,

    You can check after removing the " GrapeCity.ActiveReports.Viewer.Win" as well. It is not needed in WPF Viewer project.

    Thanks,

    Mohit

  • Posted 6 September 2020, 10:45 pm EST

    I tried that, but couldn’t find a way to print from the viewer, as the Print / PrintExtension API is only in that .Win library. [quote=“mohitg”]

    Hello,

    You can check after removing the " GrapeCity.ActiveReports.Viewer.Win" as well. It is not needed in WPF Viewer project.

    Thanks,

    Mohit

    [/quote]

  • Posted 6 September 2020, 10:46 pm EST

    Did you get any more info about the scaling issue (AR-25032)?

  • Posted 8 September 2020, 12:02 am EST

    Hello,

    but couldn’t find a way to print from the viewer, as the Print / PrintExtension API is only in that .Win library

    Yes, These extension only available in WinViewer.

    Did you get any more info about the scaling issue (AR-25032)?

    No. I thought your issue is resolved after using the LoadCompleted event.

    Request to please confirm if your issue is not resolved yet.

    Thanks,

    Mohit

  • Posted 14 September 2020, 2:19 am EST

    I just tried to reproduce the AR-25032 scaling issue. It is still not working properly. Can you follow up with dev team on this ticket, please?

  • Posted 14 September 2020, 7:26 pm EST

    Hello Dan,

    I am not able to replicate the issue with previous provided sample at my end after using the LoadCompleted event. Could you please provide the sample so that I can share the same with the developer team and provide the information to them that the customer issue is not fully resolved even after using the LoadCompleted event.

    Thanks,

    Mohit

  • Posted 14 September 2020, 11:44 pm EST

    I have attached a Zip file containing updated source code and 125-percent-issue.mp4, which shows this being reproduced. Please ensure your display scale is set to 125%, as shown in display-setting.png.

    AR-sample.zip

    BTW, please increase your file size limit to 20 MB - the 5 MB is very restrictive and I have to put in extra effort to clean out files just to fit it into the 5 MB limit.

  • Posted 15 September 2020, 8:09 pm EST

    Hello,

    Thanks for the video and sample. I am able to replicate the issue. However, issue get resolved at my end after using the following events:

    ReportViewer.LoadCompleted += (s, e) =>
    			{
                   
    				ReportViewer.ViewType = GrapeCity.Viewer.Common.Model.ViewType.Continuous;
    			};
    
                ReportViewer.RefreshReport += (s, e) =>
                 {
                     ReportViewer.ViewType = GrapeCity.Viewer.Common.Model.ViewType.SinglePage;
                 };
    
    

    Could you please try it at your end.

    please increase your file size limit to 20 MB - the 5 MB is very restrictive

    I will discuss with concerned team for the same.

    Thanks,

    Mohit

  • Posted 15 September 2020, 8:09 pm EST

    Hello,

    Thanks for the video and sample. I am able to replicate the issue. However, issue get resolved at my end after using the following events:

    ReportViewer.LoadCompleted += (s, e) =>
    			{
                   
    				ReportViewer.ViewType = GrapeCity.Viewer.Common.Model.ViewType.Continuous;
    			};
    
                ReportViewer.RefreshReport += (s, e) =>
                 {
                     ReportViewer.ViewType = GrapeCity.Viewer.Common.Model.ViewType.SinglePage;
                 };
    
    

    Could you please try it at your end.

    please increase your file size limit to 20 MB - the 5 MB is very restrictive

    I will discuss with concerned team for the same.

    Thanks,

    Mohit

  • Posted 16 September 2020, 12:09 am EST

    Thanks, that workaround worked great! Please convey my thanks to the DEV team for checking into those issues.

    WOOT!

  • Posted 16 September 2020, 12:35 am EST

    What is still odd, at least in my experience, is that when I run the sample, it is fine. When I run the fuller application code, it still behaves this way. I’ll continue to investigate.

    Something goes weird when I do a first load of the section report and do the code you mentioned. I don’t see it cause an issue after that.

  • Posted 16 September 2020, 2:40 am EST

    Essentially, if there was a way to load a blank / null document, that should resolve my issue within the app.

    Note: I found a way to load it 2x on first load, and it looks to work fine.

  • Posted 16 September 2020, 6:13 am EST

    You may close this ticket. Thanks for your help, Mohit.

  • Posted 16 September 2020, 6:17 pm EST

    Hello,

    I am glad your issue is resolved now. Please feel free to revert if you have any other question.

    Thanks,

    Mohit

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels