Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Updating reports on open to reflect new data

Status
Not open for further replies.

JeremyM

Programmer
Nov 10, 2000
33
0
0
US
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...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top