Pdf Landscape issue

Posted by: anyolejoe on 3 August 2017, 3:20 pm EST

  • Posted 3 August 2017, 3:20 pm EST

    Hello,

    Using the Web Report Viewer to display a pdf format in landscape doesn't seem to work well in version 1.6.2260.3. A report that rendered fine in version 1.6.2084.14 in 7 pages now renders with lots of page overruns into 17 pages.

    The code we've been using to set the landscape option is as follows -

                        if (runtime.ReportDefinition.Report.PaperOrientation ==  DataDynamics.Reports.ReportObjectModel.PaperOrientation.Landscape)
                        {
                            if (runtime.ReportDefinition.Report.PageWidth >
                            runtime.ReportDefinition.Report.PageHeight)
                            {
                                //swap width/height to the way DDR WebViewer wants it for PDF Landscape
                                DataDynamics.Reports.Extensibility.Definition.Components.Length l1 = runtime.ReportDefinition.Report.PageWidth;
                                DataDynamics.Reports.Extensibility.Definition.Components.Length l2 = runtime.ReportDefinition.Report.PageHeight;
                                runtime.ReportDefinition.Report.PageWidth = l2;
                                runtime.ReportDefinition.Report.PageHeight = l1;
                            }
                        }

    Any feedback on this would be appreciated.

    Thanks

    Joe
  • Replied 3 August 2017, 3:20 pm EST

    After a bit more fiddling around it seems that this code is unnecessary now and the pdf landscape report renders fine without it. You can ignore this posting now!!
  • Replied 3 August 2017, 3:20 pm EST

    Hello,

    Its good to know that your issue has been resolved. Please let me know if you have any queries further.

    Thanks,
    Manpreet Kaur
Need extra support?

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

Learn More

Forum Channels