View Single Post
  #2 (permalink)  
Old July 26th, 2007, 07:44 PM
alweisenborn alweisenborn is offline
Registered User
 
Join Date: Oct 2005
Location: Miami, FL, USA.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Try this:
Sub PrintReport()

    Dim Password as String
    Dim crxReport As CRAXDRT.Report
    Dim crxTable As CRAXDRT.DatabaseTable
    Dim mcrxApplication As New CRAXDRT.Application

    Screen.MousePointer = vbHourglass
    Set CRXReport = crxApplication.OpenReport( _
        App.Path & "\MyReport.rpt", 1)
    Password = "MyPassword"
    CRViewer91.ReportSource = crxReport

        For Each crxTable In crxReport.Database.Tables
            crxTable.SetSessionInfo "", Chr(10) & Password
        Next crxTable

    CRViewer91.ViewReport
    Screen.MousePointer.vbNormal

End Sub



Best Regards,

Al Weisenborn
Reply With Quote