In your original message, I assumed you were getting a report, but the data was not being refreshed. Maybe, I misread your problem. You also asked for sample code. There are many different ways to print/display a crystal report. This example uses the OCX(Crystl32.OCX.
Select Case Index ' cmdPrint button array
Case 0
' To Printer
crpRept.Destination = crptToPrinter
lngResult = crpRept.PrintReport
If lngResult = 0 Then
strMsg = " Done! "
ElseIf lngResult <> 20545 Then ' Cancelled by user
Error lngResult ' Use error handler to save error
'strMsg = crpRept.LastErrorString
End If
Case 1
' To screen
crpRept.Destination = crptToWindow
lngResult = crpRept.PrintReport
If lngResult = 0 Then
strMsg = vbNullString
ElseIf lngResult <> 20545 Then ' Cancelled by user
Error lngResult ' Use error handler to save error
'strMsg = crpRept.LastErrorString
End If
End Select