Connecting Tech Pros Worldwide Help | Site Map

Help: Grouping dates in query

  #1  
Old November 13th, 2005, 05:03 AM
John
Guest
 
Posts: n/a
I'm building a report where each row represents one month and its 1 to
5 weeks. A report query groups the source table date into a "month and
year" expression. A subreport links to the main report using the
query's "month and year" expression.

Problem is I can't figure out how to group the source table's dates
into a "Mmmm yyyy" and then link the subreport to the relevant week of
that "Mmmm Yyyy".

source table:
tbl_Promotion
Street_Date
Promo_Name

report output:
(line 1) November 2004, [week1] promos, [week2] promos...
(line 2) December 2004, [week1] promos...
(line 3) January 2005, ...

Note that "[week#] promos" is the linked subform showing the exact
promo date from the source table.

Any help is greatly appreciated!
  #2  
Old November 13th, 2005, 05:03 AM
John Winterbottom
Guest
 
Posts: n/a

re: Help: Grouping dates in query


"John" <soundneedle@hotmail.com> wrote in message
news:90fab935.0411011554.55f897dc@posting.google.c om...[color=blue]
> I'm building a report where each row represents one month and its 1 to
> 5 weeks. A report query groups the source table date into a "month and
> year" expression. A subreport links to the main report using the
> query's "month and year" expression.
>
> Problem is I can't figure out how to group the source table's dates
> into a "Mmmm yyyy" and then link the subreport to the relevant week of
> that "Mmmm Yyyy".
>[/color]

The best way to handle these sorts of temporal problems is often to build
and populate a separate calendar table to hold all the individual time
slices you are ever likely to need - then join to this table in your
queries. This gives much better performance than grouping on a calculated
value.

If you need some help with specific syntax post your simplified table
structure with some sample data and the output you need.


Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
Total short time fields in query Ecohouse answers 7 June 27th, 2008 08:23 PM
Query: Count (amount of (xDates later than GivenDate)) Jean answers 4 November 13th, 2005 01:41 PM
Query: Count (amount of (xDates later than GivenDate)) Jean answers 0 November 13th, 2005 01:38 PM
Empty report grouping Brian Coy answers 1 November 12th, 2005 05:22 PM