Welcome to SPN

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

Sign Up Now!
  1. Guest ji, please consider donating today!
      Become a Supporter    ::   Make a Contribution   
    Monthly Recurring Target: $300 :: Achieved: $95

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;
    > >
     
Since you're here... we have a small favor to ask...

More people are visiting & reading SPN than ever but far fewer are paying to sustain it. Advertising revenues across the online media have fallen fast. So you can see why we need to ask for your help. Donating to SPN's is vote for free speech, for diversity of opinions, for the right of the people to stand up to religious bigotry. Without any affiliation to any organization, this constant struggle takes a lot of hard work to sustain as we entirely depend on the contributions of our esteemed writers/readers. We do it because we believe our perspective matters – because it might well be your perspective, too... Fund our efforts and together we can keep the world informed about the real Sikh Sikhi Sikhism. If everyone who writes or reads our content, who likes it, helps us to pay for it, our future would be much more secure. Every Contribution Matters, Contribute Generously!

    Become a Supporter      ::     Make a Contribution     



Share This Page