|
-
Apr 21st, 2008, 05:23 AM
#1
Thread Starter
New Member
Crystal Report not showing updated data from SQL server
I have to use crystal rerport with VB6.0 to read SQL table, and serve to be chaged dynamically in VB.
I am in a strange situation that my new report file does not show updated data from the server. It displays the data at design time preview.
Code:
Private Sub Command1_Click()
CR.ReportFileName = "C:\Progs\NewReport.rpt"
CR.Connect = "DSN = ayaz\ayaz;UID = sa;PWD =;DSQ = LabSoft"
CR.Action = 1
End Sub
This code displays the report, but with static data at the time disign.
if I use Report file as "C:\Progs\OldReport.rpt", it displays updated data.
Please note both are using same SQL Table
Can any one help me?
-
Apr 21st, 2008, 09:33 PM
#2
Hyperactive Member
Re: Crystal Report not showing updated data from SQL server
Add in these lines right after Private Sub....
Code:
CR.Reset
CR.DiscardSavedData = True
Hope this helps
-
Jul 15th, 2008, 01:58 AM
#3
Lively Member
Re: Crystal Report not showing updated data from SQL server
Can I ask u guy Whut is DSN stand for?
-
Jul 15th, 2008, 10:22 PM
#4
Hyperactive Member
Re: Crystal Report not showing updated data from SQL server
DSN = Data Source Name = name of the ODBC driver setup in the control panel
-
Jul 15th, 2008, 11:26 PM
#5
Thread Starter
New Member
Re: Crystal Report not showing updated data from SQL server
Thank you .. your reply helped me
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
|