Report Viewer not displaying Landscape correctly

Posted by: krsrn on 4 August 2017, 3:16 pm EST

  • Posted 4 August 2017, 3:16 pm EST

    Using the code below I am trying to get a report which I have passed across to a new form where my Report Viewer is located to display correctly.



    In my original Report I am able to set the PageMargins, however, these properties are not avaliable within the Viewer.



    Any Help appreciated



    Thanks



    With arv

    .Toolbar.Tools(0).Visible = False

    .Toolbar.Tools.Add ("Close Report")

    .Printer.Orientation = ddOLandscape

    .Printer.ColorMode = 1

    .Zoom = 100

    .ToolbarVisible = True

    End With
  • Replied 4 August 2017, 3:16 pm EST

    Hello,

    If you are trying to set the margins of the report, you may try to do so from the object of the report with code simmilar to as follows.

    Dim rpt As New ActiveReport1
    rpt.PageSettings.RightMargin = 720
    rpt.PageSettings.LeftMargin = 720
    rpt.PageSettings.TopMargin = 720
    rpt.PageSettings.BottomMargin = 720
    rpt.Run
    Me.ARViewer21.ReportSource = rpt

    Regards,
    Prantik
  • Replied 4 August 2017, 3:16 pm EST

    Thanks thats seemed to work fine. Is it possible to determine a time length a report will take to execute. I.E. having a progress bar incrementing around rpt.Run?
  • Replied 4 August 2017, 3:16 pm EST

    Hello,

    ActiveReports 2.0(VB6) doesnot have any inbuilt control to implement the progress bar feature.However you could probably use the status property to display the status of the report. You may also take a look at this and this forums in this regard.

    Regards,
    Prantik
Need extra support?

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

Learn More

Forum Channels