parameter passing to crystal report object
by Ali Raza Zaidi on May 17, 2008
When you have to send parameter form asp.net code behind to crystal report then kindly used this syntex or statement to achieve the task
for example
ReportObjectVariable.SetParameterValue(ParmeterName,value)
for example if rpt is my report and i send value to customer key and objCustomer is my business object then the sample will be as follow
rpt.SetParameterValue(REPORT_SP_PARAMETER_CUSTOMER_KEY, objCustomer.MasCustKey)
More real word examples are as follow
rpt.SetParameterValue(REPORT_SP_PARAMETER_MONTH, CType(Request.QueryString.Item("Month"), Integer))
rpt.SetParameterValue(REPORT_SP_PARAMETER_YEAR, CType(Request.QueryString.Item("Year"), Integer))
rpt.SetParameterValue(REPORT_SP_PARAMETER_CUSTOMER_KEY, objCustomer.MasCustKey, "StatementHead.rpt")
rpt.SetParameterValue(REPORT_SP_PARAMETER_CUSTOMER_KEY, objCustomer.MasCustKey, "StatementFoot.rpt")
Comments on this entry are closed.