Click here to Skip to main content
15,897,518 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am making restaurant management system using C# and SQL Server. The big problem is that the requirements of the client are, he wants to print the slip of what dishes he will deliver at his counter. Ergo, the question comes here: may I use SQL Server Reporting to get the printout? If SQL Server Reporting, then how do I connect it to WinForms(any tutorial). If not, then how do I get to print out the slip of delivered dishes?

What I have tried:

I've watched the tutorials of SSRS, but I am confused how to connect SSRS(report) to my stored procedure and how to show it on the Winfroms application. I'm totally confused.
Posted
Updated 12-Feb-16 23:55pm
v2
Comments
RDBurmon 12-Feb-16 21:49pm    
Sql server reporting needs separate license. Why don't you use Visual Studio data report
Its free and easy unless you have to do some advance reporting
Member 12045962 13-Feb-16 6:03am    
Yes, you are right. And I'm going to implement Solution 1... :)

With the help of simple gridview and sql you can print your hotel bill, no need use to use SSRS for that.
SSRS is mainly used for following things
1. Parameterization
2. Can export to different formats like pdf, excel, word, csv, xml etc.
3. Data warehousing
4. Live data display using auto refresh property.
I think gridview and sql is enough to accomplish your requirement
look at below link for more detail
How to Print Invoice using C#?[^]
 
Share this answer
 
Comments
Member 12045962 13-Feb-16 6:02am    
Thanks, a ton for solving my problem.
Go through below URL how to call StoredProcedure from SSRS:

SSRS Report For Parameterized Stored Procedure

Next how to call SSRS from Windows application:

First add Reportviewer control to your windows form and rptViewer is ID attribute of control.

Once you generate SSRS report, you need to host the report in your server. And there you will get an URL and browsing that URL you can see the report. Here that URL will going to use in ReportServerUrl property in following code:
C#
rptViewer.ProcessingMode = ProcessingMode.Remote;
rptViewer.ServerReport.ReportServerUrl = new Uri(@"http://test-pc/ReportServer2014");
rptViewer.ServerReport.ReportPath = "physical path";
rptViewer.RefreshReport();

Secondly if SSRS report developed then it is OK. However if you are going to develop then you can use RDLC report in windows application. SSRS is mostly for reporting purpose which contains lots of reports. If you are dealing with 5-10 reports then no need to use SSRS rather use RDLC report. Go through below links if you want to implement RDLC in windows aplication:

SSRS Series Part I: Various ways of Report creation, deployment and invocation[^]

RDLC Report in Windows Forms (WinForms) Application using C# and VB.Net[^]
 
Share this answer
 
v3
Comments
Member 12045962 13-Feb-16 5:59am    
Thanks, a ton for your help.
Member 12045962 13-Feb-16 6:01am    
I'll use this way when will create the SSRS... Again thanks .. :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900