Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Report Question - Using Report to Calculate

Discussion in 'Information Technology' started by Adam Charlton, Jul 28, 2006.

  1. Adam Charlton

    Adam Charlton
    Expand Collapse
    Guest

    I have two reports that calculate the sum of total pounds of parts. One is
    for Parts Ordered one is for Parts Finished. I want to run a report that
    calculates the difference in pounds between the two, but the queries can't
    seem to be linked. How do I get both into the same report?
     
  2. Loading...

    Similar Threads Forum Date
    UK British Sikh Report-2016 Breaking News Mar 24, 2016
    1984 The Story I Did Not Report In ’84 History of Sikhism Jun 28, 2015
    Opinion Top Green Beret Officer Forced to Resign Over Affair With WaPo Reporter Breaking News Jun 26, 2014
    United Sikhs New Report Shows Increasing Hate Attacks on Sikhs Sikh Organisations May 21, 2014
    Legal ACLU reports: Judge orders Sikh man, "Remove that rag, or Go to Jail! Breaking News Sep 27, 2013

  3. KARL DEWEY

    KARL DEWEY
    Expand Collapse
    Guest

    Post the SQL for your two queries.

    "Adam Charlton" wrote:

    > I have two reports that calculate the sum of total pounds of parts. One is
    > for Parts Ordered one is for Parts Finished. I want to run a report that
    > calculates the difference in pounds between the two, but the queries can't
    > seem to be linked. How do I get both into the same report?
    >
    >
    >
     
  4. John Vinson

    John Vinson
    Expand Collapse
    Guest

    On Thu, 06 Jul 2006 18:52:46 GMT, "Adam Charlton"
    <adam.charlton@sbcglobal.net> wrote:

    >I have two reports that calculate the sum of total pounds of parts. One is
    >for Parts Ordered one is for Parts Finished. I want to run a report that
    >calculates the difference in pounds between the two, but the queries can't
    >seem to be linked. How do I get both into the same report?
    >


    Given that we have no idea how your tables are structured, or how
    these totals are calculated on your existing reports, all I can say is
    "I don't have any idea".

    Could you post some explanation that might help someone answer?

    John W. Vinson[MVP]
     
  5. Adam

    Adam
    Expand Collapse
    Guest

    Here is the first one:

    SELECT dbInventory.PartNumber, dbInventory.Description,
    Sum(dbPurchaseOrderLineItems.WeightOrderd) AS SumOfWeightOrderd,
    dbPurchaseOrderLineItems.PartNumberID
    FROM dbInventory INNER JOIN dbPurchaseOrderLineItems ON
    dbInventory.PartNoId=dbPurchaseOrderLineItems.PartNumberID
    GROUP BY dbInventory.PartNumber, dbInventory.Description,
    dbPurchaseOrderLineItems.PartNumberID
    HAVING (((Sum(dbPurchaseOrderLineItems.WeightOrderd)) Is Not Null));

    Here is the second

    SELECT dbInventory.PartNumber, dbInventory.Description,
    Sum(dbTicketLineItems.NetWeight) AS SumOfNetWeight
    FROM dbInventory INNER JOIN dbTicketLineItems ON
    dbInventory.PartNoId=dbTicketLineItems.PartNoID
    GROUP BY dbInventory.PartNumber, dbInventory.Description;


    My goal is to subtract the value in SumOfNetWeight in the second query from
    WeightOrdered in the first query.

    Thanks for your help,

    Adam


    "KARL DEWEY" <KARLDEWEY@discussions.microsoft.com> wrote in message
    news:F654B541-C05F-4288-86CC-C368E71D9DD2@microsoft.com...
    > Post the SQL for your two queries.
    >
    > "Adam Charlton" wrote:
    >
    >> I have two reports that calculate the sum of total pounds of parts. One
    >> is
    >> for Parts Ordered one is for Parts Finished. I want to run a report that
    >> calculates the difference in pounds between the two, but the queries
    >> can't
    >> seem to be linked. How do I get both into the same report?
    >>
    >>
    >>
     

Share This Page