Connecting Tech Pros Worldwide Help | Site Map

Empty report grouping

 
LinkBack Thread Tools Search this Thread
  #1  
Old November 12th, 2005, 04:22 PM
Brian Coy
Guest
 
Posts: n/a
Default Empty report grouping

I am creating a database to track scrap on a daily basis at my plant.
I have to provide a weekly scrap report with the amount of each part
scrapped per day. I have the basic database set up, and am trying to
generate a report. I have created a report that will show all the
data. But I need to show either an empty group for the data on days
that there is no scrap or a comment relating as much.

My report is set up with a weekly grouping, a daily grouping and a
grouping for each program we run parts for. I have a query using
Between [Beginning Date] and [Ending Date] to select the records for
this.


When I run the report it shows everything as I had expected, but the
days that we didn't scrap any parts did not have the headers or the
footers show up for that day. is there a way to force this? I have
checked the help and the MS Knowledge base, but I am not sure if it is
a problem with the report or the query.

Thanks for any help.

  #2  
Old November 12th, 2005, 04:22 PM
DFS
Guest
 
Posts: n/a
Default Re: Empty report grouping

Brian,

There may be another way, but offhand this is how I'd do it.

1) You'll need a table listing all the available scrap dates in it,
sequentially. Call it tblScrapDates, and add a field named ScrapDate
2) Your scrap details table. tblScrapDetails, with the fields ScrapDate and
ScrapCost

SELECT D.ScrapDate, iif(isnull(Sum(S.ScrapCost)),0,Sum(S.ScrapCost)) AS
DailyScrapCost
FROM tblScrapDates D LEFT JOIN tblScrapDetails S ON D.ScrapDate =
S.ScrapDate
GROUP BY D.ScrapDate;

Substitute your actual table and field names.

Output would resemble:

ScrapDate DailyScrapCost
01/15/03 $200.00
01/16/03 $0.00
01/17/03 $250.00




"Brian Coy" <briancoy@accessky.net> wrote in message
news:acf8bb5a.0312041212.e9840f4@posting.google.co m...[color=blue]
> I am creating a database to track scrap on a daily basis at my plant.
> I have to provide a weekly scrap report with the amount of each part
> scrapped per day. I have the basic database set up, and am trying to
> generate a report. I have created a report that will show all the
> data. But I need to show either an empty group for the data on days
> that there is no scrap or a comment relating as much.
>
> My report is set up with a weekly grouping, a daily grouping and a
> grouping for each program we run parts for. I have a query using
> Between [Beginning Date] and [Ending Date] to select the records for
> this.
>
>
> When I run the report it shows everything as I had expected, but the
> days that we didn't scrap any parts did not have the headers or the
> footers show up for that day. is there a way to force this? I have
> checked the help and the MS Knowledge base, but I am not sure if it is
> a problem with the report or the query.
>
> Thanks for any help.[/color]


 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,840 network members.