Jump to content
  • Advertisement
Sign in to follow this  
UnshavenBastard

[.net] Crystal Reports - how to pass System database path (*.mdw) ?

This topic is 5454 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hallo! I want to display a report which is linked with a MS Access database. (using C# and CrystalReports 10) To logon, a database named "security.mdw" is needed. When, in a different part of my program, I query the data base with SQL commands, I just set the "OLEDB:System database=C:\\....\\security.mdw" in the connection string, that works, so the .mdw file should be ok. When I'm about to display the report, a tutorial told me to fill out all tables' ConnectionInfo with userID, password, serverName etc... but alas, the ConnectionInfo does not have an item called "SystemDB" or something like that, I just can't figure out how to pass the "security.mdw" path to this thing. Googled for over 4 hours, but I haven't been successful... So, when attempting to connect, there's always a logon window popping up, which is very annoying (and doesn't help). Does anyone know what to do? Thanks in advance, unshaven

Share this post


Link to post
Share on other sites
Advertisement
You should be able to specifiy user login and password for the Crystal reports page to your database so that your pages always have access to your database. In SQL, you set this when you set the connection string, like so:


Dim SQLConn as new SQLConnection("User ID=MyUser; Pwd=MyPassword;Initial Catalog=MyDatabase;Data Source=MyDatabaseIP")



You should be able to do the same thing with Access with something like this:


dim oldDbConn = New OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=MyDBPath;User ID=User;Password=Password")



Does that help you at all?

Share this post


Link to post
Share on other sites
erm, not really.

but I got the problem solved, meanwhile. at least temporarily hehe.


now my problem is, that set parameters (via SetParameterValue() ) won't show up in the report, dammit.

yes, I have linked the parameters to the fields like:
{Blahblah.Foo} = {?Foo}
in the selection expert.

but on the report only the static text gets displayed.


does anyone know what could bewrong?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!