Crystal report viewer asking parameters again when clicking on the tool bar

Posted on 2008-11-17
Last Modified: 2012-05-05
Dear all
I am working on an asp .net application in which I am using crystal report for showing reports. In my application everything works fine including the reports.
The real problem comes when I start clicking on the crystal report toolbar. If I click on any button on the crystal report tool bar like (Export, next page etc) it is asking parameters again.
Is there any way so that that the crystal repot viewer does not ask the parameter that I have already given .
I have also given true for the property reuseparametervaluesonrefresh.
Question by:Ikramfies
    LVL 100

    Expert Comment

    What code are you using?

    On what event is the code?


    Author Comment

    Im my application i am using push mechanism to show report,
    iam assigning the output of an sp to a dataset and then giving the dataset as report source .
    I had created an xml file and designed the report ,the xml file is having the same schema as the dataset

        private void showReport(string ReportPath, string ReportId)
            Master.BusinessLayer ObjBL_Master = new Master.BusinessLayer();
            DataTable CompanyDetails = new DataTable();
            DataTable dt = new DataTable();
            DataSet Ds = new DataSet();
            CrystalDecisions.CrystalReports.Engine.ReportDocument Crpt = new ReportDocument();
            Crpt.Load(Server.MapPath(".") + ReportPath);
            DataTable dtheader = new DataTable();
            dtheader = ObjBL_Master.GetCompanyDetails(CompanyId);
            dtheader.TableName = "CompmayDetails";
            switch (ReportId)
                #region SUPPLY
                case "27":
                    dt = ObjBL_Master.GetEmployeMaster(CompanyId);
                    Crpt.SetParameterValue("EmpName", "Employee Name");
                    Crpt.SetParameterValue("Language", CurrCulture);
                    Crpt.SetParameterValue("RecordCardNo", "Record Card No");
                    Crpt.SetParameterValue("ServiceNo", "Service No");
                    Crpt.SetParameterValue("ReportName", "Employee List");
                    Crpt.SetParameterValue("User", UserName); 
                case "1":// Supply Purchase Order
                    dt = BissLayer.RptSupplyPO(FinancialYear, CompanyId, Convert.ToInt16(cboComboOne.SelectedValue));
                    Crpt.SetParameterValue("User", UserName);
                    Crpt.SetParameterValue("Supplier", GetLocalResourceObject("Supplier").ToString());
                    Crpt.SetParameterValue("Address", GetLocalResourceObject("Address").ToString());
                    Crpt.SetParameterValue("PONo", GetLocalResourceObject("SupplyPo_PONo").ToString());
                    Crpt.SetParameterValue("Date", GetLocalResourceObject("Date").ToString());
                    Crpt.SetParameterValue("QuotNo", GetLocalResourceObject("SupplyPo_QuotationNo").ToString());
                    Crpt.SetParameterValue("POReqNo", GetLocalResourceObject("SupplyPo_POReqNo").ToString());
                    Crpt.SetParameterValue("CostOp", GetLocalResourceObject("SupplyPo_CostOp").ToString());
                    Crpt.SetParameterValue("FIns", GetLocalResourceObject("SupplyPo_FInsu").ToString());
                    Crpt.SetParameterValue("Total", GetLocalResourceObject("SupplyPo_Total").ToString());
                    Crpt.SetParameterValue("Code", GetLocalResourceObject("SupplyPo_Code").ToString());
                    Crpt.SetParameterValue("Desc", GetLocalResourceObject("SupplyPo_Desc").ToString());
                    Crpt.SetParameterValue("Qty", GetLocalResourceObject("SupplyPo_Qty").ToString());
                    Crpt.SetParameterValue("Rate", GetLocalResourceObject("SupplyPo_Rate").ToString());
                    Crpt.SetParameterValue("Amnt", GetLocalResourceObject("SupplyPo_Amnt").ToString());
            CrystalReportViewer1.ReportSource = Crpt;
            WebPanelReport.Expanded = false;

    Open in new window


    Author Comment

    the above function "showReport" iam clling on a button click
    LVL 100

    Accepted Solution


    Author Comment

    I solve the above problem by putting the repost parameter siigning codes out side !ispostback

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Suggested Solutions

    Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
    Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now