VB.NET

Moderators: seancampbell
Number of threads: 4020
Number of posts: 10026

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Crystal Report not accepting Database name at runtime Posted by packs on 3 Dec 2003 at 7:19 AM
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.

Thanks
Packs
Report
Re: Crystal Report not accepting Database name at runtime Posted by michaelB on 3 Dec 2003 at 11:10 PM
This message was edited by michaelB at 2003-12-3 23:12:2

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?





Report
Re: Crystal Report not accepting Database name at runtime Posted by be_irfan on 14 Oct 2009 at 1:11 AM
Hello Packs,

I getting same issue.Have you got the solution?



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.