Dec 30, 2005 #1 Stephengb Programmer May 22, 2002 5 CA Hi, Does anyone know how to code to a group to change the sort order. I am in Visual Studio 2005. Thanks
Hi, Does anyone know how to code to a group to change the sort order. I am in Visual Studio 2005. Thanks
Jan 3, 2006 #2 MisterMo Programmer Mar 18, 2002 564 GB because the sort order is kind of hard coded when you create a group, one solution would be to create two formulas and a Parameter on your Report two formulas will look something like this: @Sort1: if {@Param} = 1 then {MyTable.FieldX} else '' @Sort2: if {@Param} = 2 then {MyTable.FieldX} else '' create two groups one for each formula with a different sorting, suppress both header and footer on the groups then pass a value from your VB interface to the @Param 1 or 2 depending on your criteria and Crystal will do the rest Mo Upvote 0 Downvote
because the sort order is kind of hard coded when you create a group, one solution would be to create two formulas and a Parameter on your Report two formulas will look something like this: @Sort1: if {@Param} = 1 then {MyTable.FieldX} else '' @Sort2: if {@Param} = 2 then {MyTable.FieldX} else '' create two groups one for each formula with a different sorting, suppress both header and footer on the groups then pass a value from your VB interface to the @Param 1 or 2 depending on your criteria and Crystal will do the rest Mo