ReportViewer and DataSets - Error while Installing on Other PC - c#

Using: Microsoft Visual Studio 2010. SQL Server 2008. Report Viewer
2010
Hey everybody, hope you doin' great!, i'm actually having a hard time going through a complicated moment at my thesis developing.
Okay, let me explain it to you.
I designed reports on my software, on localhost they work perfectly but when I tried installing the software on other computer I'm getting an error when trying to open one of the reports.
The error is not controlled by the application, it says something like
"Error related to the network while trying to stablish a connection with the SQL Server, the server couldn't be found or it was unreacheable."
The thing is, on the form I got the report I'm Filling the ReportViewer with this.
this.UsuariosAtendidosTableAdapter.Fill(this.DB_SUBSIDIOS_MUNICIPALIDADDataSet.UsuariosAtendidos, fecha1, fecha2);
this.reportViewer1.RefreshReport();
DB_SUBSIDIOS_MUNICIPALIDAD is my Database.
UsuariosAtendidos is my Procedure.
fecha1, and fecha2 are the two needed fields to fill the stored procedure.
Moving on, on my RDLC I'm calling the stored procedure from a DataSet which provides of all the procedures.
The thing is that when installing it on other computer it seems like it CANT or its UNABLE to access that DataSet because its on my computer.
So the questions are:
How am I supossed to fill the report without using a local dataset?
PS: Sorry for my bad english, isn't my fluent lenguage.

You should also have a SQL Server instance with the database of interest on this another computer or you should change the connection string to point to your original computer, these two computers should be on the same network, SQL Server on the first computer must be started and available

Related

Report viewer shows blank report

I have never used reports before and my knowledge is really limited. I have developed an application using C# and SQL Server 2012 Express and one of the features is to show customers account in ReportViewer.
This report gets its data from a stored procedure and for now everything works fine, but the client wants it to work on the desktop of several different machines.
So I made one machine work as a server with the others connecting to it by router and everything in the application works fine except the ReportViewer shows only a blank white report (but only on the client machines -- not the server)
I also tried updating the dataset's connection string in app.config.
What should I try next?

How to create a C# program setup wizard, containing a SQL Server connected database?

I am developing a C# Windows Forms project in Visual Studio which contains a SQL Server database.
Everything is working great I have connection string saved in Properties.Settings... but when I install program on a different computer, it doesn't have data from database.
Of course I know that I have to add database to the other computer too, but can I do it without installing complete SQL Server?
Here is a picture of my connection string in settings.
I know that there are a lot similar questions like this out there, but more than I am reading those answers more lost I am.
Thank you for every clean explanation and answer or just link on great tutorial!
Have a nice day!

Winform Crystal reports using local files

I have an application which is connected to a game server.
Each time it receives an item, it shows this as "User gave you item at . Transaction ID# 1kl9d4ns."
I would like to store this data in some sort of lical database file (not using an SQL server), and then be able to generate a report (crystal report or any other reporting module). Preferably exportable to PDF files.
Is this at all possible?
All examples I find are using some sort of database connection.
Could anyone please point me in the direction of a good tutorial that works with local files instead of connecting to an SQL server?
Thanks

Unable to save data in sql server 2005 through c#.NET coding

I have a very unusual problem. I made a project in C#.net in vs 2008 and SQL server 2005.
I have two DB to use.
Now, the problem is whenrunning the project on my PC it works fine, but when i install on users PC, through setup, im getting a exception handler error , when im trying to save any data in either of the DBs. However i tried to insert data through INSERT INTO coomand in sql it works fine. And i have no problem in retrieving data.
So any one can help please do.
Thanks in advance
How are you specifying your connection to the database(s)? If you're doing windows authentication, most likely your user's accounts don't have permissions on the database. It could also be that they can't see the database from where they are on the network.
I'd start by pinging the DB server from the user's machine to make sure they can even access the server.

How do I create a SQL server database which is not Sql server compact?

I have Visual Studio 2010, Sql Server 2008, Sql Management Studio and pretty much everything installed.
I can create a local database with Sql Server Compact and Windows authentication just fine. Now I'm a little perplexed, because I still have no idea how all of this works. I didn't use any connection strings, passwords or anything. While coding, I can clearly see that the DataContext class in C# when using LINQ to SQL needs a connection string. How can I test this on my own pc? Is it unreasonable that I want to test this kind of stuff throughly while not currently having hosted services on the Internet yet? And often times, I don't have so much access to the server when using shared hosting, so I can't learn very fast and not fully.
When trying to connect to different services through SQL management studio and Windows authentication and my local pc, I just get a connection error.
Error Number: 2
Severity: 20
State: 0
I don't think that the database engine is the appropiate service to connect to anyway based on what I read, I just thought that you would like to know what I tried.
I checked, and sqlservr.exe is running in the processes in the task manager. Also SQL Server VSS writer.
Basically, I would like to learn how SQl Server databases work. The books, wikipedia and msdn on this topic just enumerate a lot of cryptic services like the database engine, analytical services etc...
I can't find any basic information on how to actally create, connect and program with a real database on my own pc. I'm not even sure whether I'm supposed to work like this?
I read that Sql server compact only supports databases up to 2mb.
Is it not possible for me to work with "the real thing" on my local pc?
I'm very very new to all this, and I'm not getting anywhere with databases...
Thanks for any help!
See: no option for a full sql database.
Server seems to run, but why does it say Server express? I'm sure I have the full one.
Installing Visual Studio generally installs a SQL Server instance on your local machine.
It is acceptable to work with "the real thing" on localhost, since when changing server, only the connection string has to change.
You will have to install the right version of SQL Server Management Studio Express (SSMSE) for your version of SQL Server so that you can start it, authenticate and work with SQL Server.
You may also connect to your SQL Server using the Server Explorer windows from within Visual Studio. Menu View|Server Explorer, or else [CTRL]+[W], [L] to view it. Then, you may connect to a data server from this window using the connection buttons on top of it.
Click View|Server Explorer, to view it;
Server Explorer, click "Connect" button located on top;
Choose a data source dialog, Data Source, click Microsoft SQL Server;
Data Provider, select .NET Framework Data Provider for SQL Server, click [Continue];
Add a connection dialog, Server name, select the server you want to connect to (your [local machine name]\SQLEXPRESS might appear, or something alike);
Server connection, choose Windows Authentication;
Database connection, select the database you want to connect to, and click [Test Connection];
If the test succeeds, click [OK], and you're done!
Disclaimer
The names of menus or window title may differ a bit, but you should get it done anyway. That is because I have off my head translated from French to English what it actually says in French, working with a French Visual Studio.
EDIT #1
After having taken an eye out your screenshot, I would simply say that you only have to select Database Engine to connect to your SQL Server instance, by selecting the right server on which you wish to work.
The full database option you're looking for is Database Engine which designates a full SQL Server.
The others are for the different services such as:
SQL Server Reporting Services (SSRS);
SQL Server Integration Services (SSIS);
SQL Server Analysis Services (SSAS).
Feel free to ask further assistance as needed. =)

Categories