kristofdielis
Programmer
- Sep 1, 2011
- 25
Hi,
I don't know if this forum is the right place for development questions, but ...
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.
The reports used are delivered to me, I have zero control regarding the content, so I have to make them work as is.
Any idea why ApplyLogOnInfo doesn't accept my changes?
Thx.
PS: I am using Visual Studio 2010, so with Crystal Reports 2011
PPS: I also posted this question on the C# forum.
I don't know if this forum is the right place for development questions, but ...
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.
The reports used are delivered to me, I have zero control regarding the content, so I have to make them work as is.
Any idea why ApplyLogOnInfo doesn't accept my changes?
Thx.
PS: I am using Visual Studio 2010, so with Crystal Reports 2011
PPS: I also posted this question on the C# forum.