Crystal Report not accepting Database name at runtime

Dear All
I am facing problem in providing crytal report database connection string at runtime. I have designed the report with all the fields through a view. In development enviornment my database name is different (i.e Test) and in production enviornment database name is different (i.e Test12).
I have supplied the connection string at runtime before showing the report. It accepts the new Server Name, Uid and password. But don't accept the new database name. It gives error "Unable to open rowset".
What i have found is that at design time it is using the complete qualified name of the fields (i.e Test.view1.field1) and when at runtime
database name got changed it didn't work. When i change the production enviornment database name to Test it start working properly.



  • [b][red]This message was edited by michaelB at 2003-12-3 23:12:2[/red][/b][hr]
    You might explore this:
    #If...Then...#Else Directives
    Look for it in Help under 'Conditional Compilation'

    My idea might solve your immediate problem where you can compile one connection string when you are in Debug and a different one when you are in Release.

    However, it doesn't address your more interesting observation that you weren't able to supply the whole connection string dynamically at runtime right down to the new database name.

    In your development code are you developing it where you always have to supply the connection string at runtime for example through some textbox? and then perhaps recorded maybe in the registry for persistence.

    It seems somewhere in your design the old database name is hardcoded. Could it be in one of those drag and drop DataAdapter widgets? Or, are all your connections, commandTexts, input parameters and DataAdapters being build by hand, base purely on your dynamic input string?

  • Hello Packs,

    I getting same issue.Have you got the solution?
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!