Hello folks,
I'm software developer in C#.Net and DB2 Database enviromnent. For a future release we are evalulating crystal reports at the moment. We playing with "integrated reports from dataset" (dataset is already present in our application) and "custom reports from SQL Command" (customer design its own Report with crystal report Developer or what ever and uses a (SQL-)Command).
The case "integrated reports from dataset" is very easy for us and we think it is very usefull.
But the case "custom reports from SQL Command" is totaly hell! The Report stores all connection data and wants allways to connect to the "designer database". We want to change the connection data of the report at runtime, but the customer SQL Command should not touched. We just want to fire these command against another database.
I googled a lot, tryed out some examples for this forum here but I dont found a working solution for our use case. I also tryed out the CodeBuilder-RasConnectionInfo, that should build me a working new database connection, but it doesnt.
So my question:
How can I change the database connection of a given crytal report at runtime with C#.Net? We need to pass the report all TCP/IP connection information about our DB2 database server: IP-adress/hostname, Port, Username, Passwort, maybe Schemaname.
Note: i have a second problem, the c# Reportviewer asked me once connection data for a report. Badly i checked something like "use integrated authentication" or "use OS authentication" or "save Logon data". Badly the connection information i provided was invalid and the report viewer ask me never again to enter an authentication. So every test with a working, unmodified report fails to. How can I reset the "memory" of the report viewer? Uninstallation of crytal report doesnt work.
Thank you very much!
Marcus