Sunday, December 31, 2017

SSRS 2017 and ReportViewer control in ASP.NET Web Application (.NET Framework)

1. Create a new ASP.NET Web Application (.NET Framework) Project using Visual Studio 2017
ReportViewer1
2. Select Web Forms Project
ReportViewer2
3. Run the application by pressing F5
ReportViewer2a
4. Create a new Reports.aspx page with Master Page.
ReportViewer3
5. Open Nuget Package Manager Console from Tools > Nuget Package Manager
ReportViewer4
6. Install the ReportViewerControl for WebForms using Install-Package Microsoft.ReportingServices.ReportViewerControl.WebForms
ReportViewer5
ReportViewer6
7. Type the following in the Reports.aspx.cs page.
<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=14.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
         <rsweb:ReportViewer ID="ReportViewer1" runat="server" ProcessingMode="Remote" Width="850px" Height="680px">
             <ServerReport ReportServerUrl="http://<your report server>/ReportServer"  ReportPath="/<folder name>/<rdl report name>"/>
         </rsweb:ReportViewer>
</asp:Content>
8. Run the application by pressing F5 and navigate to Reports.aspx page and you can see the Paginated Report served as shown below.
ReportViewer7
Is it possible to embed my Mobile Reports in Web Pages using my Report Viewer Control?
No, that is not possible. You can embed only Paginated Reports and if you try to embed Mobile Reports you will get “The operation you are attempting on item ‘<Report name>’ is not allowed for this item type. (rsWrongItemType)“ as shown below.
ReportViewer8
Technorati Tags: ,

Saturday, December 30, 2017

Comments in SSRS 2017

Business users have been looking for the feature of providing comments for Reports in SSRS. Until SSRS 2017 this has been mitigated by embedding the SSRS report in a .NET application and provide ability to input comments on a .NET UI and saving them.

With SSRS 2017, now comments can be directly provided for reports (Paginated and Mobile) using the SSRS Portal.

SSRSComments1

Comments can be added at Report level and these comments are stored in the Comments table in the ReportServer Database.

SSRSComments2

You can also add attachments as part of your comments and these attachments will be linked in the Catalog table in the ReportServer Database.

SSRSComments4

Security can be applied through the SSRS roles for comments also.

SSRSComments3

Technorati Tags: ,

Friday, December 29, 2017

Hide download menu in SSRS 2017

In previous versions of SSRS there is no way to hide the Download menu from the SSRS Portal which allows users to download Report Builder, Mobile Report Publisher applications. Normally Enterprises don’t want their users to download software and install in their laptops instead they normally push via Group Policy (GPO).

DownloadMenuBefore

In SSRS 2017, now you can hide the Download menu on SSRS Portal by connecting to the SSRS instance using SSMS and right-click on the SSRS instance and select Properties and click on Advanced and set Show Download Menu as false.

SSRSProperties1

Note: There is no need to restart the Report Server instance after the change.

DownloadMenuAfter

As shown in the above screenshot, no Download Menu appears now.

Technorati Tags: ,