≡ Menu

parameter passing to crystal report object

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
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")



{ 0 comments… add one }

Leave a Comment