Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Accessing Database with Crystal report incorporated in VS2008

Posted on 2011-03-03
11
Medium Priority
?
354 Views
Last Modified: 2012-08-14
Hi,

I have a problem accessing the password protected database with some crystal reports which i use in my Windows app (written in C#).

The thing is that when i open a crystal Report it asks me for the password for the db, although i set it in the wizard when creating the connection. It only asks the first time after starting the app, after having entered the correct password all CR's open without the prompt.
When i check the properties window for the CR the field behind Password is empty. I thought it might be a security precaution, but in the end the CR does ask for the authorization when opened up, so my guess now is that the password isn't saved.
Is there a (secure) way to hardcode the password somewhere (like i did in the connectionString for the app itself), and if so, where?

Any help is heartily welcome...
0
Comment
Question by:Daaf1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 3
11 Comments
 
LVL 85
ID: 35026947
Have you tried building a new connection in CR?

0
 

Author Comment

by:Daaf1
ID: 35028143
Over and over again.
My password just doesn't seem to stick...

I'm gonna try and make a new CR and see if at the creation there is a checkbox to check.
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 35028494
Crystal doesn't save the password for security reasons.  If it did then anyone who got a report file could gain access to the database.

As far as I know there is no way to save the password.

mlmcc
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 

Author Comment

by:Daaf1
ID: 35030309
That's what i thought aswel, but why then is there the whole secure connection part in the connection setup?
Maybe i need to secure my db differently, it's just that It isn't my field of expertise.
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 35032609
What do you mean the Secure Connection part?

What we did was use the Integrated Security but that was with MS SQL.

When you call the report from an application you could pass a userid and password.
Another way would be to build the report against a dataset and have the application get the data and pass it to the report

mlmcc
0
 

Author Comment

by:Daaf1
ID: 35034253
I like that idea, to link the CR to the DataSet.
Just tried it out, but the fields don't show in the Report.

Any idea's?
0
 

Author Comment

by:Daaf1
ID: 35034508
So i'm fiddling with the DataSet connection to the CR, but when i drag a DB fields into my Report it doesn't even show when debugging.
Where do i fail?
0
 
LVL 101

Accepted Solution

by:
mlmcc earned 2000 total points
ID: 35037188
0
 

Author Comment

by:Daaf1
ID: 35039786
Wow, thanx Mlmcc!
My kind of tutorial! I'm gonna go and try this out tomorrow.
Let you know soon as soon as I'm done...
0
 

Author Comment

by:Daaf1
ID: 35057080
Hi... Sorry for the delay.

I'm struggling with the tutorial now.
Although it is very easy to understand, the insertion in my existing project is a bit more difficult.
I am encountering several problems which are i think due to the fact that my solution is made up of 3 layers (projects) which are connected by reference, so that the layout layer (with all my forms) is not directly connected to my Data layer (where all connections with the database take place), but are separated by a relay layer.
It's a bit of a puzzle, to find out where i can make openings for the reports to connect to the Schema.
This message just to report that i am working on it, that i have not (yet) abandoned the subject.

Daaf1
0
 

Author Comment

by:Daaf1
ID: 35092761
Finaly got it done!!!

Thanx mlmcc! Her's your well earned points, sorry for the wait...

Needed some time to get the idea that i needed to pass the whole Dataset to the CR. And then i took some time to figure out how to get the path right to get the Dataset, safely, to that Report.

After hard work and brain crunching the reward is the biggest!!!

Thanx EE!
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question