Reporting Service部署不是很方便,但可以通过程度来部署!

首先添加本地WebService的引用,
地址是: http://localhost/ReportServer/ReportService.asmx引用,可以把这个地址设置为动态方便以后修改。

创建对象:
private ReportingService rs = new ReportingService();
设置权限:
rs.Credentials = CredentialCache.DefaultCredentials;
创建文件夹:
rs.CreateFolder(tgParent, "/", null);
创建共享数据源:

Reporting Service自动安装程序,DataSourceDefinition dsd = new DataSourceDefinition();
Reporting Service自动安装程序,            dsd.CredentialRetrieval 
= CredentialRetrievalEnum.Store;
Reporting Service自动安装程序,            dsd.ConnectString 
= "data source=" + ServerIP + ";initial catalog=RiskH2000";
Reporting Service自动安装程序,            dsd.Enabled 
= true;
Reporting Service自动安装程序,            dsd.EnabledSpecified 
= true;
Reporting Service自动安装程序,            dsd.Extension 
= "SQL";
Reporting Service自动安装程序,            dsd.ImpersonateUser 
= false;
Reporting Service自动安装程序,            dsd.ImpersonateUserSpecified 
= true;
Reporting Service自动安装程序,            dsd.Prompt 
= null;
Reporting Service自动安装程序,            dsd.UserName 
= SqlUserName;
Reporting Service自动安装程序,            dsd.Password 
= sqlPassword;
Reporting Service自动安装程序,            dsd.WindowsCredentials 
= false;
Reporting Service自动安装程序,            
try
            }

上传报表文件:
Reporting Service自动安装程序,try

全部代码文件如下:
Reporting Service自动安装程序,using System;
Reporting Service自动安装程序,
using System.Configuration;
Reporting Service自动安装程序,
using System.IO;
Reporting Service自动安装程序,
using System.Net;
Reporting Service自动安装程序,
using ReportServiceSetup.RS;
Reporting Service自动安装程序,
Reporting Service自动安装程序,
namespace ReportServiceSetup
}

相关文章:

  • 2021-06-24
  • 2022-12-23
  • 2022-12-23
  • 2021-09-24
  • 2021-05-21
  • 2021-11-13
  • 2022-12-23
  • 2021-10-21
猜你喜欢
  • 2021-10-04
  • 2021-06-01
  • 2022-12-23
  • 2022-12-23
  • 2022-02-12
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案