VB Crystal Report >> change database path

by Cedric » Tue, 19 Apr 2005 17:37:18 GMT

hi all!,
First , sorry for my english :-D
I wonder if it's possible to change the path of the database base used in
the report but keep the fields added on the report.
In fact it's the same base but in a different place.

thanks.




Similar Threads

1. Changing database path for linked table from VBA code

2. Changing database path at runtime

Hi, I have the following code that I want to modify to override the
database path but I can't seem to see which method will do it. I got a
CRViewer 9 control that I'm using. I can't seem to find a DataFiles 
property to change to the new path. Thanks.

     Dim crystal As CRAXDRT.Application
     Dim report As CRAXDRT.report

     CRViewer.DisplayBorder = False
     CRViewer.DisplayTabs = False
     CRViewer.EnableDrillDown = False
     CRViewer.EnableRefreshButton = False

     CRViewer.EnableProgressControl = True

     Set crystal = New CRAXDRT.Application
     Set report = crystal.OpenReport(sReportFileName)

     report.DiscardSavedData

     CRViewer.ReportSource = report
     CRViewer.ViewReport

     Do While CRViewer.IsBusy
         DoEvents
     Loop

     CRViewer.Zoom 94

     Set crystal = Nothing
     Set report = Nothing

3. how to change Database path at runtime? - VB Crystal Report

4. Dynamically change database path

I would like to be able to redirect a dataset "binding" from one database to 
another during runtime. The database makeup will be identical, but the 
actual files will be located in different folders, depending on current 
projects.

They will in all cases reside locally, not on a network.

I know that the ConnectionString property is read-only.

Can this be done in some way?

Lennart 


5. change Access database path - VB Crystal Report

6. Change where my ("Select * from CIM_DataFile where Path = '\\images\\'") to a UNC path

How can I change this so the path is a UNC path to c:\images?

Set objWMIService = GetObject("winmgmts:" &
"{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colFiles = objWMIService.ExecQuery("Select * from CIM_DataFile where
Path = '\\images\\'")

Any help is greatly appreciated, thanks!


7. Finding the Path to the Database in VBA - Access Forms Programming

8. Database Path in VBA

Hi all.

In Access VBA, what is the equivalent of the Excel VBA statement: 
ThisWorkbook.Path?
In Excel, this returns a string that is the path to the Excel file where the 
VBA code resides (e.g. "C\My Documents\... etc.").

Thank you,
Alex