I've a report built with Crystal Report 8.5, called by Visual Basic 6, which works with table "Table1" on an Access 97 and/or 2000 database
For special reasons, I need to tell the report at runtime to use Table2 instead, which has the same structure of Table2.
I can successfully tell the Report the new path to use to reach the Access database, which varies upon user installation.
I've tried the following methods:
cDB = full path (path + name.ext) to the Access database
NewName = new table name, ie "Table2"
Report.Database.Tables(1).SetTableLocation cDB, NewName, ""
and
Report.Database.Tables(1).Location = cDB
Report.Database.Tables(1).Name = NewName
And
Report.Database.Tables(1).SetLogOnInfo cDB, NewName, "", ""
but I got nowhere.
Any clue?
For special reasons, I need to tell the report at runtime to use Table2 instead, which has the same structure of Table2.
I can successfully tell the Report the new path to use to reach the Access database, which varies upon user installation.
I've tried the following methods:
cDB = full path (path + name.ext) to the Access database
NewName = new table name, ie "Table2"
Report.Database.Tables(1).SetTableLocation cDB, NewName, ""
and
Report.Database.Tables(1).Location = cDB
Report.Database.Tables(1).Name = NewName
And
Report.Database.Tables(1).SetLogOnInfo cDB, NewName, "", ""
but I got nowhere.
Any clue?