Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dynamic Grouping
Message
From
08/11/2004 09:42:50
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
08/11/2004 09:06:37
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Environment versions
Visual FoxPro:
VFP 6 SP5
Miscellaneous
Thread ID:
00959120
Message ID:
00959131
Views:
17
This message has been marked as a message which has helped to the initial question of the thread.
I don't know whether there is a simpler way, but you could create a UDF, which returns a value. The group expression would invoke this UDF. For example:

Before running the report:
private Group_Field
do case
case ...
  Group_Field = "Field1"
...
In the report group expression:
GroupExp_Report1()
The UDF:
FUNCTION GroupExp_Report1
  return eval(Group_Field)
ENDFUNC
>Hi All,
>
>I was wondering if it is possible to create Dynamic Data Groupings in my report?
>
>I would like to store the field name into a Public Variable then use it as my Group Expression.
>
>
IIF(gnLevel1 == 1, &gcFieldGrp, "")
>
>gnLevel1 && Public Flag that indicates if the grouping should be applied.
> gcFieldGrp && Name of the field to base the grouping on.
>
> gcFieldGrp = IIF(Something, "Pers_No", "Proj_No")
>
>TIA
>Mike
>
>P.S. VFP6 SP5
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform