Quantcast
Channel: Crystal Reports
Viewing all articles
Browse latest Browse all 1507

Crystal Report Set Parameters Problem

$
0
0

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.


Viewing all articles
Browse latest Browse all 1507

Trending Articles