cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Remove schema information

Former Member
0 Likes
473

Hi,

I'm using "Crystal Reports for Visual Studio" version 13.0.13.1597 with C#/.Net 4.5. I'm connection to an Oracle database and I'm searching for a way to remove the schema information of the report.

Scenario:

We create reports for customers using our development database (schema "X"). Apparently Crystal Reports stores this information and when the SQL is generated, the tables are fully qualified, eg. "X.CUSTOMERS" as "CUSTOMERS". This is kind of an issue because we have several databases for testing (with the same database tables, views, etc, but different data). When we start our application we can specify start parameters to tell the application to which database (read: schema) it should connect, e.g. "TestDB1", "TestDB2", etc. The report connects to the desired database (via 3713954 - Changing server/database of a report in code), but of course it now should use the tables of that schema, not "X" which was used when creating the report.

I found 3713954 - Overridden Qualified Table Name issue which sounds like a similar request, but it's quite old and the outcome is not applicable for my scenario. I've already experimented with CrystalDecisions.CrystalReports.Engine.Table.Location, but without success (also, setting location always performs a "VerifyDatabase", so it's pretty slow)

I guess what I'd actually like to set is CrystalDecisions.CrystalReports.Engine.Table.RasTable.QualifiedName, but the "RasTable" is not publicly accessible.

Any suggestions are welcome.

Thanks,

Markus

Accepted Solutions (1)

Accepted Solutions (1)

0 Likes

Hi Markus,

Removing the Schema caused all sorts of table and security issues, if someone else has access to a table with the same name the DB server may simply use it because that was the first one found.

So CR must have a a schema to fully qualify the connection.

Search for "replaceconnection" and you should find sample on how to use it. One of the properties is to DoNotVerify, so as long as the DB's are identical CR should not call the verify.

Don

Answers (0)