は私が文書を開くときに私に未定義のエラーを与える結晶報告書を持って、以下、このタイプのエラーに遭遇いずれかは、コーディングされない:CrystalレポートXI + C#の.NETドキュメントの負荷の問題
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
///create instance of class first
ReportDocument rpDoc = new ReportDocument();
///load the report
rpDoc.Load(@"TicketingBasic.rpt");////------->>>problem is here
///pass the report to method for dataInfo
getDBInfo(rpDoc);
/// et the source for report to be displayed
CrystalReportViewer1.ReportSource = rpDoc;
}
protected static void getDBInfo(ReportDocument rpDoc)
{
///Connection Onject
ConnectionInfo cn = new ConnectionInfo();
///DataBase,Table, and Table Logon Info
Database db;
Tables tbl;
TableLogOnInfo tblLOI;
///Connection Declaration
cn.ServerName = "???????????";
cn.DatabaseName = "??????????";
cn.UserID = "?????????";
cn.Password = "????????????";
//table info getting from report
db = rpDoc.Database;
tbl = db.Tables;
///for loop for all tables to be applied the connection info to
foreach (Table table in tbl)
{
tblLOI = table.LogOnInfo;
tblLOI.ConnectionInfo = cn;
table.ApplyLogOnInfo(tblLOI);
table.Location = "DBO." + table.Location.Substring(table.Location.LastIndexOf(".") + 1);
}
db.Dispose();
tbl.Dispose();
}
}
決勝コードスニペットは
rpDoc.Load(Server.MapPath(@"TicketingBasic.rpt"));
ありがとうございました。
私は今が午前問題は、レポートでは、任意の手掛かり
私が今問題を抱えているのは、印刷や、.pdf、.xsl、.docなどの他のタイプへのエクスポートではないレポートです。 – Developer
page_initでレポートを読み込むとどうなりますか? – dotjoe
+1男性は受け入れられた答えがupvoteを得ないとき私を殺します。最近二度私に起こった。 – Dusty