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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report Grouping without sorting

Status
Not open for further replies.

dkwong

MIS
Dec 27, 2001
76
CA
I have a report that has three fields: Name, Year, and Amount. Currently, I have the report organized correctly with a Name header and a Year header. In the report prompt, I let the user choose if they'd like to sort the report by Name or Amount. Whatever they choose is specified in the report's Order By property. The problem is, when you specify grouping in a report (in the Sorting and Grouping window), you also have to pick either Ascending or Descending sort order. But I don't want a sort order specified in Sorting and Grouping window because it will override the Order By property that the user selects!! Is there a way around this or a better solution? I want to keep the Name header and Year header. Thanks!
 
Given you requirements as stated I believe the best way is to setup two reports each with your specialized Headers and OrderBy requirements. After the User Prompt for the Sort order then execute the appropriate Report depending upon their choice. Much simpler than trying to do this with code which I am not sure can be done given the requirements of the Sorting and Grouping choices.

Let me know if this works for you. Bob Scriver
 
You CAN open the report in design mode (hidden -of course) and set the group sort properties from the user's selections and then switch the report to normal view. It does require some small bits of code, but they are all here in htese forums, so just use the search facillity and 'mine' those nuggets for your use.

MichaelRed
m.red@att.net

There is never time to do it right but there is always time to do it over
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top