asp.net mvc combine with reporting service

reporting service 的配置:

Reporting service 安装配置过程

1. 安装sql server 2008 enterprise edition,并安装reporting service 组件。

2. 配置reporting service

打开reporting service配置面板

clip_image002

配置相应属性(web服务url,报表管理器url)

clip_image004

Reporting service 部署过程。

准备工作:

1. 安装sql server 2005/2008 reporting service。

2. 确保http://localhost:portno/reportserver ; http://localhost:portno/reports 可以访问。

步骤。

1. 打开一个已经开发好的报表解决方案。

2. 右键项目属性如下图所示,填写好TargetServerUrl。

clip_image006

3. 配置解决方案属性。

clip_image008

4. 检查输出信息,查看是否发布成功。

5. 右键我的电脑,选择管理选项,创建一个新用户,并将其加到reporting server 用户组里。

6. 浏览 http://localhost:portno/reports 使用administration登陆。

7. 在属性页中添加step 5中所创建的新用户,并给予相应权限。

clip_image010

asp.net mvc 使用report viewer控件host reporting service报表:

1. 新建asp.net mvc application。

2. 添加webform 页面

3. 给webform页面添加report viewer控件,并设置

ReportPath: /ASPMVCReports/tablelisting
ReportServerUrl: http://localhost/reportserver

代码

参考 Incorporating ASP.NET MVC and SQL Server Reporting Services

原文地址:https://www.cnblogs.com/philzhou/p/2020163.html