Calculate % on manual running total??

I have a three part manual running total that prints the final value in the report footer.  That total is based on groups of cities and time spent by each city on a project.  I'm trying to calculate the percentage of time they spent on the total project in each cities group footer.  So, of course (citytime % totalprojecttime).  However, since it's a manual running total it's calculating based on the time up until that point, so the first city is always at 100% because the manual running total and time spent by that city is always equal.  Then the next percentage is only based on the first two cities total divided by that current city, etc. so that the only city that actually has a correct percentage is the last one because it's finally calculated the totals at that point.
I've tried various printing states (evaluate after, etc) but those aren't going to work because the total isn't done until the end.  Without doing a subreport, is there anyway to calculate that properly?

If you can't do a simple summary to derive total time for City, then you will need to develop a hidden subreport which you place in city group header, and use that total calculate total city time. You can then use a shared variable to holding the total city time to calculate your %ages.
Hidden subreport is a subreport will all sections suppressed and minmised so that it does not appear, it must be held in an unsuppressed section, you can section to underlay to ensure minimum space taken up.
Ian

Similar Messages

  • Manual Running Total vs Running Total

    Morning all,
    It is some what strange to me when I try to use a formula to calculate the total jobs and when I try to use Running total to count the same total jobs. Both answers in theory should be the same however they are not. I am wondering where am I going wrong in the manual formula.
    If {despatch_summary.job_type}="FSV" then
    if {despatch_summary.order_status}<>0 then
    {despatch_summary.order_no}
    else
    0
    The above code then gets DistinctCount ({@FSV})
    The same method if I use by using Running Total it gives the correct number of jobs.
    Running Total
    field to summarize : despatch_summary.order_no
    Summary Type: DistinctCount
    Formula: {despatch_summary.job_type}="FSV" and {despatch_summary.order_status}<>0
    Reset: none
    The formula gives me 513 where as the same running total gives me 514
    Where am I going wrong?
    Strangely it is adding 1 to all of my manual running totals (1 is coming from canceled orders).
    Many thanks
    Regards

    Sastry I am adding this formula into the crosstab which is setup by Number of days. So on the column it is number of days and on the summarized field it is this formula.
    I chose Group options and clicked on DistinctCount after adding the formula into the summarized field.
    I have already tried the formula you have suggested however it doesn't seem to be affecting it.
    Apart from that what I have just done is added the Running Totals to the Summarized field which is coming up correctly however now the problem is to get their percentages.
    I have used the following code but it doesn't seem to be working.
    Whileprintingrecords;
    Numbervar g:=Currentfieldvalue;
    Numbervar h:={@TotalJobs-CanceledJobs};
    Numbervar i:=0;
    i:=((g/h)*100);
    Numbervar gTot:=gTot+i;
    if gTot > 100 then "100.00%"
    else
    totext(gTot,2)+"%"
    I know I am doing it wrong when it comes to percentages. I need to get the percentages off that Running Total (Grand Total).
    Am not sure how to acheive that either.
    Many thanks
    Regards
    Jehanzeb

  • Manual Running Total won't Reset

    I've created the following formulas to create a manual running total.  However, I can't get the total to reset.  Instead, the total gets added to each time the group appears.  What am I missing? 
    GROUP 1 HEADER 
    ================
    //placed this in group 1 header to reset total each time this group appears
    whileprintingrecords;
    shared currencyvar TotalCore;
    TotalCore:=0
    GROUP 2 FOOTER
    ============================
    //placed this in the footer of next group to get total added to the TotalCore variable from above
    //the fields I'm adding to TotalCore are fields summarizing the detail fields
    WhilePrintingRecords;
    Global CurrencyVar TotalCore;
    TotalCore := TotalCore + ({@Core6-Sum} + {@CoreApp3-Sumfor#ofMos});
    TotalCore
    GROUP 1 FOOTER
    ============================
    //this number accumulates for each group...I need it to reset.
    WhilePrintingRecords;
    Global CurrencyVar TotalCore;
    TotalCore

    You left out two extremely important pieces of information:  the formulas for {@Core6-Sum} and {@CoreApp3-Sumfor#ofMos}.  It is possible (from where I sit) that they are carrying the values forward...
    Other than that, I don't see anything obviously wrong...
    HTH,
    Carl

  • Manual running total issue

    Hello All,
            I have written manual running total formula:
    Reset formula in group header:
    whileprintingrecords;
    numbervar sol:=0;
    Evaluation formula in detail section
    whileprintingrecords;
    numbervar sol;
    if Field_Name1 <> previous(Field_Name1) then
       sol:= sol+ Amount;
    Display formula in group footer;
    whileprintingrecords;
    numbervar sol;
    But the total doesn't seem to match, can someone help me!
    Thanks!
    Sonali

    Hi Sonali,
       For Ex:
    1) If the group is on County> U, and country has 40 detailed records.
    2) The Option " Repeat  group header on each page is checked" and a reset formula is placed in the
        group header.
    3) In one page take for example 25 detail records are printed the evaluation formula will evaluate for 25
        records. And in teh next page again the group header will be printed. This causes the reset formula
        to print again where the total becomes zero again. And the remaining 15 records will be added and
        the group footer will display that total.
    Regards,
    Vinay

  • Manual Running Total

    Post Author: dbmngleaf
    CA Forum: Formula
    I'm using Crystal Report XI and I have a report where I need to supress data and show a running count for just the records that are showing on the report.  My supression works fine but the running count isn't.  I've seen that you can't use the built in running totals when you're supressing data and I seen that you can create 3 formulas to get this to work however it isn't working.
    My formulas are:
    total_init
    WhilePrintingRecords;
    numberVar overall_total:=0;
    total_calc
    WhilePrintingRecords;
    numberVar overall_total;
    overall_total:=overall_total+1;
    total_disp
    WhilePrintingRecords;
    numberVar overall_total;
    The formulas are totaling everything including the supressed records.  How do I get it to count just the records that are displaying?  Thanks for any help in advance.

    Post Author: yangster
    CA Forum: Formula
    you're almost therethe only thing you need to is change your evaluation formula, you don't have an if statement in there to tell it to ignore the records you don't want to countwhat you have right now is it will increment by 1 for every recordtotal_calc
    WhilePrintingRecords;
    numberVar overall_total;if not(whatever you are supressing on) thenoverall_total:=overall_total+1;so this will count every time the record is not supressed

  • Manual Running Totals

    Below is the formula I've created but the total is 1 count higher than it should be.  The total should be 1346 and it is showing as 1347.
    whileprintingrecords;
    numbervar NotEstRt;
    NotEstRT:=NotEstRt+{@Not Established};
    Thank you for any thoughts and suggestions.
    Jen

    1) @Not Established:
         if {@SameDay vs OV} = "Not Established"
         then 1
         else 0
              1a) @SameDay vs OV
                     if {@OV Count}=0
                     then "Not Established"
                     else "Established"
                                  (This is linked to a shared numbervar fora  subreport.)
              1b) @OV Count
                   Whileprintingrecords;
                   shared numbervar OVCount;
    2) Placed in GF1
    3) I think that is the part I'm missing but haven't been successful in getting there.

  • Running total of another running total ( or some other solution )

    I posted in my previous thread that I would like to be able to do rounding at the subtotal level and then have a total of these subtotals.  Here is the original thread:
    totals in a cross tab report
    So I was told that with the cross-tab report I can either do rounding at the details level or at the final total level.  However, I need to be able to do the following:
    Suppose I receive payments from different states.  In my report I would like to be able to display:
    - a total of all payments for one given state, rounded to whole dollars - this one is easy because I just create a running total for the payments and then at the end I round it to whole dollars
    - a total of all payments and all states as one number.  However, the problem I can't figure out here is that this grand total needs to be calculated as the SUM of the totals for each state where the total for each state is rounded to a whole dollar before being added to the grand total.  So the rounding should not be done on the final grand total but rather:
    1. calculate the total of payments for one state and round it to a whole dollar - let's call it StateTotal ( rounded)
    2. calculate the SUM of all StateTotal values.  So it needs to be a SUM of the already rounded state totals.
    Any help will be greatly appreciated.
    thanks

    hello all,
    if you want to use a manual running total then that is okay. you don't actually put the manual running total in the cross-tab expert though as you will get a print time error.
    you use the "Display String" formula dialogue on an existing cross-tab summary to do the manual running total in.
    have a look at the attached sample...there are 2 manual running totals in there...one that goes horizontally (across the columns) and one that goes vertically (down the rows).
    there is also a Xtab Info column that is there just to show you how the manual running total counter variables are incremented through the cross-tab. in crystal reports 2008 there are a lot of new cross-tab functions that are different from this but that is a completely different topic.
    i hope this helps,
    jamie

  • 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 for item availbe qty. from On Hand - SO + PO by promise date

    I stuck with Balance(running total).
    How to link item number with SO and PO?  
    Need daily item qty. available qty from "On Hand" Qty. + PO - SO by promise date and sort by ascending?
    Item#    Order Date  SO/PO   PromiseDate  Qty   Bal.
    AE01    08/01/08     OnHand                       20     20
                08/02/08     SO#1877   08/05/08       -3    17
                08/04/08     SO#2044   08/08/08       -6    11
                07/22/08     PO#632     08/10/08      10   21
    Thanks.

    create a group by promise date
    2nd group by po#
    put the fields either in the group or in the details
    PO#, PO promise date, qty and SO#, SO promise date, qty then availability qty
    manual running totals
    create 3 formulas
    1 reset
    WHILEPRINTINGRECORDS;
    NUMBERVAR ITEMLOC := 0;
    place in the group header on what you want the total to reset by (po#)
    1 calc
    WHILEPRINTINGRECORDS;
    NUMBERVAR ITEMLOC := ITEMLOC +(qty};
    this gets placed where the calculate will take place (next to qty)
    1 display
    WHILEPRINTINGRECORDS;
    NUMBERVAR ITEMLOC;
    ITEMLOC
    this gets placed in the group footer.
    for each field that gets calculated by a group create 3 formulas for each
    they need to have the same variable name to reference each other.
    if you need to create a 2nd set to calc something else give that a new variable name.

  • Running Totals Maybe?

    I am fairly new to Crystal Reports and Running Totals. I have a group setup that is based on the number of days a loan is late. For example, I have three buckets (30 Days, 60 Days, 90 Days). In setting up the group, I put the group in specific order and decided to exclude the other loans that are less than 30 days. I am trying to get a total $ amount of all the loans instead of just the loans in the buckets. I have searched forums and a Crystal 2008 book trying to figure this out. I tried using a Running Total with the Running Total expert but it is still giving me the same grand $ total that I have for the groups I selected. Any ideas? I am bit confused as to the multipassing of the data. Should I keep the groups setup the way I have them or use the select expert (etc).
    Thanks, I am a newbie.

    i suggest manual running totals, more accurate and if you have duplicate values the summary option will duplicate the data
    create 3 formuls
    i reset
    whileprintingrecords;
    numbervar x:= 0;
    this gets placed in the group header
    calculate
    whileprintingrecords;
    numbervar x:= x + field or formula;
    this gets placed next to the field or formula you want calculated
    display
    whileprinitngrecords;
    numbervar x;
    x
    this gets displayed in the footer of where the reset is (header)
    using manual running totals, if you have data on the report you dont want included you can create a formula that will only calc based upon only what should be included.

  • 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 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 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

  • Count and Sum running total

    Can i sum and couunt running total in formula?.
    Please let me know.

    Hey, we can do count and sum functions in Running total.
    These functions are available in crystal reports for  summary fields.
    We can create  the running total based on the type of summary like Sum, count, max, min, distinct count, etc.
    We can do Evaluation for each record or on group or on each field  and also be done by writing a formula.
    We can  do count or sum by manual running total by writing a formula in the formula workshop.
    Based on our requirement we can use both functionalities.
    Please let me know  if you have any queries.
    Regards,
    Naveen.

  • Formula Help - Running Total vs ???

    Post Author: schilders
    CA Forum: Formula
    Good Morning All,
    I'm creating a report that contains a field called CDM Item.  This field indicates whether a particular order set was used for a given record.  Valid entries for this field are numeric 6 through 9.  I would like to create a formula that tells me the number of records that have a cdm item = 6, another formula that tells me the number of records that have a cdm item = 7 etc.  I need to summarize these formulas into pre-defined groups. 
    I was thinking a running total or a manual running total would be useful here.  However, I wanted to get some input from other formula gurus here.  Thanks, in advance, for your help.

    Post Author: yangster
    CA Forum: Formula
    You don't need to create a manual running total for what you are after.simply create 4 running totals ( 1 for each item number) using a running total with the evaluate formula of cdm =  6 (changed for each number)and resetting after whatever grouping you needthe other alternative you could implement if you have mutliple grouping and wanted subtotals on differing levels is to create a formula for each case such as@case_cdm6if cdm = 6 then 1 else 0then insert sum for each formula on all the differing group levels that way you only have to worry about maintaining one formula if the criteria changes

Maybe you are looking for