title: how to set grouping in crystal reports using vb.net programatically?
body: <p>I want to grouping fields in crystal reports programatically using vb.net for dynamic reports generation.</p>
  
  <p>I am using vb.net 2005. i am trying to set report groupings of a crystal report at runtime based on user defined options. MSDN says this:</p>
  
  <p>Dim FieldDef As FieldDefinition FieldDef = Report.Database.Tables.Item(0).Fields.Item(comboBox1().Text) Report.DataDefinition.Groups.Item(0).ConditionField = FieldDef</p>
  
  <p>but error shows invalid group number</p>
  
  <p>how to solve this?</p>