By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,404 Members | 2,145 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,404 IT Pros & Developers. It's quick & easy.

dynamic "group by" change doesn't work

P: n/a
After running my code, group tree(the left section of the report)
changes but not the content in the report.
My code is
Private Sub btnModifyGrouping_Click(ByVal sender As System.Object, _

ByVal e As System.EventArgs) Handles btnModifyGrouping.Click

Dim myReport As New Report1()

Dim crGroups As CrystalDecisions.CrystalReports.Engine.Groups

Dim crGroup As CrystalDecisions.CrystalReports.Engine.Group

Dim crField As
CrystalDecisions.CrystalReports.Engine.FieldDefini tion

'Modify the group to use CustomerName rather than OrderDate

'Get the field to base the group on

crField = myReport.Database.Tables("Customer").Fields("Custo mer

'Access the group by traversing the groups collection

crGroups = myReport.DataDefinition.Groups

For Each crGroup In crGroups

If crGroup.ConditionField.Name = "Order Date" Then

crGroup.ConditionField = crField

End If


'Refresh the Viewer with the new report object

CrystalReportViewer1.ReportSource = myReport


End Sub

Any help will be appreciated.

Thanks a lot

*** Sent via Developersdex ***
Don't just participate in USENET...get rewarded for it!
Nov 17 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.