Question SQL connection problem for Report Viewers

CEB3088

Member
Joined
Feb 18, 2010
Messages
8
Programming Experience
1-3
I have created a windows forms application with a SQL server backend. I am populating textboxes, listboxes, treeviews using Sql queries. I attached my database to SQL Server on the ‘client’ machine and the above all populate fine both in the development environment and when deployed.

I am also populating Microsoft Report Viewers using typed datasets with parameters in localmode. All of the data is being gathered from the application to fill in the Report Viewers. These are also populating fine in the development stage. When I deploy to a client machine I am getting the following error message only for the Report Viewers:

Login failed for user ‘myDeveloperServer\Guest’.

myDeveloperServer is the name of the server the app was created on.

Clearly my problem is with the connection. Everything is seeing the ‘client’ machine except the Report Viewers. I was assuming they are using the same connection string but that does not seem to be the case and I cannot figure out why they would be looking for a different connection.

Can anyone point me towards what I am missing? I am logged in as administrator on the client machine. Thanks in advance.
 
The solution was that I had set up a seperate connection string when I made the Report Viewer forms. Not sure why I did it but that connection was pointing to the developer server. Easy fix once I figured out my error.
 
If your reports are pointing to a typed dataset, you shouldnt need a connection string at all since your passing it the filled dataset.
 
Thanks for replying Tom.

Maybe I am missunderstanding. The dataset is still being generated based on parameters supplied by the user. It is not fixed data, but it is fixed types of data. When a user makes choices, the data is being retrieved from the database and filling the dataset at that time. Thenthe dataset is being utilized by the Report Viewer. Would it not need the connection prior to filling the datasets?
 
No you can declare you dataset within you project and fill it with whatever data or filters you apply. At that point, your just passing the filled dataset to the report. The report then doesnt have to connect to any database at all, just display the connected data in the dataset.
 
Would it not need the connection prior to filling the datasets?

You need a connection string to connect to a database. You need to connect to a database to fill a dataset. You need a filled dataset to give to the report viewer, if the rv is operating in that mode.

Ergo, the rv doesnt need any conenction string when it is being given its data directly rather than getting it itself
 
Back
Top