(Msg. 1) Posted: Fri Sep 05, 2008 4:28 pm
Post subject: How to show a date range in a report Archived from groups: microsoft>public>access>reports (more info?)
I have a table of event names ,dates and locations. I can run a report that
shows all these fields; but some events run 2-3 days long and I need to be
able to show the event name, location and date range in one line instead of
multiple rows.
For Example, I now have a report that shows this:
January 1, 2008 |Party #1| Amy's House
January 2, 2008 |Party #1| Amy's House
January 3, 2008 |Party #1| Amy's House
And want a report to show this:
January 1, 2008 - January 3, 2008 | Party#1 | Amy's House
How do I achieve this?
Thank you for your help in advance!
(Msg. 2) Posted: Fri Sep 05, 2008 4:35 pm
Post subject: RE: How to show a date range in a report [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
Use a totals query like this --
SELECT [event names], [locations], Min([dates]) As Event_Start, Max([dates])
As Event_End
FROM YourTable
GROUP BY [event names], [locations];
--
KARL DEWEY
Build a little - Test a little
"omshanti" wrote:
> I have a table of event names ,dates and locations. I can run a report that
> shows all these fields; but some events run 2-3 days long and I need to be
> able to show the event name, location and date range in one line instead of
> multiple rows.
>
> For Example, I now have a report that shows this:
> January 1, 2008 |Party #1| Amy's House
> January 2, 2008 |Party #1| Amy's House
> January 3, 2008 |Party #1| Amy's House
>
> And want a report to show this:
> January 1, 2008 - January 3, 2008 | Party#1 | Amy's House
>
>
> How do I achieve this?
> Thank you for your help in advance!
>
(Msg. 3) Posted: Fri Sep 05, 2008 9:17 pm
Post subject: RE: How to show a date range in a report [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
Thanks Karl. You're awesome!! I have one more issue to deal with in the same
report. Your answer definitely has me in the right direction. Now I have an
issue of having the same exact events and locations but later in the year.
Using the qry you advised it now captures the date range for all the dates
with that specific event name and location.
The report is now showing :
January 1, 2008 - March 8, 2008 | Party#1 | Amy's House
I would like the report to show this:
January 1, 2008 - January 3, 2008 |Party #1| Amy's House
March 8, 2008 |Party #1 | Amy's House
Thanks again!
"KARL DEWEY" wrote:
> Use a totals query like this --
> SELECT [event names], [locations], Min([dates]) As Event_Start, Max([dates])
> As Event_End
> FROM YourTable
> GROUP BY [event names], [locations];
> --
> KARL DEWEY
> Build a little - Test a little
>
>
> "omshanti" wrote:
>
> > I have a table of event names ,dates and locations. I can run a report that
> > shows all these fields; but some events run 2-3 days long and I need to be
> > able to show the event name, location and date range in one line instead of
> > multiple rows.
> >
> > For Example, I now have a report that shows this:
> > January 1, 2008 |Party #1| Amy's House
> > January 2, 2008 |Party #1| Amy's House
> > January 3, 2008 |Party #1| Amy's House
> >
> > And want a report to show this:
> > January 1, 2008 - January 3, 2008 | Party#1 | Amy's House
> >
> >
> > How do I achieve this?
> > Thank you for your help in advance!
> >
(Msg. 4) Posted: Mon Sep 08, 2008 1:05 pm
Post subject: RE: How to show a date range in a report [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
Try using two more queries - Select query named OtherDates and union query.
SELECT [event names], [locations], [dates] As Event_Start, [dates] As
Event_End
FROM YourTable INNER JOIN [TotalsQuery] ON [YourTable].[event names] =
[TotalsQuery].[event names] And [YourTable].[locations] =
[TotalsQuery].[locations]
WHERE [dates] Not Between [TotalsQuery].[Event_Start] And
[TotalsQuery].[Event_End];
SELECT [TotalsQuery].[event names], [TotalsQuery].[locations],
[TotalsQuery].[Event_Start], [TotalsQuery].[Event_End]
FROM [TotalsQuery]
UNION SELECT [OtherDates].[event names], [OtherDates].[locations],
[OtherDates].[Event_Start], [OtherDates].[Event_End]
FROM [OtherDates];
--
KARL DEWEY
Build a little - Test a little
"omshanti" wrote:
> Thanks Karl. You're awesome!! I have one more issue to deal with in the same
> report. Your answer definitely has me in the right direction. Now I have an
> issue of having the same exact events and locations but later in the year.
> Using the qry you advised it now captures the date range for all the dates
> with that specific event name and location.
>
> The report is now showing :
> January 1, 2008 - March 8, 2008 | Party#1 | Amy's House
>
> I would like the report to show this:
> January 1, 2008 - January 3, 2008 |Party #1| Amy's House
> March 8, 2008 |Party #1 | Amy's House
>
> Thanks again!
>
>
>
>
> "KARL DEWEY" wrote:
>
> > Use a totals query like this --
> > SELECT [event names], [locations], Min([dates]) As Event_Start, Max([dates])
> > As Event_End
> > FROM YourTable
> > GROUP BY [event names], [locations];
> > --
> > KARL DEWEY
> > Build a little - Test a little
> >
> >
> > "omshanti" wrote:
> >
> > > I have a table of event names ,dates and locations. I can run a report that
> > > shows all these fields; but some events run 2-3 days long and I need to be
> > > able to show the event name, location and date range in one line instead of
> > > multiple rows.
> > >
> > > For Example, I now have a report that shows this:
> > > January 1, 2008 |Party #1| Amy's House
> > > January 2, 2008 |Party #1| Amy's House
> > > January 3, 2008 |Party #1| Amy's House
> > >
> > > And want a report to show this:
> > > January 1, 2008 - January 3, 2008 | Party#1 | Amy's House
> > >
> > >
> > > How do I achieve this?
> > > Thank you for your help in advance!
> > >
(Msg. 5) Posted: Tue Sep 16, 2008 12:18 pm
Post subject: RE: How to show a date range in a report [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
Hi Karl-
Thanks for your suggestions, but the formula you suggested is asking me for
a parameter value. There are so many people that need to access this report,
it would be easier if they could just select a report and not have to enter
parameter values. Is there another way I can do this?
Thanks!
"KARL DEWEY" wrote:
> Try using two more queries - Select query named OtherDates and union query.
> SELECT [event names], [locations], [dates] As Event_Start, [dates] As
> Event_End
> FROM YourTable INNER JOIN [TotalsQuery] ON [YourTable].[event names] =
> [TotalsQuery].[event names] And [YourTable].[locations] =
> [TotalsQuery].[locations]
> WHERE [dates] Not Between [TotalsQuery].[Event_Start] And
> [TotalsQuery].[Event_End];
>
> SELECT [TotalsQuery].[event names], [TotalsQuery].[locations],
> [TotalsQuery].[Event_Start], [TotalsQuery].[Event_End]
> FROM [TotalsQuery]
> UNION SELECT [OtherDates].[event names], [OtherDates].[locations],
> [OtherDates].[Event_Start], [OtherDates].[Event_End]
> FROM [OtherDates];
>
> --
> KARL DEWEY
> Build a little - Test a little
>
>
> "omshanti" wrote:
>
> > Thanks Karl. You're awesome!! I have one more issue to deal with in the same
> > report. Your answer definitely has me in the right direction. Now I have an
> > issue of having the same exact events and locations but later in the year.
> > Using the qry you advised it now captures the date range for all the dates
> > with that specific event name and location.
> >
> > The report is now showing :
> > January 1, 2008 - March 8, 2008 | Party#1 | Amy's House
> >
> > I would like the report to show this:
> > January 1, 2008 - January 3, 2008 |Party #1| Amy's House
> > March 8, 2008 |Party #1 | Amy's House
> >
> > Thanks again!
> >
> >
> >
> >
> > "KARL DEWEY" wrote:
> >
> > > Use a totals query like this --
> > > SELECT [event names], [locations], Min([dates]) As Event_Start, Max([dates])
> > > As Event_End
> > > FROM YourTable
> > > GROUP BY [event names], [locations];
> > > --
> > > KARL DEWEY
> > > Build a little - Test a little
> > >
> > >
> > > "omshanti" wrote:
> > >
> > > > I have a table of event names ,dates and locations. I can run a report that
> > > > shows all these fields; but some events run 2-3 days long and I need to be
> > > > able to show the event name, location and date range in one line instead of
> > > > multiple rows.
> > > >
> > > > For Example, I now have a report that shows this:
> > > > January 1, 2008 |Party #1| Amy's House
> > > > January 2, 2008 |Party #1| Amy's House
> > > > January 3, 2008 |Party #1| Amy's House
> > > >
> > > > And want a report to show this:
> > > > January 1, 2008 - January 3, 2008 | Party#1 | Amy's House
> > > >
> > > >
> > > > How do I achieve this?
> > > > Thank you for your help in advance!
> > > >
(Msg. 6) Posted: Tue Sep 16, 2008 12:29 pm
Post subject: RE: How to show a date range in a report [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
What parameter is it asking for?
--
KARL DEWEY
Build a little - Test a little
"omshanti" wrote:
> Hi Karl-
> Thanks for your suggestions, but the formula you suggested is asking me for
> a parameter value. There are so many people that need to access this report,
> it would be easier if they could just select a report and not have to enter
> parameter values. Is there another way I can do this?
>
> Thanks!
>
> "KARL DEWEY" wrote:
>
> > Try using two more queries - Select query named OtherDates and union query.
> > SELECT [event names], [locations], [dates] As Event_Start, [dates] As
> > Event_End
> > FROM YourTable INNER JOIN [TotalsQuery] ON [YourTable].[event names] =
> > [TotalsQuery].[event names] And [YourTable].[locations] =
> > [TotalsQuery].[locations]
> > WHERE [dates] Not Between [TotalsQuery].[Event_Start] And
> > [TotalsQuery].[Event_End];
> >
> > SELECT [TotalsQuery].[event names], [TotalsQuery].[locations],
> > [TotalsQuery].[Event_Start], [TotalsQuery].[Event_End]
> > FROM [TotalsQuery]
> > UNION SELECT [OtherDates].[event names], [OtherDates].[locations],
> > [OtherDates].[Event_Start], [OtherDates].[Event_End]
> > FROM [OtherDates];
> >
> > --
> > KARL DEWEY
> > Build a little - Test a little
> >
> >
> > "omshanti" wrote:
> >
> > > Thanks Karl. You're awesome!! I have one more issue to deal with in the same
> > > report. Your answer definitely has me in the right direction. Now I have an
> > > issue of having the same exact events and locations but later in the year.
> > > Using the qry you advised it now captures the date range for all the dates
> > > with that specific event name and location.
> > >
> > > The report is now showing :
> > > January 1, 2008 - March 8, 2008 | Party#1 | Amy's House
> > >
> > > I would like the report to show this:
> > > January 1, 2008 - January 3, 2008 |Party #1| Amy's House
> > > March 8, 2008 |Party #1 | Amy's House
> > >
> > > Thanks again!
> > >
> > >
> > >
> > >
> > > "KARL DEWEY" wrote:
> > >
> > > > Use a totals query like this --
> > > > SELECT [event names], [locations], Min([dates]) As Event_Start, Max([dates])
> > > > As Event_End
> > > > FROM YourTable
> > > > GROUP BY [event names], [locations];
> > > > --
> > > > KARL DEWEY
> > > > Build a little - Test a little
> > > >
> > > >
> > > > "omshanti" wrote:
> > > >
> > > > > I have a table of event names ,dates and locations. I can run a report that
> > > > > shows all these fields; but some events run 2-3 days long and I need to be
> > > > > able to show the event name, location and date range in one line instead of
> > > > > multiple rows.
> > > > >
> > > > > For Example, I now have a report that shows this:
> > > > > January 1, 2008 |Party #1| Amy's House
> > > > > January 2, 2008 |Party #1| Amy's House
> > > > > January 3, 2008 |Party #1| Amy's House
> > > > >
> > > > > And want a report to show this:
> > > > > January 1, 2008 - January 3, 2008 | Party#1 | Amy's House
> > > > >
> > > > >
> > > > > How do I achieve this?
> > > > > Thank you for your help in advance!
> > > > >
(Msg. 7) Posted: Tue Sep 16, 2008 12:34 pm
Post subject: RE: How to show a date range in a report [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
It asks for Start date, end date, location etc. it basically goes through all
of them...
"KARL DEWEY" wrote:
> What parameter is it asking for?
> --
> KARL DEWEY
> Build a little - Test a little
>
>
> "omshanti" wrote:
>
> > Hi Karl-
> > Thanks for your suggestions, but the formula you suggested is asking me for
> > a parameter value. There are so many people that need to access this report,
> > it would be easier if they could just select a report and not have to enter
> > parameter values. Is there another way I can do this?
> >
> > Thanks!
> >
> > "KARL DEWEY" wrote:
> >
> > > Try using two more queries - Select query named OtherDates and union query.
> > > SELECT [event names], [locations], [dates] As Event_Start, [dates] As
> > > Event_End
> > > FROM YourTable INNER JOIN [TotalsQuery] ON [YourTable].[event names] =
> > > [TotalsQuery].[event names] And [YourTable].[locations] =
> > > [TotalsQuery].[locations]
> > > WHERE [dates] Not Between [TotalsQuery].[Event_Start] And
> > > [TotalsQuery].[Event_End];
> > >
> > > SELECT [TotalsQuery].[event names], [TotalsQuery].[locations],
> > > [TotalsQuery].[Event_Start], [TotalsQuery].[Event_End]
> > > FROM [TotalsQuery]
> > > UNION SELECT [OtherDates].[event names], [OtherDates].[locations],
> > > [OtherDates].[Event_Start], [OtherDates].[Event_End]
> > > FROM [OtherDates];
> > >
> > > --
> > > KARL DEWEY
> > > Build a little - Test a little
> > >
> > >
> > > "omshanti" wrote:
> > >
> > > > Thanks Karl. You're awesome!! I have one more issue to deal with in the same
> > > > report. Your answer definitely has me in the right direction. Now I have an
> > > > issue of having the same exact events and locations but later in the year.
> > > > Using the qry you advised it now captures the date range for all the dates
> > > > with that specific event name and location.
> > > >
> > > > The report is now showing :
> > > > January 1, 2008 - March 8, 2008 | Party#1 | Amy's House
> > > >
> > > > I would like the report to show this:
> > > > January 1, 2008 - January 3, 2008 |Party #1| Amy's House
> > > > March 8, 2008 |Party #1 | Amy's House
> > > >
> > > > Thanks again!
> > > >
> > > >
> > > >
> > > >
> > > > "KARL DEWEY" wrote:
> > > >
> > > > > Use a totals query like this --
> > > > > SELECT [event names], [locations], Min([dates]) As Event_Start, Max([dates])
> > > > > As Event_End
> > > > > FROM YourTable
> > > > > GROUP BY [event names], [locations];
> > > > > --
> > > > > KARL DEWEY
> > > > > Build a little - Test a little
> > > > >
> > > > >
> > > > > "omshanti" wrote:
> > > > >
> > > > > > I have a table of event names ,dates and locations. I can run a report that
> > > > > > shows all these fields; but some events run 2-3 days long and I need to be
> > > > > > able to show the event name, location and date range in one line instead of
> > > > > > multiple rows.
> > > > > >
> > > > > > For Example, I now have a report that shows this:
> > > > > > January 1, 2008 |Party #1| Amy's House
> > > > > > January 2, 2008 |Party #1| Amy's House
> > > > > > January 3, 2008 |Party #1| Amy's House
> > > > > >
> > > > > > And want a report to show this:
> > > > > > January 1, 2008 - January 3, 2008 | Party#1 | Amy's House
> > > > > >
> > > > > >
> > > > > > How do I achieve this?
> > > > > > Thank you for your help in advance!
> > > > > >
(Msg. 8) Posted: Tue Sep 16, 2008 12:37 pm
Post subject: RE: How to show a date range in a report [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
I'm really close to the report I need. The biggest issue with how far we've
gotten is that if the event is only on one day it shows start and end dates
as the same date. Is there a way to say if start and end date are the same,
then don't show the end date?
Thanks!
"omshanti" wrote:
> It asks for Start date, end date, location etc. it basically goes through all
> of them...
>
> "KARL DEWEY" wrote:
>
> > What parameter is it asking for?
> > --
> > KARL DEWEY
> > Build a little - Test a little
> >
> >
> > "omshanti" wrote:
> >
> > > Hi Karl-
> > > Thanks for your suggestions, but the formula you suggested is asking me for
> > > a parameter value. There are so many people that need to access this report,
> > > it would be easier if they could just select a report and not have to enter
> > > parameter values. Is there another way I can do this?
> > >
> > > Thanks!
> > >
> > > "KARL DEWEY" wrote:
> > >
> > > > Try using two more queries - Select query named OtherDates and union query.
> > > > SELECT [event names], [locations], [dates] As Event_Start, [dates] As
> > > > Event_End
> > > > FROM YourTable INNER JOIN [TotalsQuery] ON [YourTable].[event names] =
> > > > [TotalsQuery].[event names] And [YourTable].[locations] =
> > > > [TotalsQuery].[locations]
> > > > WHERE [dates] Not Between [TotalsQuery].[Event_Start] And
> > > > [TotalsQuery].[Event_End];
> > > >
> > > > SELECT [TotalsQuery].[event names], [TotalsQuery].[locations],
> > > > [TotalsQuery].[Event_Start], [TotalsQuery].[Event_End]
> > > > FROM [TotalsQuery]
> > > > UNION SELECT [OtherDates].[event names], [OtherDates].[locations],
> > > > [OtherDates].[Event_Start], [OtherDates].[Event_End]
> > > > FROM [OtherDates];
> > > >
> > > > --
> > > > KARL DEWEY
> > > > Build a little - Test a little
> > > >
> > > >
> > > > "omshanti" wrote:
> > > >
> > > > > Thanks Karl. You're awesome!! I have one more issue to deal with in the same
> > > > > report. Your answer definitely has me in the right direction. Now I have an
> > > > > issue of having the same exact events and locations but later in the year.
> > > > > Using the qry you advised it now captures the date range for all the dates
> > > > > with that specific event name and location.
> > > > >
> > > > > The report is now showing :
> > > > > January 1, 2008 - March 8, 2008 | Party#1 | Amy's House
> > > > >
> > > > > I would like the report to show this:
> > > > > January 1, 2008 - January 3, 2008 |Party #1| Amy's House
> > > > > March 8, 2008 |Party #1 | Amy's House
> > > > >
> > > > > Thanks again!
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > "KARL DEWEY" wrote:
> > > > >
> > > > > > Use a totals query like this --
> > > > > > SELECT [event names], [locations], Min([dates]) As Event_Start, Max([dates])
> > > > > > As Event_End
> > > > > > FROM YourTable
> > > > > > GROUP BY [event names], [locations];
> > > > > > --
> > > > > > KARL DEWEY
> > > > > > Build a little - Test a little
> > > > > >
> > > > > >
> > > > > > "omshanti" wrote:
> > > > > >
> > > > > > > I have a table of event names ,dates and locations. I can run a report that
> > > > > > > shows all these fields; but some events run 2-3 days long and I need to be
> > > > > > > able to show the event name, location and date range in one line instead of
> > > > > > > multiple rows.
> > > > > > >
> > > > > > > For Example, I now have a report that shows this:
> > > > > > > January 1, 2008 |Party #1| Amy's House
> > > > > > > January 2, 2008 |Party #1| Amy's House
> > > > > > > January 3, 2008 |Party #1| Amy's House
> > > > > > >
> > > > > > > And want a report to show this:
> > > > > > > January 1, 2008 - January 3, 2008 | Party#1 | Amy's House
> > > > > > >
> > > > > > >
> > > > > > > How do I achieve this?
> > > > > > > Thank you for your help in advance!
> > > > > > >
All times are: Eastern Time (US & Canada) (change) Goto page 1, 2
Page 1 of 2
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum