新手,希望高人指点下阿。

解决方案 »

  1.   


            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
    把这个地址打开就是了
      

  2.   

    那是建一般的项目还是Winform之类的阿,还是ASP.NET项目阿我是新手,不好意思哈,问题多多。
      

  3.   

    这个都没有关系,URL地址就是你的Reportservers服务器地址