
Change SQL Server at run time???
Hi Robert,
Which developping tool do you use? How do you drive the report engine?
API, OCX, ...
You have to set the ODBC- Connection in a way. I my be able to help you
if i'd know more of your developing environment. If you just use Crystal
reports you can change database via the database menu I believe. But i
think this is not you approach.
In VB I use somthing like
With CrystalReport1
.CopiesToPrinter = CInt(txtReportKopien)
.Destination = IIf(bPreview, 0, 1)
.ReportFileName = ReportPath() + sFile
.Connect = wsMain.Connect()
.WindowState = 2
.ProgressDialog = True
End With
...
Public Function Connect() As String
'----------------------------------------
Connect = "DSN=" + DatenQuelle() + ";UID=" + UserName() + ";PWD=" +
Pwd() + ";DSQ="
'----------------------------------------
End Function
Hope it'll help
Quote:
> We are using crw6 and native connection to Oracle 7,3 ...... for
> development and sometimes for training we use a Test server instead of our
> Live server.
> Although I am able at run time to get crystal to log in to the test server I
> cant figure out how to tell the report to use the Test server as it keeps
> saying it cant find the server ( I guess it is still looking for the Live
> server) ...
> Can anyone help and tell me how to switch servers at run time.???
> Rob