Report not showing in Viewer

Posted by: pteranodon on 4 August 2017, 3:18 pm EST

  • Posted 4 August 2017, 3:18 pm EST

    When trying to view reports in the ARViewer 2, the reports simply don't show.  No error messages are displayed.  The ARViewer_LoadCompleted event fires, and the page/n pages on the toolbar displays e.g. 1/4, but the report isn't visible and the toolbars are only like 2" x 4" instead of sizing to 8.5" x 11".  This issue just cropped up - it did not used to happen.  Machine runs Windows Vista Home Basic.

    Code: (arv is ARViewer, ard is ActiveReportsDesigner)

        If ARV.Status = ddVStatusReadingData Then
            If Not ARV.ReportSource Is Nothing Then ARV.ReportSource.Cancel
            Set ARV.ReportSource = Nothing
        End If
       
        If ARV.Pages.Count > 0 Then ARV.Pages.RemoveAll
        ARV.Refresh
       
        Screen.MousePointer = vbHourglass
       
        Set rpt = New ActiveReport 'DDActiveReports2.ActiveReport
        ard.SaveToObject rpt
       
        On Error Resume Next
       
        rpt.Run False
       
        iPgCount = rpt.Pages.Count
       
        If Err.Number <> 0 Then GoTo exPreviewReport
       
        If rpt.Status = DDStatCompleted Then
            Set arv.ReportSource = rpt
        ElseIf rpt.Status = DDStatCancelled Then
            'SetCurrentTab TabReport
        End If
  • Replied 4 August 2017, 3:18 pm EST

    Hello,

    What is the size of the report that you are rendering to the viewer and what is the size of the default printer setup on the machine? You may try setting the report's printer to an empty string to resolve this. So in your code, you may try adding rpt.Printer.DeviceName=”” to resolve this.

    Regards,
    Prantik

  • Replied 4 August 2017, 3:18 pm EST

    The report is 8.5 x 11, and that is the size of the default printer paper as well.  Setting the rpt.devicename = "" did not help.

    Also, even though the report is not shown in the ARViewer, when I click the Print button in the viewer it prints the report properly.
  • Replied 4 August 2017, 3:18 pm EST

    Reinstalling ActiveReports fixed the problem.  I dunno why.
Need extra support?

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

Learn More

Forum Channels