> > I need to allow user to select which column they want subtotaled...is there a way to change the grouping expression in report form before report form is called? I have found the records in the report form (objtype = 9 and objcode = 3, in EXPR field) where field name is placed. I suspected I'd have to modifiy those records?
> >
> > Thanks,
> > Al
>
> You could do it that way but why not have one field in your result cursor that you always group on and modify your select statement to use that field.
> eg.
>
> DO CASE
> CASE nGroup = 1
> lcGroup = "Sex"
> CASE nGroup = 2
> lcGroup = "Weight"
> && etc. etc.
> ENDCASE
>
> SELECT Name, ;
> Address, ;
> Age, ;
> Sex, ;
> Weight ;
> FROM Person ;
> ORDER BY &lcGroup ;
> INTO CURSOR MyResultCursor
>
> Cheers,
> Jamie
>
jamie.osborn@foxite.comWhoops - should have been :
SELECT Name, ;
Address, ;
Age, ;
Sex, ;
Weight, ;
&lcGroup as MyGroup ;
FROM Person ;
ORDER BY &lcGroup ;
INTO CURSOR MyResultCursor
I got interupted and hit send without thinking !!!!!!
Cheers,
Jamie
jamie.osborn@foxite.com