Running total across 2 grouping

Hi All
I have created a crystal report and i have 2 remaining issues that i just cant get around.
the report is basically about all the net stock position.
the report is based on a query..that links sales order to all target documents that originate from the sales orders, i.e...deliveries, invoices, returns, credit notes.
then i also brought in all the open purchase orders and the instock from the oitw
i then sumed up the lines so the sales order > Delivery > invoice > credit note > returns all shows in one line..and if there is a different unit of measure it will be another line for that sales order
the report is grouped:
                              per warehouse
                              per item
                              per Sales Order Num
                              per Item Unit of Measure
                              per Line Num
1st issue:
in the selection criteria if the sales order is closed but if one of the delivery notes is open it should bring in the "whole set" not just the the open deliverys linked to the sales order.
this is because the delivered quantities adds up to the net position of the stock.
2nd issue:
I have to work out a net postion
formula: net stock = Oitw.instock + PO - remaining qty on sales order
I got the sales order as a negative
i used a running total formula, but it does not work if the sales order has more then one unit of measure.
whileprintingrecords;
If onfirstrecord or previous({Command.SO No.})<>{Command.SO No.} then
numbervar remain_bal:= remain_bal + {@QTY}
i tried to add another if statement..but does not work
whileprintingrecords;
If onfirstrecord or previous({Command.SO No.})<>{Command.SO No.} then
If onfirstrecord or previous({Command.SO Uom)<>{Command.SO Uom.}  then
numbervar remain_bal:= remain_bal + {@QTY}
any help will be gladly welcomed..
thank you all
Jerusha

Hi Dave
Thank you very much for your feedback.
I have been using the base UoM, ie InvQty field.
my issues comes where i am grouping I am 1st grouping by sales order num, then by uom as the customer wants to see that as separate entries
Example:
SO Num     Uom     Qty     InvQty
1               Bags     50         200
1               Bulk     100        100
This is the forumula for the running total:
If onfirstrecord or previous ({Command.SO No.}) <> ({Command.SO No.}) then
if ({Command.Doc Type}) = 'SO' then
    SO := SO + {@QTY}
However when i "print" my total and add it to the footer.. it will show 200 instead of 300.
Thanks
Jerusha

Similar Messages

  • Running total in group header doesn't display when it's at page bottom

    Post Author: Charles Denight
    CA Forum: Formula
    Hi, Using v.9 of Crystal Reports I've created some running totals using a cross-tab workaround to get the running totals into the group headers, but when the group header falls at the bottom of the page then the running total doesn't show up.Would appreciate knowing why and how to fix this.

    Replacing an item that is malfunctioning because of a manufacturing error is the bare minimum I would expect from customer service for any electronics item.
    The thing Apple does extremely well is their flat fee policy for repairs on their computers.
    I managed to break my MacBook pretty seriously (logic board needed to be replaced) and I'm sure it cost them more to repair the unit than the $328 they charged me.
    I probably would have been angry if it was something minor, but I'm guessing that most repairs to screens/motherboards/etc cost more than their flat fees.

  • DISPLAY RUNNING TOTAL IN GROUP HEADER

    Post Author: sharonmtowler
    CA Forum: Formula
    I know there is a way to do this, just forgot how. i am in version 8.5.  i have a manual running total which calculates order qty for the entire sales order.i (dont like using the rt wizard-buggy)
    the knowledge base says to use a cross tab, but there hit or miss also.
    does anyone know how to show the display formula for a manual runnning total in the group header instead of group footer?

    Post Author: pandabear
    CA Forum: Formula
    Hi Sharon,
    I wanted to try this before I sent it to you, but my Crystal is down because (blah, blah, long story here....yawn....).
    I think I understand.  You want to show the "Total" for each group, in the group header instead of the group footer?
    My experience is that Crystal works from the top down (read: limiting), so I need a work around to do this.
    1 - Do the calculation in the query...sum by group, filter with a "Case" statement, etc.  If there's a reason you can't do that then
    2 - (and this is what I wanted to try first) see if you can group on the same field twice. 
    Group 1 - Test.field
    Group 2 - Test.field (same field)
    If you can,
    then just carry the total from the group footer of the previous group (same field) above you, and bring it down
    (shared var ?) to the group below.
    My 2 cents is up.
    Hope this helps,
    The Panda

  • Running Total in Group Header

    Post Author: bahamaER
    CA Forum: Crystal Reports
    Hello, I have been reviewing threads for running totals and would like some assistance on creating a running total for a group with a condition that will display in the group header, the running total should also reset for each group. Is this possible?
    I know that there are some constraints such as the variable being reset to 0 in the header for each group as well as the group records have not been rendered when the header formulas are being assessed. I have been able to accomplish the task of running totals with conditions for groups using a running total field and also 3 separate formulas placed in the group header, detail and footer. The display is only correct in the group footer; my goal is to have the footer formula in the group header.  Any ideas?  I am currently using CR 8.5 but will be upgrading to CR 2008.
    Thankyou

    Hi,
    If you are trying to calculate Total and display it in Group Header for field value placed in Detail, then you will get incorrect/no value for total, as Crystal Reports prints/processes the report line by line and it will not be able to process the Total for field in Detail section in Group Header.
    Its is by Design.
    For a workaround:
    - Insert the same probematic report (Say A.rpt) as a Subreport in Group Header of this report(Say A.rpt).(Say in GroupHeader A1) and link the Main Report to the
    - Insert Section Below (Say GroupHeader A2)
    - Calculate Total in Section Group Header A2)
    This workaround will reduce the Performance of the report as Subreport will be proceed for each Group Value.
    Regards,
    Kiran

  • Running total above Group

    Hey,
    I may be having a brain freeze.  I need to print a running total (max) above the detail lines of a report.  Since the running total is not known until after the detail lines, is there a way to do this?  I'm stuck and frustrated.  Thanks,
    Jim

    I'm starting to think I am going about this in the wrong way.  My report has a field named 'tolerance' which is on every other record but does not appear in the report detail.  It is the same value for every record in the group.  I need to capture the value and display it in the group header.  I was attempting to do a max() running total, and the field looked fine in the group footer, but when I copied it to the group header to changed to blank.
    I think there must be a simpler way to do this, but I don't know what it is.  Thanks for your help,
    Jim

  • Running Total Changes?

    Post Author: cjsmile2106
    CA Forum: Formula
    Hello Everyone
      I have a weird problem.  I have a report that has three groups.  In each group I have manual running totals.  I would like to take a manual running total that I have in Group 2 and subtract it from my Group 3 manual running total.  However when I attempt this for some odd reason by manual running total from Group 2 is not subracting that same number.  For example:
    Group3
    5 - 7 = -210 - 7 = 315 - 7 = 820 -7  13
    Group 2
    -7
    Its not doing that however, it seems to be subracting some random numbers instead of the Group 2 total.  Thank you for your assistance!

    Post Author: sharonmtowler
    CA Forum: Formula
    make sure you do not have repeat group header  or keep group together checked, causing weird mrt. make sure the variable name is not used in another variable name. you may need to place the formula that is subtracting the display formulas below the other to get an accurate set, and use whileprintingrecords

  • Running Total in Crosstab

    Hello all,
    I've been unable to find any solutions for my issue, and I'm desperately hoping someone smarter than me can help me out. I'm trying to create a running total across columns for a crosstab report.
    The report looks like the following, as best as I can format it:
    (date) JAN-09 FEB-09 MAR-09 APR-09
    7 7 24 13 &lt;--
    (order type) (order #)
    Sales Order ACK12342 -4 -3 0 -1
    AHSKFD34 -2 -3 -2 0
    SSJDHD23 0 0 0 -10
    SJDDG1298 -5 0 0 0
    KDJD20937 -7 -8 0 0
    Work Order WO12620 9 0 0 0
    WO12827 8 7 0 0
    WO13743 3 7 19 0
    Stock N/A 5 0 0 0
    I want a running total of each month column. I've added the running total row I'm trying to create above. I haven't been able to create a running total that will give that to me.
    I hope this is enough information. I'll post answers to any followup questions.
    Thanks.
    EDIT: I apologize for the crosstab layout. I've butchered it, and I don't know how to go about making it more readable.
    Edited by: user3537345 on Sep 19, 2008 8:35 AM

    Hi Rod,
    Appreciate your response. Unfortunately, the solution you've posted doesn't go quite far enough.
    Your function does give me the running quantity, but it creates a new column for each OrderNumber, and then sums it. I've looking for a sum of all OrderNumbers (i.e., the whole column). Each column represents a month. So it's a running total of OrderNumbers, by Month. Hope that makes sense.
    I might be attempting to do something that can't be done in Discoverer. I'm just trying every suggestion I can get. I'm hoping it's something I've missed.
    I'll continue to experiment with your suggestion.
    Thanks.

  • Percent on Running totals

    Post Author: llcoolt
    CA Forum: Formula
    I have a couple of group running totals:
    TotalItems
    TotalCompleteAtExp
    I need to create a formula that finds the percentage of the two.  Any help?  Would this be in a running total?

    Post Author: llcoolt
    CA Forum: Formula
    but it's calculated at a group level, not as a percentage for the whole report. 
    The running totals were grouped by vendors.  The percentage I was looking for was also grouped by vendor, not a percentage of ALL service orders and the vendors they were assigned to, but percentages run per vendor based on those completed by vendor.

  • Oracle report running total Resetting balance on next group

    Dear All,
    I am developing report on Oracle R12 fixed Assets, I have to calculate the running total for each asset.
    In brief
    Asset 1
    cost Deprciation Adjusted Cost
    50 - 2 48
    48 -5 45
    45 - 4 41
    I achieved that by using
    if :p_val is null then
    :result := nvl(:cost,0)-nvl(:depriciation,0);
    :P_val :='5';
    return :result;
    else
    :result := nvl(:result,0)-nvl(:depriciation,0) ;
    return :result;
    end if;
    working fine
    But problem is when the next asset start on same report
    Asset 2
    cost Deprciation Adjusted Cost
    100 5 36
    it substracts the last total (running total of previous asset with depriciation which was 41 in this example).
    Oracle Champs pl advice me how to solve this.
    I really dont got any idea how to solve this.
    thanks

    Dear,
    Thanks for your reply , in your reply what you said I tried this but in pl/sql I am not actually achieving the result. The balance is not resetting at next group if you give one accurate line it would be really helpfull.
    thanks

  • Running Total does not reset when group changes

    I have a manual running total for group3 that does not reset for group2
    Group2 Header (Order Status 3=Open,4=Closed)
    WhilePrintingRecords;
    currencyVar WIP=0;
    Group3 footer (Order Number)
    WhilePrintingRecords;
    currencyVar  WIP;
    WIP := WIP + {@NETWIP}
    Group2 footer
    WhilePrintingRecords;
    currencyVar WIP;
    There are no Repeat Group header on any of the groups
    Will add Group1 total when this part works.

    I am not sure if you made a typo when making your post but you are missing a colon when resetting your variable
    change from this
    currencyVar WIP=0;
    to this
    currencyVar WIP:=0;

  • Running total / Summary - 3 groups

    Dear All,
    I am facing an problem in Summary / Running Total in my crystal  Report. I have 3 groups as under :
    1) Document Series
    2) Territory
    3) Transaction Details which includes Document Total
    Now Example my document series is Projects and Territory is Japan and India and in Transaction Details which is document total has values of 100, 200, 300,500 for Japan and 300,400 for India
    Now I am not able to bring a summary / running total of Japan which should be 1100 and for India 700 respectively.
    I want summary for Document Series Also means for Projects it should show the total of 1100 + 700 = 1800
    and a grand total of 1800 if its only projects series and if other series it should show projects + handling series.
    Pleas help as I have tried but not been successful.
    regards,
    kamlesh

    for Territory Running total
    1. Field to summarize : documentTotal
    2. Evaluate : for each record
    3. Reset: on change of field -> Territory
    Place it in Territory Group footer
    for Document Series Total
    1. Field to summarize : documentTotal
    2. Evaluate : for each record
    3. Reset: documentseries
    Place it in Document Series group Footer
    for Grand Total
    1. Field to summarize : documentTotal
    2. Evaluate : for each record
    3. Reset: never
    Place it in Report Footer
    HTH,
    Jyothi

  • Running Total Grouping Formula

    I have a running total condition that I need to summarize the field CAWP.BAC. I would typicaly evaluate this total for change of group 4 and reset on change of group 3. I need to condition the evaluation for ".900" in {CAWP.WP} but i also need to evaluate for change of group 4. Does any one have any examples of a formula for evaluation "on change of group"?

    Hi John,
        For this you can try using manual running total formula's.
    1) Create a @reset formula as below and place it in group header 3.
        Formula :
        Whileprintingrecords;
        Numbervar i:=0;
    2) Create an @evaluation formula and place it in detail section.
       Formula:
       whileprintingrecords;
       numbervar i;
       if {CAWP.WP} = ".900" then
          i:= i+ {CAWP.BAC}
    3) Create a @display formula and place it in group footer 4.
        Formula:
        whileprintingrecords;
        numbervar i;
    Hope this will help!!
    Regards,
    Vinay

  • Sort Group Based on Running Total

    Is there a way to sort the group based on the running total of the group?
    Thanks!
    Deanna

    I think it is not possible to sort the group based on a running total. You can sort based on a summary field using group sort expert. Since the running total executes whileprintingrecords we cannot sort based on running totals.
    Regards,
    Raghavendra

  • SSRS 2008 Running Totals - How are they created at the grouping by level

    I am trying to create the running total column(the right column) month-to-date, and I am new to SSRS.  Is this possible to do on the SSRS-side, or, will I need to do this in the SQL stored procedure that SSRS is calling?
    Number Enrolled
    Number Enrolled
    Enroll Date
    Enroll Type
    Enroll Group
    Enroll Offer
    Enroll Source
    DAILY
    MTD (Running Total)
    10/1/2013
    Online
    Internet
    1234
    ABC
    1
    1
    10/2/2013
    Online
    Internet
    1234
    ABC
    0
    1
    10/3/2013
    Online
    Internet
    1234
    ABC
    6
    7
    10/1/2013
    Online
    Internet
    1234
    DEF
    4
    4
    10/2/2013
    Online
    Internet
    1234
    DEF
    6
    10
    10/3/2013
    Online
    Internet
    1234
    DEF
    0
    10

    Hi Mitch1743,
    According to your description, you want to get the total number on each row. Right?
    In Reporting Service, we can use RunningValue function to do aggregation calculating for each row. Put expression: =RunningValue(Fields!Sales.Value,sum,”Group2”) into the last column (Group2 between “” is the parent group of detail rows).
    We have tested it in our local environment , the table and result will be looks like below:
    Reference:
    RunningValue Function (Report Builder and SSRS)
    Understanding Groups (Report Builder and SSRS)
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • Running totals help required. Total PartNumber when in Date Order / Group.

    I am trying to create a shortages list of our order book for all our customers orders outstanding. I want a running total of the orders which works until I group the orders in date order, not PartNumber order. It needs to be in date order so the users has a priority order for jobs. What is the best ways to do a running total of the quantity required where the PartNumbers match but keep it in date order.

    Hi,
    Welcome you post on the forum.
    Do you need query for one selectable PartNumber or all PartNumbers?
    Thanks,
    Gordon

