I have a view on SQL server that has a heap of field, but there are five main fields that I group on.
Group1
Group2
Group3
Group4
Group5
The contents of these groups is:
Group1 contains: Product Categories
Group2 contains: Company names
Group3 contains: Department names
Group4 contains: Product names
Group5 contains: Groups on months purchased
Main data: Transactions
So the Group tree looks like this:
Product Categories
--Company Name
--Department
--Product names
--Months
-Transactions
Now depending on one report I want to display the Department and then I want to remove the Department from the report.
What I am doing now is I simply set the Group test to = "" and the group Supress formula is "If Group test = '' then surpress"
Now when I do this it surpress the Department group on the actually report but on the group tree it will still show the branch but no text.
What I want to do is remove this branch altogeter without modifying the underlying data.
So what I have tried to do is through Code remove the dispose of the group but this didnt seem to work. I also tried to depose of the entire grouping but this also didnt work.
'Load the report
objReport.Load(sReportName)
'Get the groups
Dim aCrystalGroups As CrystalDecisions.CrystalReports.Engine.Groups = objReport.DataDefinition.Groups
'Remove all the groups
objReport.DataDefinition.Groups.Dispose()
Does this help?
AGIMA - professional web hosting is our business.
AGIMA Computing