111,098
社区成员




public void ExportReport()
{
string ReportPath = ConfigurationManager.AppSettings["ReportPath"].ToString();
string ReportServerUrl = ConfigurationManager.AppSettings["ReportServerUrl"].ToString();
string UserID_ReportServer = ConfigurationManager.AppSettings["UserID_ReportServer"].ToString();
string UserPassword_ReportServer = ConfigurationManager.AppSettings["UserPassword_ReportServer"].ToString();
string lcid = System.Threading.Thread.CurrentThread.CurrentCulture.LCID.ToString();
ReportViewerCredential md;
if (Session["Credential"] == null)
{
md = new ReportViewerCredential(UserID_ReportServer, UserPassword_ReportServer, "");
Session["Credential"] = md;
}
else
{
md = Session["Credential"] as ReportViewerCredential;
}
rvProjectInfo.Reset();
rvProjectInfo.ServerReport.ReportPath = "/" + ReportPath + "/" + ExportType;
rvProjectInfo.ServerReport.ReportServerUrl = new Uri(ReportServerUrl);
rvProjectInfo.ServerReport.ReportServerCredentials = md;
ReportParameter[] parameter = Session["ReportParma"] as ReportParameter[];
rvProjectInfo.ServerReport.SetParameters(parameter);
rvProjectInfo.ServerReport.Refresh();
}