当前位置:编程学习 > C#/ASP.NET >>

web上面CrystalReport导出时提示Missing parameter values,是怎么回事

web上面的crystalreportviewer自带的那个导出,点击以后crystalreportviewer的内容会变成一片空白,上面出现一行字Missing parameter values,但是导出窗口里面的东西倒是对的,也可以打印,有什么办法可以让这行不提示,crystalreportviewer不变成空白呢,早上有次,当crystalreportviewer的内容只有两页的时候好像不会这样,后来有就开始提示了。下面是关于report的代码,请各位大大帮忙看看,谢谢~
    public static bool navFlag;
    protected void Page_Load(object sender, EventArgs e)
    {        if (!navFlag)
        {
            if (Session["reportDOC"] != null)
            {
                CrystalReportViewer1.ReportSource = Session["reportDOC"];
            }
        }
        else
        {
            navFlag = false;
        }
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        ShowReport();

    }
    private void ShowReport()
    {
        …………
        ReportDocument crReportDocument = new ReportDocument();
        crReportDocument.Load(Server.MapPath(".") + "/Report/Report.rpt");
        CrystalReportViewer1.ReportSource = crReportDocument;
        Session["reportDOC"] = crReportDocument;
        CrystalReportViewer1.ShowLastPage();
        CrystalReportViewer1.ShowFirstPage();
        CrystalReportViewer1.Visible = true;
    }
    protected void CrystalReportViewer1_Navigate(object source, CrystalDecisions.Web.NavigateEventArgs e)
    {

        navFlag = true;
        if (Session["reportDOC"] != null)
        {
            CrystalReportViewer1.ReportSource = Session["reportDOC"];
        }

    }
    protected void CrystalReportViewer1_ReportRefresh(object source, CrystalDecisions.Web.ViewerEventArgs e)
    {
        if (Session["reportDOC"] != null)
        {
            CrystalReportViewer1.ReportSource = Session["reportDOC"];
        }
    }
    protected void CrystalReportViewer1_Search(object source, CrystalDecisions.Web.SearchEventArgs e)
    {
        if (Session["reportDOC"] != null)
        {
            CrystalReportViewer1.ReportSource = Session["reportDOC"];
        }
    }
    protected void CrystalReportViewer1_ViewZoom(object source, CrystalDecisions.Web.ZoomEventArgs e)
    {
        if (Session["reportDOC"] != null)
        {
            CrystalReportViewer1.ReportSource = Session["reportDOC"];
        }
    }
    protected void CrystalReportViewer1_ReportPartBookmarkNavigation(object source, CrystalDecisions.Web.ReportPartBookmarkNavigationEventArgs e)
    {
        if (Session["reportDOC"] != null)
        {
            CrystalReportViewer1.ReportSource = Session["reportDOC"];
        }
    }
--------------------编程问答-------------------- 我真是帖子毒药啊 --------------------编程问答-------------------- 问题解决了。。。。。 --------------------编程问答-------------------- 你怎么解决的?我现在也有这问题
补充:.NET技术 ,  C#
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,