난 스크립트 관리자를 사용하여 내 경로를 확인하려고 내 코드는 여기를 App_Code에 내 코드입니다 :내 코드에서 ScriptManager 오류가 발생 했습니까?
public ReportDocument ReportCon(string path)
{
ReportDocument cryRpt = new ReportDocument();
ConnectionInfo info = new ConnectionInfo();
TableLogOnInfo crtableLogoninfo = new TableLogOnInfo();
Tables CrTables;
info.ServerName = "192.168.1.200";
info.DatabaseName = "Track4L";
info.UserID = "Developers";
info.Password = "[email protected]";
ScriptManager.RegisterStartupScript(this, typeof(Page), "test", "alert('" + path + "');", true);
cryRpt.Load(path);
CrTables = cryRpt.Database.Tables;
foreach (CrystalDecisions.CrystalReports.Engine.Table CrTable in CrTables)
{
crtableLogoninfo = CrTable.LogOnInfo;
crtableLogoninfo.ConnectionInfo = info;
CrTable.ApplyLogOnInfo(crtableLogoninfo);
}
return cryRpt;
}
하지만 난 오류를 다음 얻을 "System.Web.UI '에 가장 적합한 오버로드 된 메서드 일치 오류가 발생했습니다. ScriptManager.RegisterStartupScript (System.Web.UI.Page, System.Type, string, string, bool) 'D : \ DMS \ DocumentManagement \ Track4L \ App_Code \ ReportConnection.cs 27 13 D : ... \ Track4L \ "
나는이 문제가
그냥 추측하지만, 나는 this'는'System.Web.UI.Page'를 참조하지 않는'걸거야. – Tim
@Tim 그러면 내가해야 할 일 –
@Adil이 권장하는 것을 수행하십시오. 'ReportCon'가 호출되어'Page' 인수와 경로 인수를 취하는 코드의 모든 위치를 업데이트해야합니다. – Tim