I have created a group on the crystal report. Code works with one group on the report.
objRptDoc.DataDefinition.Groups.Item(0).ConditionField = objRptDoc.Database.Tables(0).Fields(rblGroupBy.SelectedValue)
Now I added another group on the report and need to dynamically assign the field to the second group. Below code doesnt work with the 2nd group. It just groups by the fields that I assigned during the design time.
objRptDoc.DataDefinition.Groups.Item(1).ConditionField = objRptDoc.Database.Tables(0).Fields(rblSubGroupBy.SelectedValue)
I'm I missing something.
Appreciate your help!!