在安装程序中部署Reporting Services
来源:互联网 发布:粗花呢西服 知乎 编辑:程序博客网 时间:2024/05/16 07:29
本人用的方法是:单独得制作一个部署Reporting Services的exe文件,然后再安装程序中调用这个.exe文件即可。
Reporting Services部署:
private void Form1_Load(object sender, System.EventArgs e)
{
//服务器名称
string strServerName = System.Environment.MachineName;
//数据库相关信息,可以在安装的时候存在某个文件中或注册表中,然后在此来使用。(略)
string[] strServer = null;
//动态的创建.rss脚本文件(由于在文件中需要相关的数据库信息,这些信息是用户在安装时动态输入的,因此在这里需要动态的创建其脚本文件。脚本文件的内容在上面已经显示了,具体的方法就不在此列出)
CreateRss(strServerName,strServer[0],strServer[1],strPwd);
//报表部署
ProcessStartInfo startInfo = new ProcessStartInfo("rs.exe");
startInfo.WindowStyle = ProcessWindowStyle.Maximized;
string strCmd = " -i c://inetpub//wwwroot//" + strServer[0](安装时的虚拟目录) + "//ReportSystem//PublishCHDReports.rss"
+" -s http://" + strServerName(服务器名称) + "/reportserver"
+" -v parentFolder=ReportSystem" ;
startInfo.Arguments = strCmd;
Process.Start(startInfo);
}
/// <summary>
/// 创建脚本文件
/// </summary>
/// <param name="strServerName">服务器名称</param>
/// <param name="strPathName">虚拟目录</param>
/// <param name="struid">数据库所在服务器名称</param>
/// <param name="strPwd">数据库所在服务器密码</param>
private void CreateRss(string strServerName,string strPathName,string struid,string strPwd)
{
//(略)………………
}
在安装程序installer中调用:
/// <summary>
/// 安装报表
/// </summary>
/// <param name="strServerName">服务器名称</param>
/// <param name="strPath">虚拟目录</param>
private void RunExe(string strPath)
{
ProcessStartInfo startInfo = new ProcessStartInfo("c://inetpub//wwwroot//" + strPath + "//ReportSystem//ReportSetup.exe");
Process.Start(startInfo);
}
注:有关RS.exe的信息请查看 《如何利用RS.exe部署Reporting Services》
参阅:ms-help://MS.RSBOL80.2052/rsuiref/htm/cpu_rs_v1_5fxe.htm
- 在安装程序中部署Reporting Services
- 无法在Reporting Services 2005 配置管理器中安装数据库
- 在SharePoint中集成SQL reporting services
- 命令行部署Reporting services报表
- 在tomcat中部署安装Flex Data Services (转)
- 在表达式中使用报表函数 (Reporting Services)
- Reporting Services 中报表 乱码
- Reporting Services中参数说明
- 如何利用RS.exe部署Reporting Services
- Reporting Services
- Reporting Services
- Reporting Services
- Reporting services
- reporting services中主报表钻取子报表的在执行web请求时的问题
- 一步步学习Reporting Services(二) 在报表中使用简单的参数作为查询条件
- SQL SERVER 2005 Reporting Services 部署报表管理站点在 有主机头的站点上时的处理方法
- Reporting Services 最后“部署”时出错的解决方案
- 在.net安装程序中部署oracle客户端全攻略
- 如何利用RS.exe部署Reporting Services
- 调用nc做嗅探的一个bat shell 【ALLyeSNO】
- 关于找回密码的问题
- 父亲节
- BMP文件格式分析
- 在安装程序中部署Reporting Services
- 好久不见
- 论在mssql中public和db_owner权限下拿到webshell或者系统权限
- 执子之手,与子偕老。你同意么?
- 物理隔离网闸技术概述
- 别把你的天使弄丢了
- 设计模式精解-第四章-一个标准面向对象解决方案
- image 对象
- How to write make file?(转)