How to pass multiple parameters in crystal report from VB.Net
i want to pass 3 parameters (i have created the same in crystal report design view)
parameter names are: vBranchCode, vFromDate and vToDate
note: vfromdate and vToDate is for getting records between two date
How to do this? Please help me. regards, Sensa
private void Page_Load(object sender, System.EventArgs e)
{
if(!IsPostback)
{
CrystalReportViewer1.DataBind();
SetParameterFields("vBranchCode", "branch code");
SetParameterFields("vFromDate", "Some Date");
SetParameterFields("vToDate", "Some Date");
CrystalReportViewer1.RefreshReport();
}
}
protected void SetParameterField (string paramName, string paramValue)
{
ParameterField pfield = CrystalReportViewer1.ParameterFieldInfo[paramName];
ParameterDiscreteValue pval = new ParameterDiscreteValue();
pval.Value = paramValue;
pfield.CurrentValues.Add(pval);
}