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

Two Column Sort Order?

Status
Not open for further replies.

deeneyp

Technical User
Dec 5, 2002
4
US
I am trying to print out a duplex folded address book. Is there anyway to format a 2 column report with multiple pages to have column 1 an column 2 alternate between ascending and descending order on the same page? For example:

Page1
Column 1 = Names beginning with letter “Z” (this will be the left column of the page)
Column 2 = Names beginning with letter “A” (this will be the Right column of the page)

Page2
Column 1 = Names beginning with letter “B”
Column 2 = Names beginning with letter “Y”

Odd pages should have the 1st column in descending order and the 2nd in ascending order, while the even pages should be just the opposite.

I hope I’ve explained this correctly and would be extremely grateful for any and all advice.

Thank you kindly,
Pat
 
Well I was able to do this with a small glich. What I did was create two identical reports. One with the values sorted Ascending, one with them sorted Decending. I put the Alpha character field in a Header and in the Detail section also. I Sorted on the field in the Header, and set the Force New Page to Before Section. I made the Header field Visible property No so that it didn't show. Then I put them on a third report as subreports. It worked just fine except the first page was blank. On the rest, they sorted A/Z B/Y C/X right on down. I tried changing the Force New Page settings but I couldn't find anything that made the first page not blank.

Paul
 
Thanks for your help Paul. That does seem to work fairly well. I do not have the same problem with a blank page in the front of the book. However, the only problems I do see with this method is that there are now duplicate entries, thus, creating two boklets one collated behind the other and in reverse order. Not too much of a problem to separate them and make manual copies but, my boss wants to print them digitally on demand.

Hopefully, someone knows of some way to accomplish this with code.

Once again thank you kindly for your help.

Pat
 
Well, you could create two queries. On the criteria line for the Alpha Field, you could put <= &quot;M&quot; and in the second query you could put >=&quot;N&quot;. That would split your data in half. Then set the Record Source for the subreports to each query.
I'm sure there are a few ways to handle something like this. I doubt that you could actually code anything directly in a report that would accomplish what you want. You would have to build the Record Sources individually and then combine them into a single Object.

Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top