Maybe you are looking for

  • How to transfer iBooks books & PDFs from old iPad to new iPad?

    (Well, it seems my title got truncated; originally it read: How to transfer iBooks books & PDFs from old iPad to new iPad?) I've recently gotten an iPad Air to replace my previous iPad 2. I have a bunch of books and PDFs in iBooks on the old iPad, an

  • Problem related to taking of free material?

    Hi All, I want to take FREE OF COST MATERIAL IN OUR STOCK. I HAVE TRied TO TAKE IT THROUGH MBIC  MOVEMENT TYPE ( 511  & 521 ) BUT FAILED TO DO SO.             Pl  SUGGEST THROUGH WHICH TRASACTION WE CAN DO THE SAME.

  • No synchronisation between iPhone & Icloud (music)!?

    Hello, I have used iTunes match to bring all my music to the icloud. It works excellent. Now I have all information on 3 devices ( iPAD 1; new iPAD, iPhone 4 (my wife)), but there is no synchronistaion between my iphone 4 and the icloud. I do it like

  • Inter company postings between 2 different controlling areas

    Dear Team, Is it possible the inter-company postings between two different controlling areas company codes with same chart of accounts? profit center accounting and New GL is activated for the company codes. Please provide me the inputs if anybody go

  • What does Order By -1 mean?

    Hi Can anyone tell me what does and Order By clause with -1 mean...it's pretty confusing to me, never seen before? Thanks Rashed