Connecting Tech Pros Worldwide Forums | Help | Site Map

Help: Grouping dates in query

John
Guest
 
Posts: n/a
#1: Nov 13 '05
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!

John Winterbottom
Guest
 
Posts: n/a
#2: Nov 13 '05

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