Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sorting a group in code

Status
Not open for further replies.

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
 
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top