Help. I am currently using a txt to populate the report. The problem is sometimes it works, sometimes it gives me error. Last version ran, but the report printed the data that was old. How can I make it use the updated txt document?
Here is the code I am currently using..
Public Sub PrintReports(strReportName As String)
'On Error GoTo PrintReports_Error
Screen.MousePointer = vbHourglass
strReportName = "C:\Program Files\VFW_Membership_Program\" & strReportName & ".rpt"
Set m_crwApplication = CreateObject("Crystal.CRPE.Application"
Set m_crwReport = m_crwApplication.OpenReport(strReportName)
Set m_crwDatabase = m_crwReport.Database
m_crwDatabase.Verify
m_crwReport.PrintOut
Screen.MousePointer = vbNormal
'PrintReports_Error:
'Screen.MousePointer = vbNormal
'Exit Sub
End Sub
Thanks to all for the help...
Here is the code I am currently using..
Public Sub PrintReports(strReportName As String)
'On Error GoTo PrintReports_Error
Screen.MousePointer = vbHourglass
strReportName = "C:\Program Files\VFW_Membership_Program\" & strReportName & ".rpt"
Set m_crwApplication = CreateObject("Crystal.CRPE.Application"
Set m_crwReport = m_crwApplication.OpenReport(strReportName)
Set m_crwDatabase = m_crwReport.Database
m_crwDatabase.Verify
m_crwReport.PrintOut
Screen.MousePointer = vbNormal
'PrintReports_Error:
'Screen.MousePointer = vbNormal
'Exit Sub
End Sub
Thanks to all for the help...