I am using VB6 with crystal reports version 8.5 (the OCX) and Access (Jet) database.
I have created a report which works fine on my dev machine and am trying to deploy to another machine.
When the report is run on the other machine an error 20533 Unable to open database error is received.
The report has an embedded subreport, which if I remove the subreport, works fine.
I have validated the database for both the main report and the subreport.
Here is the code I am using to run the report.
With MDIMain.CrystalReport
.ReportFileName = App.Path & "\reports\Summary.rpt"
.RetrieveDataFiles
Do Until .DataFiles(xCntr) = ""
.DataFiles(xCntr) = gSystem.DB_Path
xCntr = xCntr + 1
Loop
.SelectionFormula = "{OrderHeader.OrderID} =" & rsOrder("OrderID") '{?OrderID}
.ReportTitle = gSystem.Company_Name
.Action = 1
End With
I'm at a loss... any help would be apprieciated. Thanks.Hi all... I figured out what the issue was. It was fixed with the following code that sets the database location for the subreport.
I have posted the code fix for anyone else that may run into this issue.
Thanks to all that took a look at this for me.
With MDIMain.CrystalReport
.ReportFileName = App.Path & "\reports\Summary.rpt"
.RetrieveDataFiles
Do Until .DataFiles(xCntr) = ""
.DataFiles(xCntr) = gSystem.DB_Path
xCntr = xCntr + 1
Loop
.SelectionFormula = "{OrderHeader.OrderID} =" & rsOrder("OrderID")
.ReportTitle = gSystem.Company_Name
.SubreportToChange = "Selected Options"
.DataFiles(0) = gSystem.DB_Path
.SubreportToChange = ""
.Action = 1
End With
Showing posts with label machine. Show all posts
Showing posts with label machine. Show all posts
Tuesday, March 27, 2012
Wednesday, March 21, 2012
GetDate() - from Server machine or Client machine ?
Hi,
If I use GetDate() function from client machine (using "\\ServerMachine\SQLExpress" instance from client machine "ClientMachine"), then from where I will get the DateTime value ?
From "ServerMachine" or from "ClientMachine"
Thanks
The getdate function returns the current system dat time from the SQL Server.
|||Thanks Glenn.
Subscribe to:
Posts (Atom)