用C#可以调用SQL Reporting Services做出来的报表,然后再把它们转成PDF文件吗? 新手,希望高人指点下阿。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 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 strRptServer,报表服务器地址string strRptPath, 报表的路径就是Report目录string strRptName, 报表名称ParameterValue[] parameters,报表的参数 string type 报表的格式EXCEL,PDF把这个地址打开就是了 那是建一般的项目还是Winform之类的阿,还是ASP.NET项目阿我是新手,不好意思哈,问题多多。 这个都没有关系,URL地址就是你的Reportservers服务器地址 c# datagridview 底部合计 C# Winform 新手不知道选择哪种控件,求指点 datagridview新增行赋值的问题求助???? 为什么 Set 方法到底如何使用? 请各位大虾请点!(重酬)!谢谢! 有没有高手在的??? Remotin与TcpChannel连接的问题 为大家提供一个自由的专注于.Net技术的博客网站(直接注册,不用申请) C#生成PPT总结 模拟点击 GridView 在winform下,怎么显示特殊排列组合。。你们看看
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 strRptServer,报表服务器地址
string strRptPath, 报表的路径就是Report目录
string strRptName, 报表名称
ParameterValue[] parameters,报表的参数
string type 报表的格式EXCEL,PDF
把这个地址打开就是了