Change Location od database In SQL Server
How can Change the Location of Database of SQl Server 2000 in Crystal report or What can be the Path for SQL Server:
For Instance , if database in mdb; I can change in following
Databasetable.location=App.path & "\abcd.mdb"
but for SQL Server=?????????
Please help me!!!!!
Records Does not Changes!!!!!
With your help I did but Record of field remains same..... and seems report is pointing to same database; Here is my code
Private CrxApplication As New CRAXDRT.Application
Public report As CRAXDRT.report
Private Sub Form_Load()
Dim CrxDatabasetable As CRAXDRT.DatabaseTable
Dim CrxSubreport As CRAXDRT.report
Dim Paths As String
Paths = Mid(App.Path, 1, (Len(App.Path))) & "\report\bbe\"
Set report = CrxApplication.OpenReport(Paths & "Reg1.rpt", 1)
For Each CrxDatabasetable In report.Database.Tables
CrxDatabasetable.SetLogOnInfo "SONAMG\ABC","2003, "sa", ""
Next
report.SelectPrinter "HP LaserJet 2200 Series PCL 6", "Duplicate", "DOT4_001"
report.PrintOut True
End Sub
When I get print out it is found that rocords have be read from Database 2002.
Or did I made mistake in some where else or left some Important code:
:confused: