kristofdielis
Programmer
- Sep 1, 2011
- 25
Hi,
I'm writing a 'general purpose' back-end, that needs to provide basic operations, to load a Crystal Reports report.
Using the connection string I get from the client app (a test program, at the moment), I build a ConnectionInfo object and apply it to the table(s) of the selected report (+ sub reports):
If I halt the debugger on the last line, table contains the correct information. Once I execute the ApplyLogOnInfo, it seems to have restored the original connection, provided in the report itself.
Any idea why ApplyLogOnInfo doesn't accept my changes?
Thx.
I'm writing a 'general purpose' back-end, that needs to provide basic operations, to load a Crystal Reports report.
Using the connection string I get from the client app (a test program, at the moment), I build a ConnectionInfo object and apply it to the table(s) of the selected report (+ sub reports):
Code:
CRS.TableLogOnInfo tableLogOnInfo = table.LogOnInfo;
tableLogOnInfo.ConnectionInfo.ServerName = connectionInfo.ServerName;
tableLogOnInfo.ConnectionInfo.DatabaseName = connectionInfo.DatabaseName;
tableLogOnInfo.ConnectionInfo.UserID = connectionInfo.UserID;
tableLogOnInfo.ConnectionInfo.Password = connectionInfo.Password;
table.ApplyLogOnInfo(tableLogOnInfo);
If I halt the debugger on the last line, table contains the correct information. Once I execute the ApplyLogOnInfo, it seems to have restored the original connection, provided in the report itself.
Any idea why ApplyLogOnInfo doesn't accept my changes?
Thx.