Home > C# on .NET > How to publish SSRS report to anonymous web site using ASP.NET (#2/3) – Buiding SSRS reports

How to publish SSRS report to anonymous web site using ASP.NET (#2/3) – Buiding SSRS reports

 

Pre-readings :

How to publish SSRS report to anonymous web site using ASP.NET (#1/3) – Prerequisites
https://fullsocrates.wordpress.com/2016/06/29/how-to-publish-ssrs-report-to-anonymous-web-site-using-asp-net-12-prerequisites/

 

Creating a Report Server Project in Visual Studio


After installing SQL server, you may have a SQL Server Data Tool which has Visual Studio IDE. The tool can be used, or Visual Studio also can be used to create ‘Report Server Project’ as below,

image

 

Let me create a new VS project, named ‘SSRS_WebAccess’ for this case. It uses Visual Studio 2010. Select a project template of ‘Business Intelligence’ > ‘Reporting Services’, and select ‘Report Server Project’.

image

After creation of project, click add > new item, in the Solution Explorer.

image

It’s about to create a new report, named ‘UserAgeReport.rdl’ as above.

 

image

Let me create a data source for this project (will be used in SSRS), name it dsTestDB as above. In the Visual Studio, select ‘Data Source’ in ‘Report Data’ view tto start configurations

FYI, you can create, and make this a shared data source, that can be used by all the reports to be created.

In ‘Data Source Properties’ screen, use ‘Embedded connection’, and edit a connection string by clicking ‘Edit’ button to edit and test connction string.

And, create a dataset in ‘Report Data’ view of Visual Studio as shown below,

image

You can use ‘Query Designer’, but let me enter just ‘select Name,Age from UserAge’ text for this simple case. In terms of other settings, default values can be used for this case.

 

image

For this article, let me use ‘Chart’ component, by drag and drop ‘Chart’ onto this report as below,

image

 

Now, drag ‘Age’ item from Datasets on left pane, and drop it to ‘Values’ box on Chart control
again, drag ‘Name’ item, and drop it to ‘Category Groups’ on Chart control as below

image

 

Build this report project, and start debugging(F5) to check if this report works fine

image

 

The report will be displayed as below (I hope… good luck)

image

 

Now, it’s required to deploy this report on SSRS. Before doing this, it’s required to edit ‘TargetServerURL’ as shown below,

image

The value of ‘TargetServerURL’ is from ‘Report Server URLs’ in ‘Reporting Services Configuration Manager’, mentioned in pre-reading.

In the solution explorer, deploy this report.

 

Reading reports in SSRS


After deploying the above report, open a browser, and access ‘Report Manager URL’  from ‘Reporting Services Configuration Manager’, in order to check data source, and the report created through the above VS project.

In this case, the URL of report manager, is ‘http://jchoi02:80/Reports’

image

Data Srouces, and SSRS_WebAccess(VS report project name) folders are shown.

Check data sources, and report that have beed created,

image

In foloder settings of SSRS_WebAccess report project, click ‘Security’, and allow ‘Browser’ permission for ReportWebUser account, mentioned in pre-reading, a Windows local account.

image

 

Click the ‘UserAgeReport’ to see the report in a web browser,

image

Now, we’re ready to dispaly this report in a aspx (ASP.NET) page, which wil be covered in a next post.

Related reference articles
How to publish SSRS report to anonymous web site using ASP.NET (#1/3) – Prerequisites
https://fullsocrates.wordpress.com/2016/06/29/how-to-publish-ssrs-report-to-anonymous-web-site-using-asp-net-12-prerequisites/

How to publish SSRS report to anonymous web site using ASP.NET (#3/3) – Buiding ASP.NET application
https://fullsocrates.wordpress.com/2016/06/30/how-to-publish-ssrs-report-to-anonymous-web-site-using-asp-net-33-buiding-asp-net-application/

Advertisements
Categories: C# on .NET

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: