Welcome to SPN

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

Sign Up Now!

Combine 2 Reports

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

  1. lmv

    lmv
    Expand Collapse
    Guest

    I have 2 reports (code included) I can get them both to work seperately but I
    need a report that will combine the info.
    The Cost in the EST_S84 needs to then subtract the info in the extendedprice
    field to make the Available field which I guess would be
    [LEBAEst_Cost]-[ExtendedPrice] but I get null errors and it isn't totalling
    the info right.
    I have tried to put the 2 qry's into one but it doesn't work. Also, the MAIN
    category field is the 260, 270, 280 etc BUT sometimes there is currency in
    those fields so I had thoght of making an unbound 260TTL field that would
    calculate since these figures do not need to be stored. If I haven't included
    enough information please let me know as I only have a couple of days to get
    this figured out.

    THANKS so much!
    --------------------
    SELECT qryPurchaseOrderRpt.ProjectID, qryPurchaseOrderRpt.CategoryID,
    qryPurchaseOrderRpt.MainCatID, qryPurchaseOrderRpt.CategoryName,
    qryPurchaseOrderRpt.MainCatName, qryPurchaseOrderRpt.ExtendedPrice
    FROM qryPurchaseOrderRpt
    GROUP BY qryPurchaseOrderRpt.ProjectID, qryPurchaseOrderRpt.CategoryID,
    qryPurchaseOrderRpt.MainCatID, qryPurchaseOrderRpt.CategoryName,
    qryPurchaseOrderRpt.MainCatName, qryPurchaseOrderRpt.ExtendedPrice
    HAVING (((qryPurchaseOrderRpt.ProjectID) Like [What Project ID?
    Example:LEBA] & "*"));

    -------------------------------
    SELECT DISTINCT qryCategoryLookup.MainCatID, qryCategoryLookup.MainCatName,
    [EST_S-84a].Category, qryCategoryLookup.CategoryName, [EST_S-84a].LEBAEst_Cost
    FROM [EST_S-84a] INNER JOIN qryCategoryLookup ON [EST_S-84a].Category =
    qryCategoryLookup.CategoryID
    WHERE ((([EST_S-84a].LEBAEst_Cost) Is Not Null))
    ORDER BY [EST_S-84a].Category;
     
  2. Loading...

    Similar Threads Forum Date
    SciTech New Quantum Dot Technique Combines Best of Optical and Electron Microscopy Breaking News Jun 17, 2013
    SAD-Sant Samaj Combine Sweeps SGPC Elections Sikh Sikhi Sikhism Sep 19, 2011
    SciTech 3,000 images combine for Milky Way portrait Breaking News Nov 2, 2009
    Sikh News SAD-BJP combine sweeps civic polls in Punjab (Outlook India) Breaking News Aug 8, 2007
    Legal ACLU reports: Judge orders Sikh man, "Remove that rag, or Go to Jail! Breaking News Sep 27, 2013

  3. babybirthday77

    babybirthday77
    Expand Collapse
    Guest

    "lmv" เขียน:

    > I have 2 reports (code included) I can get them both to work seperately but I
    > need a report that will combine the info.
    > The Cost in the EST_S84 needs to then subtract the info in the extendedprice
    > field to make the Available field which I guess would be
    > [LEBAEst_Cost]-[ExtendedPrice] but I get null errors and it isn't totalling
    > the info right.
    > I have tried to put the 2 qry's into one but it doesn't work. Also, the MAIN
    > category field is the 260, 270, 280 etc BUT sometimes there is currency in
    > those fields so I had thoght of making an unbound 260TTL field that would
    > calculate since these figures do not need to be stored. If I haven't included
    > enough information please let me know as I only have a couple of days to get
    > this figured out.
    >
    > THANKS so much!
    > --------------------
    > SELECT qryPurchaseOrderRpt.ProjectID, qryPurchaseOrderRpt.CategoryID,
    > qryPurchaseOrderRpt.MainCatID, qryPurchaseOrderRpt.CategoryName,
    > qryPurchaseOrderRpt.MainCatName, qryPurchaseOrderRpt.ExtendedPrice
    > FROM qryPurchaseOrderRpt
    > GROUP BY qryPurchaseOrderRpt.ProjectID, qryPurchaseOrderRpt.CategoryID,
    > qryPurchaseOrderRpt.MainCatID, qryPurchaseOrderRpt.CategoryName,
    > qryPurchaseOrderRpt.MainCatName, qryPurchaseOrderRpt.ExtendedPrice
    > HAVING (((qryPurchaseOrderRpt.ProjectID) Like [What Project ID?
    > Example:LEBA] & "*"));
    >
    > -------------------------------
    > SELECT DISTINCT qryCategoryLookup.MainCatID, qryCategoryLookup.MainCatName,
    > [EST_S-84a].Category, qryCategoryLookup.CategoryName, [EST_S-84a].LEBAEst_Cost
    > FROM [EST_S-84a] INNER JOIN qryCategoryLookup ON [EST_S-84a].Category =
    > qryCategoryLookup.CategoryID
    > WHERE ((([EST_S-84a].LEBAEst_Cost) Is Not Null))
    > ORDER BY [EST_S-84a].Category;
    >
     
  4. lmv

    lmv
    Expand Collapse
    Guest

    huh?

    "babybirthday77" wrote:

    >
    >
    > "lmv" เขียน:
    >
    > > I have 2 reports (code included) I can get them both to work seperately but I
    > > need a report that will combine the info.
    > > The Cost in the EST_S84 needs to then subtract the info in the extendedprice
    > > field to make the Available field which I guess would be
    > > [LEBAEst_Cost]-[ExtendedPrice] but I get null errors and it isn't totalling
    > > the info right.
    > > I have tried to put the 2 qry's into one but it doesn't work. Also, the MAIN
    > > category field is the 260, 270, 280 etc BUT sometimes there is currency in
    > > those fields so I had thoght of making an unbound 260TTL field that would
    > > calculate since these figures do not need to be stored. If I haven't included
    > > enough information please let me know as I only have a couple of days to get
    > > this figured out.
    > >
    > > THANKS so much!
    > > --------------------
    > > SELECT qryPurchaseOrderRpt.ProjectID, qryPurchaseOrderRpt.CategoryID,
    > > qryPurchaseOrderRpt.MainCatID, qryPurchaseOrderRpt.CategoryName,
    > > qryPurchaseOrderRpt.MainCatName, qryPurchaseOrderRpt.ExtendedPrice
    > > FROM qryPurchaseOrderRpt
    > > GROUP BY qryPurchaseOrderRpt.ProjectID, qryPurchaseOrderRpt.CategoryID,
    > > qryPurchaseOrderRpt.MainCatID, qryPurchaseOrderRpt.CategoryName,
    > > qryPurchaseOrderRpt.MainCatName, qryPurchaseOrderRpt.ExtendedPrice
    > > HAVING (((qryPurchaseOrderRpt.ProjectID) Like [What Project ID?
    > > Example:LEBA] & "*"));
    > >
    > > -------------------------------
    > > SELECT DISTINCT qryCategoryLookup.MainCatID, qryCategoryLookup.MainCatName,
    > > [EST_S-84a].Category, qryCategoryLookup.CategoryName, [EST_S-84a].LEBAEst_Cost
    > > FROM [EST_S-84a] INNER JOIN qryCategoryLookup ON [EST_S-84a].Category =
    > > qryCategoryLookup.CategoryID
    > > WHERE ((([EST_S-84a].LEBAEst_Cost) Is Not Null))
    > > ORDER BY [EST_S-84a].Category;
    > >
     

Share This Page