Minggu, 19 Agustus 2012

RE: [AccessDevelopers] Question on report sorting/grouping

 

Create a query with a SQL view like:
SELECT [Station ID], MIN(Seq) as MinSeq
FROM YourTableNameHere
GROUP BY [Station ID];
 
Name this query something like "qgrpStationMinSeq"
 
Then open your report in design view and open the record source query of the report in design view. Add the new query to the existing query and join the [Station ID] fields. Add the MinSeq to the fields display. Back in the report design set the primary sorting and grouping on MinSeq. Then sort on Seq.
 
Duane Hookom
MS Access MVP
 

To: accessdevelopers@yahoogroups.com
From: atkinson_joe@hotmail.com
Date: Sun, 19 Aug 2012 07:11:25 -0500
Subject: RE: [AccessDevelopers] Question on report sorting/grouping

 
Duane Hookom wrote:
> Are all of the Station IDs grouped together as shown in your example? For instance would NEW
> ever be located in more than one section of the report?

Station IDs would always be together.
 
> If the Station IDs are always together, you could create a totals query that groups by Station ID
> and includes the Minimum of the Seq. Add this to the report's record source and set the primary
> sorting/grouping on the Min of Seq. and then sort of Seq.

That sounds promising, but I'm brand new to Access, and I'm not sure I understand how to do what you're describing.  I've written a few queries, but all those to date just filter on a specific value or set of values.  Any additional details you'd care to add for the steps above would be gratefully received.

Thanks very much for taking the time to help!

Joe


__._,_.___
Recent Activity:

Please zip all files prior to uploading to Files section.
.

__,_._,___

Tidak ada komentar:

Posting Komentar