Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Changing of server or Database
Message
From
30/06/2004 06:23:04
Rene Lovino
Bigfoot Global Solutions, Inc
Cebu, Philippines
 
 
To
28/06/2004 19:38:35
General information
Forum:
Visual FoxPro
Category:
Crystal Reports
Miscellaneous
Thread ID:
00918200
Message ID:
00918907
Views:
187
This message has been marked as the solution to the initial question of the thread.
You can use the .SetTableLocation method.

sample code below:
lcConnStr = "PreQEServerType=ODBC - " + gcDataSource + ";;PreQEServerName=" + gcDataSource + ;
";;PreQEDatabaseName=" + oCompany.cDBName + ";;UserId=" + gcUID + ;
";;UseDSNProperties=0;;Password=" + gcPassWord
For i = 1 To oReport.Database.Tables.Count
oReport.Database.Tables(i).SetLogOnInfo( cServer, cDataBase, cUser, cPwd)
oReport.Database.Tables(i).ConnectBufferString = lcConnStr
oReport.Database.Tables(i).SetTableLocation(.Name, "", .ConnectBufferString)
Next

Rene

Hi,

All time that I modify the name of the server or the database I have that to enter in the way to designer of the report and to have access menu database- set datasource location and to bring up to date table for table...

I am using 8.0 VFP and Crystal 9.0

It sees the code below:

Local oReport_Application As Object
Local oReport As Object

oReport_Application = Createobject("CRYSTALRUNTIME.Application")
oReport = Createobject("CRYSTALRUNTIME.Report")
oReport = oReport_Application.OpenReport( cReport)
oReport.RecordSelectionFormula = cFormula
oReport.MorePrintEngineErrorMessages = .T.
oReport.EnableParameterPrompting = .T.
oReport.ReportTitle = cTitulo

For i = 1 To oReport.Database.Tables.Count
oReport.Database.Tables(i).SetLogOnInfo( cServer, cDataBase, cUser, cPwd)
Next

oReport = Null
oReport_Application = Null
It ignores the SetLogOnInfo() ??
Breno Lucas Viana
http://www.wmsistemas.com.br
Previous
Reply
Map
View

Click here to load this message in the networking platform