I was trying to change the database location at the runtime by using this code
Dim TPTReport As New TPT
Dim reportV As New ReportsViewer
TPTReport.Load()
Dim conn As New ConnectionInfo
Dim cmp = "c:\"
conn.ServerName = "it-abutmah"
conn.DatabaseName = cmp
conn.UserID = ""
conn.Password = ""
Dim tables As CrystalDecisions.CrystalReports.Engine.Tables
tables = TPTReport.Database.Tables
Dim table As CrystalDecisions.CrystalReports.Engine.Table
Dim tablelogininfos As TableLogOnInfos
Dim tablelogininfo As TableLogOnInfo
For Each table In tables
tablelogininfo = table.LogOnInfo
tablelogininfo.ConnectionInfo = conn
table.ApplyLogOnInfo(tablelogininfo)
table.Location = cmp & table.Location & ".dbf"
Next
reportV.source = TPTReport
the application was running fine, so the report, but after I used this, I start get the following error when I try to view the report
Error in File c:\DOCUME~1\abutmah\locals~1\Temp\temp-b99f422004dc.rpt
Error in formula <Record_Selection>
'{testpack.ret-trans}={ TRANSMITTAL NO.}'
this field name is not known
Please help ...
thanX anyway