Load a SSRS report on asp.net webpage application
Hi All I have created the SSRS reports, I want them to be loaded on a asp.net webpage using c#. I dont even need to pass the parameters just load the report . How can I call a SSRS report ? thanks a lot in advance.
December 18th, 2010 12:11pm

Consider using a ReportViewer control. This will also allow show the report in your web page. You can also provide custom UI for parameters, should the need later arise.Dan Guzman, SQL Server MVP, http://weblogs.sqlteam.com/dang/
Free Windows Admin Tool Kit Click here and download it now
December 18th, 2010 12:38pm

Create a new website. Add the report viewer to a form. Change the ProcessingMode to Remote I also change the AsyncRendering to FALSE Then assign two properites to the report viewer: ReportViewer1.ServerReport.ReportServerUrl ReportViewer1.ServerReport.ReportPath Report should then pop up in your page.
December 18th, 2010 10:33pm

Hi, As Dan suggested, we could use the ReportViewer control to display Reporting Service report in an ASP.net web site. The ReportViewer control can be configured to run in local processing mode which is used to display local report, or in remote processing mode to display the report on the ReportServer as rparge posted. For more information about the ReportViewer control, please refer to the link below: http://msdn.microsoft.com/en-us/library/ms251671(v=VS.100).aspx Thanks, Tony ChainTony Chain [MSFT] MSDN Community Support | Feedback to us Get or Request Code Sample from Microsoft Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Free Windows Admin Tool Kit Click here and download it now
December 21st, 2010 4:15am

Hi all Thanks for you replies. i want to load the report on click of the menus on a web page I am using the below given code - Please help me out ReportViewer1.ServerReport.ReportPath = "C:\Users\Administrator\Desktop\Projects\Report1" ReportViewer1.ServerReport.ReportServerUrl = new Uri(http://localhost/ReportServer); ReportViewer1.ProcessingMode = ProcessingMode.Remote; ReportViewer1.ShowParameterPrompts = false; ReportViewer1.Visible = true; ReportViewer1.ServerReport.Refresh(); Is my coe rite ? How to select the particular report? Thanks
December 21st, 2010 7:52am

Hi, Generally, in order to load the report in code, please refer to the steps below: 1. Click the smart tag which is located on the top left corner or the ReportViewer to show the ReportViewer Tasks pane. 2. In the Choose Report dropdown list, select <Server Report> to display report on the Report Server. 3. Type in the Report Server Url in the Report Server Url textbox like http://servername/reportserver. 4. Keep the Report Path textbox blank. 5. In the click event handler of the menu, type in the code below to specify the report dynamically: ReportViewer1.ServerReport.ReportPath = "/FolderName/ReportName"; ReportViewer1.ServerReport.Refresh(); After that, the ReportViewer would not display report until click the menu. Thanks, Tony ChainTony Chain [MSFT] MSDN Community Support | Feedback to us Get or Request Code Sample from Microsoft Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Free Windows Admin Tool Kit Click here and download it now
December 22nd, 2010 1:18am

Try ReportViewer1.ServerReport.ReportPath = "//Reports//Pages//Folder.aspx?ItemPath=%2fUAT+Bug+Fix&ViewMode=List//Wafering Bouncer Specs" Response.Write(ReportViewer1.ServerReport.ReportPath) ReportViewer1.ServerReport.Refresh() Catch ex As ApplicationException Response.Write(ex.ToString()) End Try I have written this much of code on button click, but I am getting error: The attempt to connect to the report server failed. Check your connection information and that the report server is a compatible version.The request failed with HTTP status 404: Not Found.
December 31st, 2010 7:35am

The not found error is likely because the ReportPath and/or ReportServerUrl properties are incorrect. I don't see the ReportServerUrl in your code snippet but the default url as Tony mentioned is http://servername/reportserver. Note that this is not the report manager url (default http://servername/reports). Typical example: ReportViewer1.ServerReport.ReportServerUrl = New Uri("http://MyServerName/ReportServer") For ReportPath, specify just the folder and report name rather than the link you see in the report manager browser. Based on your code, I think the correct value is: ReportViewer1.ServerReport.ReportPath = "/UAT Bug Fix/Wafering Bouncer Specs" Happy New Year, Dan Guzman, SQL Server MVP, http://weblogs.sqlteam.com/dang/
Free Windows Admin Tool Kit Click here and download it now
January 2nd, 2011 9:53am

The not found error is likely because the ReportPath and/or ReportServerUrl properties are incorrect. I don't see the ReportServerUrl in your code snippet but the default url as Tony mentioned is http://servername/reportserver. Note that this is not the report manager url (default http://servername/reports). Typical example: ReportViewer1.ServerReport.ReportServerUrl = New Uri("http://MyServerName/ReportServer") For ReportPath, specify just the folder and report name rather than the link you see in the report manager browser. Based on your code, I think the correct value is: ReportViewer1.ServerReport.ReportPath = "/UAT Bug Fix/Wafering Bouncer Specs" Happy New Year, Dan Guzman, SQL Server MVP, http://weblogs.sqlteam.com/dang/
January 2nd, 2011 9:53am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics