Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date Sort

Status
Not open for further replies.

ed1988

Technical User
Jul 14, 2006
9
US
CR.XI

I have two tables: Receipts and Shipments. Both tables have their own date fields ( Rec'v date and Ship date). I am trying to build a report that shows the total receipts and total shipments daily. The purpose: daily inventory movement.

I do not have a calendar table in my db. How do I display receipts and shipments daily?

I have tried grouping but I have to group by either Rec'v date or ship date. There exists the possibility that I have could no receipts on a particular day but shipments ( and vice versa ).

Any suggestions?
 
You could throw in two groups, one for rec'd and one for shipped. Then throw in a count for each group. If you need to display on one line, then go into your section expert and the top group, check the box that says Underlay Following Sections, to make it line up. (You have to decide whether you are doing a count or a distinct count).
 
Create a UNION ALL query from the two tables using an Add Command, as in:

select 'rcvd' MySource, fld1, fld2 from received
UNION ALL
select 'shpd' MySource, fld1, fld2 from shipped

Now you have one data source with all rows from each table.

Of course this is dependent upon the database being used, make sure you post basic information in the future.

-k
 
Synapsevampire,

Thank you very much. This approach was my solution.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top