locked
Crystal Report Set Parameters Problem RRS feed

  • Question

  • User-468333257 posted

    Crystal report runs when a button is clicked.

    When I run the page first time to set the parameters using the code below:

    the report show the parameters let's say param1=10, param2=12

    when I click the button for a second time, for new parameters , let's say param1=12, param2=24

    the crystal report shows the old parameters but the datasource is correct, I looked in debug mode, but it seems the param values are the new param values, then why is the crystal report not setting the parameters to the new parameters values?

     

    the reason i am doing this is because I get the parameters number of rows returned by datatable, searchterm, and other parameters from outside the crystalreport.CrysRpt is useable as there is CrysRpt.rpt

    m_rpt=new CrysRpt();
    CrystalReportViewer1.ToolPanelView=CrystalDecisions.Web.ToolPanelViewType.None;
    m_rpt.SetDataSource(dt);
    
    m_rpt.SetParameters("param1",param1);
    m_rpt.SetParameters("param2",param2);
    CrystalReportViewer1.Visible=true;
    CrystalReportViewer1.ReportSource=m_rpt;

    EnableDatabaseLogonPrompt="false" and ReuseParameterValuesOnRefresh="false" for this crystal report,dt is the datatable returned by a query.

    Wednesday, March 6, 2013 4:07 AM

All replies

  • User-468333257 posted

    Also, when I click on the next page of crystal report , the report source is not found

    Thursday, March 7, 2013 2:24 AM