How do I create groups at runtime thru VB 2003

I need to give the enduser 5 options to choose to group on. For example they could group by Salesman ID and product category or vice versa. Or Salesman and the state the product was shipped to. And the report would just have a static detail band.

Thanks

[255 byte] By [PhillipPutzback] at [2008-2-22]
# 1
Hello Phillip,

You can't create a group at runtime but you can change a group at runtime. So in the report design you would need to have the groups created and then at runtime you can change what the grouping is on.

The one challenge with this scenario is that the number of groups can't be changed - so if your user only wants 1 group and you have 2 defined in the report they will still get 2 levels of grouping. You could get around this by having different reports and each report would have a different number of groups defined in it.

Changing the grouping at runtime is detailed in an article on the MSDN site:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/crystlmn/html/crtskgroupfieldsruntimecustomization.asp

Keith - Business Objects

KeithThomson at 2007-9-8 > top of Msdn Tech,Visual Studio,Crystal Reports for Visual Studio...

Visual Studio

Site Classified