簡體   English   中英

水晶報表工具欄按鈕不起作用

[英]crystal report toolbar button not working

當我單擊報告中的下一頁時,我確定還有另一頁出現此消息,並且沒有任何頁面出現消息

“請等待文件處理中”

這發生在所有工具欄按鈕上

圖片

    protected void Page_Load(object sender, EventArgs e)
   {


    Title = "عرض التقارير";
    if (Session["UserCode"] == null) Response.Redirect("~/Login.aspx");


    if (Request.QueryString["id"] != null)
    {
        oReport = new Cls_Report();
        oReportDocument = new ReportDocument();

        if (!Session["Condition"].Equals(null))
        {
            oReport.Condition = Session["Condition"].ToString();
            Session.Remove("Condition");
        }
        switch (Request.QueryString["id"])
        {

            case "1":
                oReportDocument.Load(Server.MapPath("~/reports/ar1.rpt"));
                oReportDocument.SetDataSource(oReport.ReportAllEmployees(false));
                break;

            case "2":
                oReportDocument.Load(Server.MapPath("~/reports/ar2.rpt"));
                oReportDocument.SetDataSource(oReport.ReportAlljpbs());
                break;

            case "1order":
                oReportDocument.Load(Server.MapPath("~/reports/ar1.rpt"));
                oReportDocument.SetDataSource(oReport.ReportAllEmployees(true));
                break;
            case "3":
                oReportDocument.Load(Server.MapPath("~/reports/ar3.rpt"));
                oReportDocument.SetDataSource(oReport.ReportAlljudges());
                break;
            case "4":
                oReportDocument.Load(Server.MapPath("~/reports/ar4.rpt"));
                oReportDocument.SetDataSource(oReport.ReportAlljudgesindestrict());
                break;

            case "5":
                oReportDocument.Load(Server.MapPath("~/reports/ar5.rpt"));
                oReportDocument.SetDataSource(oReport.ReportAlljudgesRank());
                break;

        }
        ReportViewer.ReportSource = oReportDocument;

    }


}

嘗試這個:

protected void Page_Load(object sender, EventArgs e) 
{ 

If (!IsPostBack)
{ 
    Title = "عرض التقارير"; 
    if (Session["UserCode"] == null) Response.Redirect("~/Login.aspx");  

    if (Request.QueryString["id"] != null) 
    { 
        oReport = new Cls_Report(); 
        oReportDocument = new ReportDocument(); 

        if (!Session["Condition"].Equals(null)) 
        { 
            oReport.Condition = Session["Condition"].ToString(); 
            Session.Remove("Condition"); 
        } 

        switch (Request.QueryString["id"]) 
        { 

            case "1": 
                oReportDocument.Load(Server.MapPath("~/reports/ar1.rpt")); 
                oReportDocument.SetDataSource(oReport.ReportAllEmployees(false)); 
                break; 

            case "2": 
                oReportDocument.Load(Server.MapPath("~/reports/ar2.rpt")); 
                oReportDocument.SetDataSource(oReport.ReportAlljpbs()); 
                break; 

            case "1order": 
                oReportDocument.Load(Server.MapPath("~/reports/ar1.rpt")); 
                oReportDocument.SetDataSource(oReport.ReportAllEmployees(true)); 
                break; 
            case "3": 
                oReportDocument.Load(Server.MapPath("~/reports/ar3.rpt")); 
                oReportDocument.SetDataSource(oReport.ReportAlljudges()); 
                break; 
            case "4": 
                oReportDocument.Load(Server.MapPath("~/reports/ar4.rpt")); 
                oReportDocument.SetDataSource(oReport.ReportAlljudgesindestrict()); 
                break; 
             case "5": 
                oReportDocument.Load(Server.MapPath("~/reports/ar5.rpt")); 
                oReportDocument.SetDataSource(oReport.ReportAlljudgesRank()); 
                break; 

        } 
        ReportViewer.ReportSource = oReportDocument;
        Session["myReport"] = oReportDocument;
    } 
}
else
{
    ReportViewer.ReportSource = (ReportDocument)Session["oReportDocument"];
}

}

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM