Crystal Reports Connection string from C# not accessing the correct database

37 Views Asked by At

enter image description hereI have several Crystal Reports that are used within several C# apps. The reports are used on multiple tools through a shared drive. The reports were saved with a database source to one of the three databases in an SQL database. One of the tool's C# is trying to pass down another database to reference data from that database. It is not working. It seems some reports are not updating the database source from the C# passed down connection information.

A Crystal reports dialogs pops up that is asking for a database name, but the textbox is not enabled, or the attached dialog

Can one Crystal report reference different databases at run-time if the passed down connection information is correct?

Integrated Security is turned off.

Any help would be great.

Tried a lot of different things making sure connection string is right.

1

There are 1 best solutions below

3
MilletSoftware On

Yes, you can switch the database target at runtime.

You don't show the code you are using, so it is difficult to address the rest of your question.

It may be possible to make your existing code work by changing connection properties in the report. For example, remove table qualifiers and setting the properties to use DSN default properties. Otherwise, the code needs to take care of those aspects.