Report sorting function

A

amjjam

Hi,

I have a report titled, “Daily Communication Summary.†The Page Header
includes columns titled, “Comm Date by Month†and “Comm Date.†The data for
the Comm Date by Month is delivered as a Comm Date Header whose control
source is the expression =Format$([CommDate],â€mmmm yyyyâ€,0,0). In the actual
report it reads May 2009, for example. The control source for the Comm Date
is the actual date on which the communication took place. I’ve used the short
date format with an input mask of 99/99/0000;0;_. Output gets delivered in
the detail section of the report. The SQL query on which the report is based
includes the CommDate from the Communications table sorted in Ascending
order; so the Sorting and Grouping function shows ascending order for it too.

Here’s the problem. The report correctly shows the Communication Date by
month in ascending order: April 2009 is above May 2009, which is above June
2009 on the page reading from top to bottom. The actual communication dates
are listed in descending order with the latest communication listed first and
the oldest last for each person. So 5/22/2009 is above 5/18/2009, which is
above 5/3/2009, etc. I would like for these to be listed in ascending order
too. In other words, I want to read from top to bottom, oldest to latest,
5/3/2009 to 5/18/2009 to 5/22/2009. Can anyone tell me how to set the sort
order for the CommDate to affect both the Comm Date by Month and the Comm
Date columns the same way? Thanks, amjjam
 
F

Fred

You post indicate a litte confusion in a feww areas so it's hard to learn the
exact situation form it, but here are a few notes to get started:

Using the sort in the query to sort a report is unusual and sometimes causes
unintended / less predictable behavior. Your sorts/groups in report design
override it.

You can have a heirarchy of sorts but you can't have have conflicting sorts.
Your records will sort first by your top level sort, and then, only in cases
where the criteria for the higher level sort are equal, with that "equal"
group, it will sort by the next lower level sort.

To me, it appears that you need a simple one level sort by communication
date. And that everyting else is just display formtting.
 
A

amjjam

Hi Fred,

You've got my point exactly. I need one sort which produces the same results
in both columns where the CommDate is the basis for the sort. I want both
report columns to report in ascending order - from the oldest date to the
most recent date. Using only the sorting/grouping function and eliminating
any sort command in the report's SQL query should return ascending order to
both columns because they're both based on the same underlying data. It
doesn't. The Comm Date by Month gets reported in ascending order. The Comm
Date listing individual communications which have taken place during the
month are reported in descending order. I want the latter reversed so I can
read the progress of communication as it takes place over time in
chronological order. How can I govern the second column and make it match the
first column’s ascending report order? ~ amjjam
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top