RE: Dynamic database type for Command Table objects
I am using VB.net (vs 2003) with Crystal Reports XI r2. We have a report viewer application that takes any of our reports, sets it up for their current database (either MS Access or Oracle depending on the client type), and loads it for viewing. We have code that takes care of this dynamic database connection fine for regular tables, but is failing on Command Table objects.
I have been able to modify the user data for a particular database type, but not change the database type entirely. For instance, if I write a report pointed to an Oracle data source in the Crystal IDE, then a user loads the report into a viewer with an Oracle data source, I can set the new data source fine with their information. If a customer tries to load the report into a viewer with an MS Access data source, the connection attributes will obviously fail.
I’ve searched the forums and tried looking at the CrystalDecisions.ReportAppServer.DataDefModel.CommandTable class in more detail, but with no luck. Does anyone have an example of working code that will accomplish this database type change using .NET RAS for Command Tables?
Any help or insight is appreciated!