获取reporting services导出pdf的url的方法

public static string genRptUrl(string strRptServer, string strRptPath, string strRptName, ParameterValue[] parameters, string type)
{
string strUrl = "";

strUrl = strRptServer + "?/" + strRptPath + "/" + strRptName;
//for (int i = 0; i < parameters.Length; i++)
//{
// strUrl += "&" + parameters[i].Name + "=" + System.Web.HttpUtility.UrlEncodeUnicode(parameters[i].Value);
//}
strUrl += "&rc:Parameters=False";

if (type == "PDF")
strUrl += "&rs:Format=PDF&rs:Command=Render";
if (type == "EXCEL")
strUrl += "&rs:Format=EXCEL&rs:Command=Render";
return strUrl;
}

string urlpath =genRptUrl(SplendidCRM.Properties.Settings.Default.SplendidCRM_PDTS_ReportService_ReportingService, "HHD", "HHD Satisfaction Survey Template", parameters, "PDF");

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。