View Single Post
  #2 (permalink)  
Old August 30th, 2007, 06:01 AM
shakti_2505270 shakti_2505270 is offline
Authorized User
 
Join Date: Aug 2007
Location: mumbai, maharashtra, India.
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi, this is shakti. i have successfully run this code. hope u will all find it helpful.

// here iam passing the text property of DropdownListContol as
// paramter in CrystalReport10.


reportDocument.SetDataSource(dt);
ParameterFieldDefinitions parameterFieldDefinitions = reportDocument.DataDefinition.ParameterFields;
ParameterFieldDefinition paramEventName = parameterFieldDefinitions[0];
paramEventName.CurrentValues.Clear();
ParameterDiscreteValue paramDiscreteValue = new ParameterDiscreteValue();
paramDiscreteValue.Value = drpEventName.SelectedItem.Text.ToString();
paramEventName.CurrentValues.Add(paramDiscreteValu e);
paramEventName.ApplyCurrentValues(paramEventName.C urrentValues);

CrystalReportViewer1.ReportSource = reportDocument;[/red][/red]