hc175bys02117
October 6th, 2005, 05:55 PM
Hi, I need help dynamically create group footer through vb code. I have a report with just detail section and through vb, I was able to create grouping on the fly such as this:
Group Header #1
Detail
Group Footer #1
Here is the code snipets:
Dim cr_mReport As CRAXDRT.Report
Dim fldName As CRAXDRT.DatabaseFieldDefinition
With cr_mReport
Set fldName = .Database.Tables.Item(1).Fields.Item(i)
.AddGroup 0, fldName, crGCAnyValue, crAscendingOrder
End With
What I can't figure out is I need to create something like this below:
Group Header #1a
Group Header #1b
Detail
Group Footer #1a
Group Footer #1b
Basically, I need to create or repeat same group twice. I tried with current code and doen't work even if I tried repeating it. Is there any way to add a group with 1a and 1b such as
AddGroup 0a, fldName, crGCAnyValue, crAscendingOrder
AddGroup 0b, fldName, crGCAnyValue, crAscendingOrder
If anyone has any suggestions, I'd appreciated. Thanks
Henry
Group Header #1
Detail
Group Footer #1
Here is the code snipets:
Dim cr_mReport As CRAXDRT.Report
Dim fldName As CRAXDRT.DatabaseFieldDefinition
With cr_mReport
Set fldName = .Database.Tables.Item(1).Fields.Item(i)
.AddGroup 0, fldName, crGCAnyValue, crAscendingOrder
End With
What I can't figure out is I need to create something like this below:
Group Header #1a
Group Header #1b
Detail
Group Footer #1a
Group Footer #1b
Basically, I need to create or repeat same group twice. I tried with current code and doen't work even if I tried repeating it. Is there any way to add a group with 1a and 1b such as
AddGroup 0a, fldName, crGCAnyValue, crAscendingOrder
AddGroup 0b, fldName, crGCAnyValue, crAscendingOrder
If anyone has any suggestions, I'd appreciated. Thanks
Henry