Setting connection string of the report viewer

I am using Visual Studio 2010 as the IDE,Microsoft SQL Server 2005 database as the backend database and the report viewer control to build reports. The report viewer currently reads the connection strings from the web.config file. I would like to encrypt the connection string in the web.config file and set the connection string of the report viewer dynamically. How can I go about doing this.

Thanks,
Aditya
LVL 1
pmac38CDSAsked:
Who is Participating?
 
pmac38CDSConnect With a Mentor Author Commented:
Nevermind I figured it out. The designer.cs file was missing in the solution. Once I added that I was able to set it.

Thanks for all your help,
Aditya
0
 
SAMIR BHOGAYTAFreelancer and IT ConsultantCommented:
Hi, you have to use the dataset.xsd for retrieving the data from database into your report file. And at the time of creating dataset you have to define the connection string.
0
 
pmac38CDSAuthor Commented:
Can you give more specific examples? So for example I have an encrypted connection string in the web.config. How do I set the connection string of the report viewer(remember I am using the report viewer control in Visual Studio 2010) dynamically.
0
 
pmac38CDSAuthor Commented:
Nevermind I figured it out. The designer.cs file was missing in the solution. Once I added that I was able to set it.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.