{"id":2358,"date":"2015-09-02T17:35:32","date_gmt":"2015-09-02T17:35:32","guid":{"rendered":"https:\/\/www.cmarix.com\/blog\/?p=1894"},"modified":"2026-04-07T12:53:35","modified_gmt":"2026-04-07T12:53:35","slug":"integration-of-ssrs-with-asp-net-web-application","status":"publish","type":"post","link":"https:\/\/www.cmarix.com\/blog\/integration-of-ssrs-with-asp-net-web-application\/","title":{"rendered":"Integration of SSRS with ASP.Net Web Application"},"content":{"rendered":"\n<p>SQL Server Reporting Services (SSRS) is a server-based report generator software of Microsoft. It serves to make, send and oversee reports utilizing programming languages like C# and Visual Basic. SSRS comes bundled with Microsoft SQL Server services. It provides immense benefit in terms of reducing the complexity of the reports which are extremely customized as well as are dealing with a very large volume of data.<\/p>\n\n\n\n<p>Following are the steps to integrate SSRS web service 2010 with the C# web application by creating the web service proxy class using Web Services Description Language (WSDL)<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><u>STEP 1:<\/u><\/h2>\n\n\n\n<p>Create a Visual studio 2012 Web application say MySSRSWebPortal.<\/p>\n\n\n\n<p>https:\/\/msdn.microsoft.com\/en-us\/library\/reportservice2010.reportingservice2010.aspx<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><u>STEP 2:<\/u><\/h2>\n\n\n\n<p>Open &#8220;<strong>Developer command prompt for VS2012<\/strong>&#8220;,<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"270\" height=\"226\" src=\"https:\/\/www.cmarix.com\/blog\/wp-content\/uploads\/2015\/09\/SSRSstep2.png\" alt=\"Developer command prompt for VS2012\" class=\"wp-image-7671\" \/><\/figure>\n<\/div>\n\n\n<p><strong>[Fig.2.0]<\/strong><\/p>\n\n\n\n<p>Go to the project root. Let say: <strong>D MySSRSWebPortalMySSRSWebPortal<\/strong><\/p>\n\n\n\n<p>Now create the web proxy for report server 2010 use the wsdl command to create this proxy class<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>(https:\/\/msdn.microsoft.com\/en-us\/library\/7h3ystb6(VS.80).aspx)<\/code><\/pre>\n\n\n\n<p><strong><u>Execute below command:<\/u><\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wsdl \/language:CS \/n:\"Microsoft.SqlServer.ReportingServices2010\" http:\/\/&lt;Server Name&gt;\/ReportServer\/reportservice2010.asmx?wsdl<\/code><\/pre>\n\n\n\n<p><strong><u>Incase you receive the following Error <\/u><\/strong><strong>:<\/strong><\/p>\n\n\n\n<p>The request failed with HTTP status 401: Unauthorized.<\/p>\n\n\n\n<p>It means you are required to pass the authentication parameter with the command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wsdl \/language:CS \/n:\"Microsoft.SqlServer.ReportingServices2010\" \/U:\"&lt;User name&gt;\" \/p:\"&lt;PassWord&gt;\" http:\/\/&lt;Server Name&gt;\/ReportServer\/reportservice2010.asmx?wsdl<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>After executing this command ReportingService2010.cs file is created on the root folder<\/li>\n\n\n\n<li>Microsoft (R) Web Services Description Language Utility<\/li>\n\n\n\n<li>[Microsoft (R) .NET Framework, Version 4.0.30319.17929]<\/li>\n\n\n\n<li>Copyright (C) Microsoft Corporation. All rights reserved.<\/li>\n\n\n\n<li>Writing file&#8217;<strong>D MySSRSWebPortalMySSRSWebPortalReportingService2010.cs<\/strong>&#8216;.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong><u>STEP 3:<\/u><\/strong><\/h2>\n\n\n\n<p>Add this file to the application. You will be able to see all the properties and methods for reporting service 2010 in this generated file. For more information about the reporting service 2010 methods and properties, visit the following link:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>https:&#047;&#047;msdn.microsoft.com\/en-us\/library\/reportservice2010.reportingservice2010.aspx<\/code><\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"387\" height=\"160\" src=\"https:\/\/www.cmarix.com\/blog\/wp-content\/uploads\/2015\/09\/step3.0.png\" alt=\"properties and methods for reporting service\" class=\"wp-image-7666\" srcset=\"https:\/\/www.cmarix.com\/blog\/wp-content\/uploads\/2015\/09\/step3.0.png 387w, https:\/\/www.cmarix.com\/blog\/wp-content\/uploads\/2015\/09\/step3.0-300x124.png 300w\" sizes=\"(max-width: 387px) 100vw, 387px\" \/><\/figure>\n<\/div>\n\n\n<p><strong>[Fig.3.0]<\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong><u>STEP 4:<\/u><\/strong><\/h2>\n\n\n\n<p>Now list all the reports on the server. Create one aspx page, let say Index.aspx<\/p>\n\n\n\n<p>Now to get the list of reports from the server the ReportingService2010 have &#8220;ListChildren&#8221; method, they give all the reports from the folder specified in the parameter. Now on page load create the reporting service object, set the network Credentials, and call the method, it will return the collection of catalog items. Create one repeater and bind with the collection.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"598\" height=\"467\" src=\"https:\/\/www.cmarix.com\/blog\/wp-content\/uploads\/2015\/09\/step4.0.png\" alt=\"step4\" class=\"wp-image-7668\" srcset=\"https:\/\/www.cmarix.com\/blog\/wp-content\/uploads\/2015\/09\/step4.0.png 598w, https:\/\/www.cmarix.com\/blog\/wp-content\/uploads\/2015\/09\/step4.0-300x234.png 300w\" sizes=\"(max-width: 598px) 100vw, 598px\" \/><\/figure>\n<\/div>\n\n\n<p><strong>[Fig.4.0]<\/strong><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img decoding=\"async\" width=\"598\" height=\"364\" src=\"https:\/\/www.cmarix.com\/blog\/wp-content\/uploads\/2015\/09\/step4.01.png\" alt=\"step4.01\" class=\"wp-image-7667\" style=\"width:598px;height:auto\" srcset=\"https:\/\/www.cmarix.com\/blog\/wp-content\/uploads\/2015\/09\/step4.01.png 598w, https:\/\/www.cmarix.com\/blog\/wp-content\/uploads\/2015\/09\/step4.01-300x183.png 300w\" sizes=\"(max-width: 598px) 100vw, 598px\" \/><\/figure>\n<\/div>\n\n\n<p><strong>[Fig.4.0.1]<\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong><u>STEP 4.1:<\/u><\/strong><\/h2>\n\n\n\n<p>Now if reporting server required the authentication then you have some change in code.<\/p>\n\n\n\n<p>Create one class let say <strong>ReportServerCredentials<\/strong> that inherit <strong>IReportServerCredentials<\/strong> interface (add Microsoft.Reporting.WebForms reference).<\/p>\n\n\n\n<p>Interface have two properties:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>ImpersonationUser<\/strong>: We don&#8217;t require this property so <strong>Set Return NULL<\/strong><\/li>\n\n\n\n<li><strong>NetworkCredentials<\/strong>: Set network credential for reporting service.<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"598\" height=\"306\" src=\"https:\/\/www.cmarix.com\/blog\/wp-content\/uploads\/2015\/09\/step4.1.png\" alt=\"Interface have two properties\" class=\"wp-image-7669\" srcset=\"https:\/\/www.cmarix.com\/blog\/wp-content\/uploads\/2015\/09\/step4.1.png 598w, https:\/\/www.cmarix.com\/blog\/wp-content\/uploads\/2015\/09\/step4.1-300x154.png 300w\" sizes=\"(max-width: 598px) 100vw, 598px\" \/><\/figure>\n<\/div>\n\n\n<p><strong>[Fig.4.1]<\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong><u>STEP 4.2:<\/u><\/strong><\/h2>\n\n\n\n<p>Also, interface has one method:<\/p>\n\n\n\n<p>GetFormsCredentials: we didn&#8217;t use this method.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"598\" height=\"207\" src=\"https:\/\/www.cmarix.com\/blog\/wp-content\/uploads\/2015\/09\/step4.2.png\" alt=\"GetFormsCredentials\" class=\"wp-image-7670\" srcset=\"https:\/\/www.cmarix.com\/blog\/wp-content\/uploads\/2015\/09\/step4.2.png 598w, https:\/\/www.cmarix.com\/blog\/wp-content\/uploads\/2015\/09\/step4.2-300x104.png 300w\" sizes=\"(max-width: 598px) 100vw, 598px\" \/><\/figure>\n<\/div>\n\n\n<p><strong>[Fig.4.2]<\/strong><\/p>\n\n\n\n<p>In Fig 4.0.1 replace service.Credentials = System.Net.CredentialCache.DefaultNetworkCredentials; To ReportServerCredentials reportServerCredentials = new ReportServerCredentials ();service.Credentials = reportServerCredentials.NetworkCredentials;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><u><strong>STEP 5:<\/strong><\/u><\/h2>\n\n\n\n<p>Run the index.aspx page. You can see the list of reports name. Success!<\/p>\n\n\n\n<p><a href=\"http:\/\/microsoft.com\" target=\"_blank\" rel=\"noopener noreferrer nofollow\">Microsoft<\/a> supplements its social database engine, SQL Server, with a few extra administrations that oversee diverse parts of big business knowledge and data handling, for example, information coordination, reporting, and analysis. While SQL Server can work freely of these administrations, they include esteem by improving SQL Server&#8217;s ability as a hearty data stage for creating far-reaching business insight arrangements.<\/p>\n\n\n\n<p>In subsequent series, we will be covering further customized &amp; advanced implementation of SSRS. With fast evolving technology, it is time to implement the <a href=\"https:\/\/www.cmarix.com\/microsoft-development.html\">latest Microsoft technologies<\/a> for your business.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>SQL Server Reporting Services (SSRS) is a server-based report generator software of [&hellip;]<\/p>\n","protected":false},"author":8,"featured_media":2422,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[22],"tags":[],"class_list":["post-2358","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-microsoft-technologies"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.cmarix.com\/blog\/wp-json\/wp\/v2\/posts\/2358","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.cmarix.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cmarix.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cmarix.com\/blog\/wp-json\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cmarix.com\/blog\/wp-json\/wp\/v2\/comments?post=2358"}],"version-history":[{"count":8,"href":"https:\/\/www.cmarix.com\/blog\/wp-json\/wp\/v2\/posts\/2358\/revisions"}],"predecessor-version":[{"id":45897,"href":"https:\/\/www.cmarix.com\/blog\/wp-json\/wp\/v2\/posts\/2358\/revisions\/45897"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.cmarix.com\/blog\/wp-json\/wp\/v2\/media\/2422"}],"wp:attachment":[{"href":"https:\/\/www.cmarix.com\/blog\/wp-json\/wp\/v2\/media?parent=2358"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cmarix.com\/blog\/wp-json\/wp\/v2\/categories?post=2358"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cmarix.com\/blog\/wp-json\/wp\/v2\/tags?post=2358"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}