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!

How to sort in group header that is grouped by number

Status
Not open for further replies.

DeafBug

Programmer
Jul 31, 2003
47
US
I did check the search and FAQ, I couldn't find what I need but I did pick up a few tips but they don't quite work. So here is my problem. Keep in mind that I am picking up someone else's work, who is not with us. I don't know how the creator of the report did this. But I have spent plenty of time toying around with it and no luck.

I have a VB program that allows the user to make selections of what they want on a report. Based on the selections, the (MS SQL) stored procedure will return a recordset, which is used in the report.

The report has two paramaters, GroupBy and SortBy. The report layout is like this:

Group1 : Business
Group2 : @GroupByString
Group3 : QuoteNumber
Group3a: Quote information like status, date, salesperson
Group3b: Quote information like customer address
Group3c: Quote information like customer address2
Group3d: Quote information like customer information
Detail line: All the itemized quote information.

The @GroupByString has values of Store, Date, and Salesperson. It is a formula that will group the report. Simple it works. No problems.

The SortBy parameter doesn't work. I know it is ideally used to sort by information in the Detail line. The @SortBy forumula is on the report, in Page Header and part of the Record Sort Order from A-Z sort button on the toolbar. The product management wants to sort by status of the quote, date the quote was created, and salesperson. All of those fields are in the Group3.

Group 3 is set to group by QuoteNumber. I changed the group order to the @SortBy formula. It shows that it works but it lumps up similar items in one quote number. Which is not what we want. If a salesperson created 4 quotes for 4 different customers on one day. And I select to sort by salesperson, it will group one quote number with the four different customers under one salesperson. If I select to sort but customers name, then I would get 4 separate quote numbers with 4 separate customers. It is not consistent every time. But I understand why it is happening.

The bottom line is that it is obvious that the Group 3 must be set to group by quote number so that it is like the individual quote order. But how can sort it.

Is this something that is beyond the capability of CR7? Yes we are using version 7 when I am screaming that we need to upgrade to 10, before was 9. Now 10 is out.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top