|
-
Jun 27th, 2000, 07:47 PM
#1
Thread Starter
New Member
In the program writing, I am passing a selection formula to a Crystal Reports 7 (using the Crystal Reports OCX) report. This selection is based on information gathered and stored in an Access97 working table. The old data is cleared from the table prior to each call for the report. The problem I am having is that after displaying/printing the report the first time, repeated calls to display the report do not refresh the data. I included the refresh button on the report display so that the user can refresh the report manually. This seems to be a particular trait of Crystal Reports 7, as I did not have that problem with Versions 5 & 6. Is there a way to have the report refreshed automatically each time it is called? Below is the code I have on my Print button.
strDateTime = Str(Now)
FillWorkTable strDateTime
With frmMain.CrystalReport1
.DataFiles(0) = gdbLocation & C_DBNAME
.ReportFileName = App.Path & "\Reports\rptShortListQueryBy.rpt"
.SelectionFormula = "{wtblPersonal.UserID} = " & glngUserID & " AND {wtblPersonal.DateTime} = " & QuoteSingle(strDateTime)
.Formulas(0) = "QueryBy= " & Quote(gstrQueryBy)
.WindowShowExportBtn = False
.WindowShowRefreshBtn = True
.WindowShowSearchBtn = False
.Destination = crptToWindow
.WindowState = crptMaximized
End With
If frmMain.CrystalReport1.PrintReport <> 0 Then
gstrProcedure = "Crystal Report Error - " & frmMain.CrystalReport1.LastErrorNumber & " - " & frmMain.CrystalReport1.LastErrorString
LogErrors gstrProcedure
MsgBox gstrProcedure
End If
Any help that you may provide to solve this problem will be greatly appreciated.
Tommy
-
Sep 5th, 2000, 02:30 PM
#2
Lively Member
Uncheck the "Save data with report" option in the Crystal Reports file menu.
Dr_Evil
Senior Programmer
VS6 EE
VS.NET EA
-
Sep 5th, 2000, 02:59 PM
#3
Fanatic Member
Help
Dont want to seem rood Taz but I am having major problems with VB5 Pro and the version of Crystal Reports Ive put a post in the database section please could you have a look and help if possible
Thanks Spud
-
Sep 5th, 2000, 03:06 PM
#4
Thread Starter
New Member
Originally posted by Dr_Evil
Uncheck the "Save data with report" option in the Crystal Reports file menu.
That was done. From what I gathered, the problem is that crystal reports caches the data for a report and won't update it unless the user clicks the update button on the crystal tool bar.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|