Conditional Running Totals

I have a report that has conditions that are used to group data into a category.  For instance in the GF1 I have a formula @type of Fee.  It calculates the name of the fee based on certain criteria.  My question concernings summing a field properly for each group and the best way to place it on the report.
EX:  For Demo Fee     I would have a conditional RT to calculate what criteria make up the Demo Fee and excludes those records I don't want in my total.  I do that for each type of fee.    When I go to place the RT formula on the GF1 line do I place each formula on top each each in layers.
@type of Fee           RT_Demo   RT_Sign   RT_Water    on the GF1 line do I take each of the 3 running total fields listed and placed them directly onto each other.  Thanks in advance for any responses!

Please re-post if this is still an issue to the .NET Development - Crystal Reports Forum or purchase a case and have a dedicated support engineer work with you directly.
Bottom line is CR Basic is version 10.5. CR 2008 is 12.2.x.xxxx. Install CR 2008 SP 1 to get .NET support.
And you can't compare COM to .NET, it's like comparing apples and oranges, both fruits but different flavors.

Similar Messages

  • Running Total not working

    Dear all,
    I am creating a new report which needs a conditional running total.
    I need to sum the credits quantity if the following condtions are met
    line_type="S" and
    line_no<3
    I used running total like this
    Field to summarize: lab_credits2.credit_qty
    Type of Summary: SUM
    Evaluate: Use formula
    {lab_credits2.line_type}="S" and
    {lab_credits2.line_no}<3;
    Reset: On change of group (Reason Code).
    When I ran the report, it did not produce the right results, so I placed the line type and line no into the same Group footer and ran the report.
    I found out that the report is not filtering the linetype and line no.
    Result shows
    Line Type ="S" - 100 - Line number =1
    Line Type = "M" - 200 - Line number=6
    and so on.
    The report is grouped by Reason Code.
    Any ideas why would it not be filtering the records?
    Report Record Selection Code
    {lab_credits.credit_date}>={?startdate} and
    {lab_credits.credit_date}<={?enddate} and
    {lab_credits.credit_status} = 2;
    Status=2 is needed there to filter the Order numbers correctly.
    Many thanks
    Regards
    Jehanzeb

    Thanks James,
    I have put all three in detail and used the filteration and it worked under detail section however the results when used in total SUM is produced incorrectly.
    I suspect it might be of database table linkage? or maybe I have done something wrong in the report.
    I am going to create another report and see if that works.
    Will post info here.
    Regards
    Jehanzeb
    Edited by: Jehanzeb Navid on Sep 4, 2008 11:55 AM
    Right I found the issue however I don't know how to resolve it.
    I have 4 tables in the database
    1: Lab Credits - Order_num, Credit_status, Reason_code
    2: Lab Credits2 - Order_num, Line_no, Line_type, Credit_qty
    3: Lab Reasons - Reason_code,Reason_description
    4: Oetrn2 - Order_num
    This is how they are linked up
    Lab_Credits_Order_num = Lab_credits2_order_num and oetrn2_order_num
    Lab_Credits_Reason_code = lab_reasons_reason_Code
    Report Grouping
    Grouped by Reason Code
    Date range - month to date
    Report Record Selection
    {lab_credits.credit_date} in monthtodate and
    {lab_credits2.line_no}<3 and
    {lab_credits2.line_type}="S" and
    {lab_credits.credit_status}=2;
    Now the issue
    When I add sum of qty of lab_credits2_credit_qty into the report Group footer,it produces the right results However when I add
    DistinctCount of Oetrn2_Order_num into the Group footer, it creates totally different Sum of Lab Credit Qty results. (Please note: The oetrn2_order_num results appear fine, however they messup Sum of Lab_credit_credit_qty).
    What do you think where am I doing wrong?
    It has to be something to do with table linkage.
    Regards
    Jehanzeb

  • Running total condition formula

    Hi all!! I am trying to have a running total based on some conditions but my formula is not working. Mabey someone has some idea how to approach this problem
    {CAWP.C7}="committed.aic" or
    {CAWP.C7}="committed.anic" and {TPHASE.CECODE}<>"bonds" or
    {CAWP.C7}="committed.anic" and {TPHASE.CECODE}<>"conserv" or
    {CAWP.C7}="committed.anic" and {TPHASE.CECODE}<>"const contingency" or
    {CAWP.C7}="committed.close" or
    {CAWP.C7}="committed.sunk"
    I am looking to sum only the records that test for all "committed.anic" and not include the "bonds","conserv","const contingency" etc..... from another table
    does any one have any ideas of how to approach this?????

    Try this using braces for each condition
    {CAWP.C7}="committed.aic" or
    ({CAWP.C7}="committed.anic" and {TPHASE.CECODE}"bonds") or
    ({CAWP.C7}="committed.anic" and {TPHASE.CECODE}"conserv") or
    ({CAWP.C7}="committed.anic" and {TPHASE.CECODE}"const contingency" )or
    {CAWP.C7}="committed.close" or
    {CAWP.C7}="committed.sunk"
    Regards,
    Raghavendra

  • Summary on a formula field that makes a condition on a running total

    Hi,
    How come I can't create a summary on a formula field that makes a condition on a running total ?
    My running total field is a counter that counts the number of individuals
    My formula field contains this info :
    IIF ( ( {#counter_running_total} <> 1)
        or ( {#counter_running_total} = 1
              and {status.code} = '04' )
        or ( {#counter_running_total}  = 1
              and {status.code} in \[ 208 , 996 ])
    ,0,1)
    When I right-click on the formula field to insert a summary, it does not allow me.
    Do you have any idea I can show the information in a better way ?
    Thanks
    Steph
    Edited by: Stephanie Charest on Aug 4, 2008 8:00 PM

    Thank you very mutch for your reply, I tried it and it works.
    The thing is, I would like to reset the counter on change of group, and put the manual running total in the group footer.
    Is there a formula I could use to reset the counter ?
    When I write in the group header :
    whileprintingrecords;
    numbervar i=0;
    it does not reset the i to zero, instead, it writes "false" and continues to increment in the footer.
    do you have an idea ?
    Thank's
    Steph

  • How do I use a running total within a selection formula?

    I am developing a report within Crystal Reports 2008.  My goal is to identify any accounts that have zero usage for at least six months in this current year.  I have account number, meter size, read date, usage, and a running total/subtotal by account.
    Here is what the data looks like in the report
    ACCTNO     METER SIZE   READ DATE/TIME               READ_USAGE    Counter
    001022-05                    
    001022-05     2.00              9/28/2009  9:42:00 AM      0.00                     1
                                                                                    1
    001110-09               
    001110-09     2.00             3/2/2009  9:54:13 AM         0.00                      1
    001110-09     2.00             3/26/2009  1:32:28 PM        0.00                      1
    001110-09     2.00             4/27/2009  11:02:11 AM     0.00                      1
    001110-09     2.00             5/27/2009  1:13:53 PM        0.00                      1
    001110-09     2.00             6/19/2009  11:41:20 AM     0.00                      1
    001110-09     2.00     9/1/2009  8:13:25 AM         0.00                      1
                                                                                    6
    My report shows all accounts that have zero usage.  I want to filter the report to only show the accounts that have at least six zero usage reads.  I thought I could add a running total, sum it, and filter the data by using the selection formulas.  Unfortunately I keep getting an error message saying "this field cannot be used becuase it is being evaluated later."  Any help would be appreciated.  This is the first report I have created using crystal.
    Edited by: smwdrw2 on Oct 28, 2009 4:29 PM

    You could Conditionally suppress the account numbers where your running total is less than 6
    You will probably have to put your account number summaries in the group footer, instead of the header.
    Then:
    go to the section expert, click on the group footer for the account number, on the right, next to the word "Suppress" click on the box that says "X-2". In the formula put
    IF<6 then True
    Save and close
    The only way this would not work for you is if you have some sort of grand total that you don't want to include the other groups in.

  • How can I display the vendor associated with result of my running total sum

    I have a report that lists vendors with their most vecent order dates.  I need to set up a rotation so that the vendor with the latest order date is next to be selected.  I used the running total summary to pick the latest date.  How can I display the vendor associated with result of my running total summary?

    If your "latest" order date means the "oldest" order date, why don't you try this:
    Go to Report tab -> Record Sort Expert -> Choose your order date in ascending order
    This will make your oldest order your first record shown. 
    You can then create a running total count for each record.
    Lastly, in your section expert under conditional suppress X+2 formula, write this:
    {#CountRecords}>1
    The result will only show the oldest record in your report.
    I hope that helps,
    Zack H.

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

  • Running totals evaluate more than one criteria

    probably a stupid question but:
    Is there anyway to have more than one criteria in the evaluate for running totals? i need an "on change of field" option and a formula option is there a formula for "on change of field", so i can have on change of field and if not equal to.
    i am using CR2011
    Edited by: angel.hill on Jul 28, 2011 12:14 AM

    Hi Angel
    You can write a manual running total and you can define condition while evalutation the formula :
    @init
    Whileprintingrecords;
    Numbervar sum:=0;   //To initialize your sum
    @evel
    Whileprintingrecords;
    Numbervar sum;
    If <>PREVIOUS() and any other condition then
    sum:=sum+yourdatabasefield;
    @disp
    Whileprintingrecords;
    Numbervar sum;
    Thanks,
    Sastry

  • How to Summarized Running Total and Formula ????

    Post Author: ryan_r
    CA Forum: Crystal Reports
    Hi my name is Ryan, I want to ask something. I have build a report
    that contains Running totals and Formula. What I want to do is I want
    to use subtotal and Summary field for the running total and Formula,
    but I can find the field when I click the dropdownlist in the Subtotal
    dialog box or summary field for the running total and the formula. Is
    there any way that I can use subtotal or summary field for Running
    Totals and formula, I do need some help guys, Thanks. FYI: I use Visual Studio.NET 2003; ASP.NET(C#).regards

    Post Author: ryan_r
    CA Forum: Crystal Reports
    Hi kcheeb, thanks for your advice but it doesn't work sorry. By the way maybe I can explain you more of twisted situation.I have updated my report,
    so im not using runningtotals any more, I'm using summary field and
    formula which are;-the summary field is "Sum of SuspenseVoucher.Realisation" located in Group Footer #3: SuspenseMstr.ProgramID-The formula is "@Balance_Formula" which contain:{SuspenseMstr.Budget}
    - Sum ({SuspenseVoucher.PenggunaanBudget}, {SuspenseMstr.ProgramID})
    also located in the same location as summary field above.FYI: I have three group records which are:-Group #1 : SuspenseMstr.APDate (Appearing in months e.g January 2007)-Group
    #2 : programCategoryMstr.programCategoryID (doesn't have any objects I
    just put some dashed line, the group is only for proper sorting)-Group #3: SuspenseMstr.ProgramIDwhat I want to do is:-in the Group Footer #3, I already put "Sum of SuspenseVoucher.Realisation" and "@Balance_formula"-in
    the Group Footer #2, I want to put Summary of Budget but there's a
    problem in here too, in the budget field there are some data are
    conditionally suppressed. I already tried to put some summary field but
    the summary operation wasn't like what I wanted. What I wanted was the
    sum only evaluate the data that appeared in the report not the
    suppressed, but in the summary the suppressed data keep evaluated. And
    in this location I also want to put Summary of "Sum of
    SuspenseVoucher.Realisation" and the Sum of the @Balance_formula.-
    in the Group Footer #1, I want to add some Summary of "Sum of Budget"
    (which I already explained that this operation has a problem) and I
    also want to put the Sum of "Summary of Sum of
    SuspenseVoucher.Realisation" and the Sum of "Sum of @Balance_formula"-And in the Report Footer I want to add some Grand Total from all of the evaluation above.So
    there are my problems, quite much I would say. I hope this explanation
    helping all of you guys to solve my problem, thanks for spending your
    valuable time for me. This matter is really important for me 'cause I
    want to learn something new from all of you experts as I'm still a
    "toddler" in this situation and also because I work in this field, so a
    BIG thank you for all of you guys out there. Best Regards.

  • Running totals

    Post Author: neils
    CA Forum: Formula
    Hi,
    I have built a crosstab in Crystal XI with the following columns:
    PROFILED BUDGET (a)                            EXPENDITURE TO DATE (b)                        VARIANCE (a-b)
    The profiled budget and expenditure to date columns are both running total fields.  I want the variance column to show the difference between the budget and expenditure. 
    o                                To set the variance field up as a running total, I assume that I would have to specify that I want this formula evaluated after the budget and expenditure fields , however, I can't work out how to do this on a crosstab. 
    o                                Moving the crosstab to the report footer has had no impact.
    o                                If I try to create a basic formula using the running totals, I get the error message "A summary has been specified on a  non-recurring field" - I can't find an explanation of this error message on the help menu.
    any ideas how this can be solved?
    cheers

    Post Author: GailPray
    CA Forum: Formula
    Try creating your own cross tab in the report footer by drawing your own grid and creating individual running totals for each field based on their individual conditions.  Rather than using the cross tab expert.  This way you can create a formula for your Variance column using the running total fields for column a and b.  Itu2019s tedious but it works.

  • Choose Your New Car - IF Then, Conditions, Weighted Totals

    Here is my problem:
    A person really wants a new car. I have 4 cars that are very similar to one another, and the person really likes all four based on appearance only.  I figure that if I ask enough distinguishing yes and no questions, I can narrow it down to one car out of the four that would be best suited for the person and I can be certain they would be happy with it because of the information they provided. 
    So I want to weight each yes/no question (0-4) and create a condition or if-then (forgive me for my numbers illiteracy) so that if they answer yes to question #1 for example, then that weighted number (we will say 3 for this example) which happens to be associated with a honda civic (one of the four cars) will go into a cell that keeps a running total for the honda civic. At the end of the questions, based on the way the person answered, the highest total number would suggest one of the four cars would be best suited for him.
    So, I am looking for a way to create a formula to satisfy what I am hoping to do. Can anyone help?  Below is what I thought it might look like.  Thanks!

    Hi e,
    Interesting! I assume the weightings are your knowledge and opinion, not the customer's wish-list. If so, instead of entering y (4) for Honda Civic airbags, you could just enter 4 (I assume that it gets a 4 because it has side air bags, and you consider those air bags to be reliable). I assume the Chevy Malibu has no side air bags, and so gets 0. Then you have just numbers that are easier to deal with.
    How about this for the Features Table (I renamed this table Features in the left sidebar and added a label in cell A1):
    Features
    side air bags
    spoiler
    kid friendly
    TRUE
    FALSE
    TRUE
    Honda Civic
    4
    0
    0
    Chevy Malibu
    0
    1
    0
    Hyundai Elantra
    0
    0
    2
    Kia Forte Koup
    3
    0
    0
    There are check boxes in Row 2 under each feature (they show here as TRUE/FALSE). Tick means yes, it is important to the customer. No tick means no, it is not important to the customer.
    You can insert check boxes with Inspector > Cells, click on Cell Format to choose tick boxes.
    Add another table and rename it Outcome. The Outcome Table uses IF so that a feature only counts IF a checkbox is ticked. enter this in cell B3:
    =IF(Features :: B$2 = TRUE,Features :: side air bags Honda Civic,0)
    Select and copy down then across to fill to cell D6. Please note that these formulas will only work if you name the Table "Features" otherwise you must use cell references.
    Outcome
    side air bags
    spoiler
    kid friendly
    Total
    Honda Civic
    4
    0
    0
    4
    Chevy Malibu
    0
    0
    0
    0
    Hyundai Elantra
    0
    0
    2
    2
    Kia Forte Koup
    3
    0
    0
    3
    The Total column uses  =SUM(B3:D3)
    Copy down to D6.
    I hope this helps.
    Ian.

  • Running total as header formula

    I am looking for a simpler, more general, or just plain better way to calculate a running total of a column of numbers, such that the running total cell is the sum of a number in the same row & a different column plus the cell just above it in the same column.
    IOW, if the numbers column is H & the running total column is J, I could use =H5 + J4 in cell J5. In J6, I could use =H6 + J5, & so on. I can extend the formula downward without any problems, but I must make an exception for the first row of data: for instance, if row 2 is the first to have a number to include in the running total, then in J2 I must use =H2, since J1 is a header column.
    This means I can't use a simple formula in a header column for the running total. (I want to do this because I will be adding rows as the table is used, & I want all the formulas to automatically be added to each new row.)
    After trying a lot of functions, I finally came up with this one for the header formula:
    =H + INDIRECT(ADDRESS(ROW()-1,COLUMN(),4))
    It works, but I suspect there is an easier, more elegant, or more general formula that (for instance) won't break if I rearrange the columns in the spreadsheet.
    Any comments would be appreciated.

    Yvan,
    Thank you for your comments, & for the formulas. I was hoping there was a simpler way to do this than with INDIRECT & ADDRESS, but apparently not.
    In this particular spreadsheet, I do not need to worry about any blank values in column H because they are the results of a calculation that yields a number even if the row is otherwise blank.
    The ISERROR clause does allow me to name the running total column since without it the formula would be trying to add a string to a number in row two. However, in this particular spreadsheet I do not need to name that column because it is hidden. (The running total number column is used in another column that formats it as part of a string that contains other conditional information.) In the interests of simplicity, I will not add the ISERROR clause to my formula in this spreadsheet but I will keep it in mind for use in other spreadsheets in which the column will not be hidden & needs to be named.
    Of course, as an alternative I could just create the column name as an independent text object. Wherever possible, I tend to favor workarounds like that to reduce formula complexity.

  • Running Total Fields - using formula, but can't get what i want?

    Hi All,
    I have already searched some forum, but still can't figure out what going wrong. Can anyone help me?, please
    I create a view from access named u201CStatementReportu201D and have the following field.
    <InvNo>
    <CustNameC>
    <JobItemNo>
    <InvDate>
    <JobTypeId>
    <JobPrice>
    I create three parameter as CustName, StartDate, EndDate, then I create a Group to group <InvNo> as the report detail and a Running Total Fields for calculate the total of <JobPrice>.
    So far the report is fine. Showing the grouped <InvNo> and the total amount of <JobPrice>
    Then, I want to calculate the <JobPrice> by the condition of <JobTypeId>.
    First, I create a new Running Total Fields
    Field to summarize = StatemetnReport.JobPrice
    Type of summary = sum
    Second, I create a formula as following
    whileprintingrecords;
    global numbervar type1_sum :=0 ;
    if {statementRe.JobTypeId} = 1 then
        type1_sum := type1_sum + {statementRe.JobPrice};
    type1_sum;
    After completed the formula, and i press Ok button.
    A dialog appear "Warning: Reset/evaluate condition formula contains variables. Do you want to keep it?"
    No matter i click Yes or No, I still can't get anything display on the field.
    Edited by: manho88 on Mar 9, 2010 9:42 AM

    Hi,
    Instead of running total use can try this formula.
    Place this formula in the details section.
    whileprintingrecords;
    numbervar jpsum;
    if =111 then
    jpsum:=jpsum +
    else 0;
    You can modify this formula as per your requirement.
    Hope this helps.

  • Formatting Page Running Total - Need Urgent Help !!!

    Hi All,
    We need to format the page running total in European style and US style based on functional currency.
    Our current output is
    +1,200.00+
    Required output
    +1.200,00+
    <?xdoxslt:pat_format_number(12345, ‘##,##0.00’, $_XDOLOCALE)?>
    if $_XDOLOCALE = 'de-DE'
    Returns a number formatted with the specified pattern.
    For example:
    <?xdoxslt:pat_format_number(12345, ‘##,##0.00’, $_XDOLOCALE)?>
    returns
    12,345.00
    But the number 12345 above here is hardcoded but we need the number to be dynamic and it is the page running total.
    We are deriving the page running total in the following way:-
    <xdofo:inline-total
    display-condition="exceptlast" name="InvAmt"><xdofo:show-carry-forward name="InvAmt" format="99G999G999D00"/>
    </xdofo:inline-total
    Any Clues !!!
    Thanks...

    Got the solution and this is very important one !!!
    <xdofo:inline-total display-condition="exceptlast" name="InvAmt"><xdofo:show-carry-forward name="InvAmt" format="99G999G999D00" number-separators=",."/></xdofo:inline-total>
    <xdofo:inline-total display-condition="exceptfirst" name="InvAmt"><xdofo:show-brought-forward name="InvAmt" format="99G999G999D00" number-separators=",."/></xdofo:inline-total>

Maybe you are looking for

  • Help needed regarding Closest srever roles 11.3

    We are running 11.3 in an organization that supports 2100 pc's using zenworks. We have 3 primary servers, a sql server and an audit server. Lately we have been running into issues with our sql process hitting 100% cpu usage on our zen databse server

  • PS CS 5.1 crashing when I use the Quick Select took in the neg format

    I am using PSCS5.1 and when I use the "quick select" tool and use the "Alt" key to turn it to the negitive so that I can cut out stuff I do not want to select I get a message that say's "Adobe PSCS has stopped working" and it closes down the whole pr

  • Can you edit a Smart Collection's criteria?

    i have a Smart Collection which captures images within a specified date range.  I need to extend the date range but can't see a way of editing the Smart Collection criteria.  Can this be done? Thxs Colin

  • OPMN: OC4J_SECURITY won't start - SSO problems

    Hi, After restoring our infrastructure database and oracle home from backups I am unable to get the OC4J_SECURITY to start. I had to really fiddle around with the restoration and it's possible I mucked something up there. Here are relevant parts of t

  • T500 hangs after standby/hi​bernate HELP There has to be many who have this issue

    There has to be alot of people with this issue.  It has happened now on every T500 we bought (5) and cannot figure out why. When the pc is dock or not - leave it alone, it goes to standby, come back and hit Cntrl/Alt/Del, desktop show up, no icons, m