Problem summing repeating fields

For simplicity sake; I have four columns (Travel, Meals, Lodging, Other)that I want a total for line one in column five (line total). I'm also totaling the columns at the bottom. {it works: sum(Travel[*])} I'm using the following FormCalc script to get the total into column five:
sum(Travel[*]+ Meals[*]+ Lodging[*] + Other[*]);
This works for the first row but it obviously repeats the same data for each additional row.
I guess I have to do this in javascript but I don't know much. Can anyone please help?

Hi
In BDC not all the fields are displayed in recording so always select the check box DEFAULT SIZE and record it. Use the fields which are there in these recordings. OR else you will the same issues.
regards
jyo

Similar Messages

  • Sender FCC , problem with Repeating Field under a Sub-structure

    Hi,
    I have an Input File as
    D,TH_ ,10/31/2008,ABC,pieces
    PF, 10/31/2008,11/2/2008,11/3/2008,11/4/2008
    P,mat,CS,100,120,130,125,150,170,120
    P,mat,CS,100,120,100,110,140,120,110
    I need to Implement an FCC to convert this to
    a Structure like this
      Recorset
        Header           1....1
            Unique Id
            date Time
            CustomerCode
            Code
            Unit
        Dates         1
         date          1....n
        Products       1....n
          product      1
          unit         1
          quantity     1.....n
    This this is a Variable recordset type ( i.e each ROW has a Different Structure) the following keys D,PF,P  are defined, for the header, dates, and Product Information.
    The Following FCC parameters are applied
    Document Name :  MT_FILE_INPUt
    Document NameSpace = http://xyz.com
    Recordset Name = "Recordset"
    Recordset structure = Header,1,Dates,1,Products,*
    keyname              = Key
    Keytype               = String
    Header.FieldSeprator = ,
    Header.FieldName = Unique Id,date Time,CustomerCode,Code,unit
    Header.keyValue = 'H'
    Dates.FieldSeprator = ,
    Dates.Fieldname   = 'date'
    Date.keyValue    = 'PF'
    Products.FieldSeprator = ,
    Product.FieldName =  product,unit,quantity
    Product.KeyValue  = 'P'
    Now the Problem is as Follows:
    1) I have a Repeating Field Quantity under the Product and Date under the Dates Sub-structure,  This is not getting Repeated at all.
    Is there a Way to achieve the same
    2) Another Point is That, i do not want to take the key Value in the XML structure after converion, is there a way to avoid it
    Please let me know if any blogs are available
    Any help would be appreciated.
    Thanks,
    Best Regards
    Abhishek

    can u try.. i haven't tired this.
    quantity is occuring multiple times, but if that is fixed no# of occurance,, you can can try with this?
    P,mat,CS,100,120,130,125,150,170,120
    Product.FieldName = product,unit,quantity,quantity,quantity,quantity,quantity,quantity
    let me try ..
    As long as the quanitfy defined under Product.FieldName are more than the input msg quantity values (100,120..), you will be safe...
    Edited by: Anand on Oct 31, 2008 3:54 PM

  • Sum a field in repeat region

    Hi There,
    I am trying to sum a field in a repeat region.
    That is, the repeat region displays on page as per normal but then have a total field based on the sub total fields stored in the data base for each record.
    Any help is appreciated.
    Cheers

    Here's a quick idea of how to do it in CF. If you use PHP the principle would be the same.
    <cfset ThisRowTotal = 0 >
    <cfloop query="getPageLinks">
      <cfset ThisRowTotal = ThisRowTotal + YourSubTotalVariable>
        <cfoutput>#ThisRowTotal#<cfoutput>
    </cfloop>
    That's how it would look, what it is doing is each loop it is adding that loop's subtotal to the "ThisRowTotal" variable, then outputting it, so each loop will show the cumulative sub total.
    Hope this helps.
    Lawrence Cramer - *Adobe Community Professional*
    http://www.Cartweaver.com
    Shopping Cart for Adobe Dreamweaver
    available in PHP, ColdFusion, and ASP
    Stay updated - http://blog.cartweaver.com

  • Problem in sum a field through select command

    Dear Sir(s),
    I want to sum kbetr (no. of packing) for same knumv(invoice no.) in table konv.
    e.g.
    invoice no.           no. of packing
    (knumv)                   (kbetr)
    001                         2
    001                         3
    002                         4
    002                         5
    result should be -
    invoice no                  no. of packing
    001                               5
    002                               9
    code-
    select knumv kschl sum(distinct kbetr)
    from konv
    into table it_konv
    for all entries in it_vbrk
    where kschl = 'ZFQT'
    and knumv = it_vbrk-knumv
    group by knumv kbetr.
    error showing - unkown col. sum(distinct   field list.
    Please help me immediately.
    thanks,
    R.Kapoor

    Hi..
    Change ur Select statement as below .
    <b>select knumv sum(kbetr)</b>
    from konv
    into table it_konv
    for all entries in it_vbrk
    where kschl = 'ZFQT'
    and knumv = it_vbrk-knumv
    <b>group by knumv .</b>
    Here you need not to Retrieve the Field KSCHL since it is anyway given in the WHERE clause.
    Let me know incase of any other issue.
    <b>Reward if Helpful.</b>

  • Creation of HR infotype with repeated fields

    Hi,
       We have a requirement in our project where in we need to implement the repeat field screen structure.
    We have to create an info type with ‘96’ fields in which some of the fields are repeated more than once.
    We have tried to create a table control to represent the repeated fields, for this we have a standard way which SAP follows. We have done the same way but we are not able to get the table control in the info type screen.
    We have done the following steps using this link
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/4f/d52552575e11d189270000e8322f96/frameset.htm
    1) I have created a structure with the repeated fields of the info type
    2) created the entries in Mapping for Conversion of Repeat Structure/Tables (table T588AUTO_MAP) with the repeated fields
    3) For each type LINE screen structure to be used, a corresponding entry was defined in Mapping for Conversion of Repeat Structure/Tables (table T588AUTO_TABLE).
    4) I have created an info type with all these fields where in I should get the repeated fields in the table control format, but this was not happening.
    Is there any task to be done to link all these transactions before going for creation of the info type?
    Can any one suggest me how to get the table format on the screen with all these repeated fields.
    with regards,
    ramu mullapudi

    Hi Choudhury,
    Thanks for your reply. The infotype that you suggested solved my problem.
    Regards,
    RSS.

  • Can i sum time fields?? (i expect that yes....)

    Hi everybody.
    I'm a visual basic programmer, actually, visual studio 2005, now i beginning with crystal report for visual studio 2005, nice and easy to use with the wizard, but,,, if i want to do something i little bit complex i can't find a manual for beginners.
    Now Iu2019m trying to do a report that list fields from a typed dataset, that dataset contains same datetime fields i.e. 1:30 , I put that fields in the details region, all it's ok, but the problem became when i try to sum all the times and totalize then.  The reason (i supposed) it's that the4 crystal can't sum time fields.
    Thinking about this, i suppose that i can do something with code but i can't find nothing about this, Can anybody tell me where is a manual to code in crystal report?
    Well, if somebody have any idea please tell me.

    The Crystal syntax doesn't change much from version to version so you can look at our SDK Guide on Diamond.
    http://devlibrary.businessobjects.com/BusinessObjectsXIR2SP2/en/devsuite.htm
    http://devlibrary.businessobjects.com/BusinessObjectsXIR2SP2/en/en/CrystalReports_dotNET_SDK/crsdk_net_doc/doc/crsdk_net_doc/html/crconformulareference.htm
    If you really want to formula reference for Crystal Reports for Visual Studio .NET 2005 you can look here [http://msdn.microsoft.com/en-us/library/ms225334(VS.80).aspx|http://msdn.microsoft.com/en-us/library/ms225334(VS.80).aspx].
    Edited by: David Hilton on Sep 29, 2008 4:47 PM
    Edited by: David Hilton on Sep 29, 2008 4:48 PM

  • PDF template : how to have a multiple pages repeating field group

    Hello,
    I'm trying to create a PDF template.
    My problem is that my repeating field group is composed of 2 pages, so what my request has to generate will be N * 2 pages.
    But when I put the <?rep_field="BODY_START"?> and the <?rep_field="BODY_END"?> on two different pages, I can't generate the output.
    It looks like those BODY_START and BODY_END has to be on the same page.
    Could anyone confirm and/or provide help regarding my issue ?
    Thanks in advance.
    Regards,
    Nicolas

    Nicolaus, it appears as if Oracle is not willing to support templates generated using Adobe. They give us over a hundred pages on how to define an rtf template and then spend a measly 15 pages on PDF Templates. I have been successful in creating their example using the PO in the User Guide, but unsuccessful in repeating the outer group(which they don't tell you how to do or provide examples). So in summary you can print one PO at a time and the feature works great, but try to print more than one and you are screwed. Maybe it is time for someone from Oracle to make a post and make a believer out of all of us.

  • Repeating  field values per paage in Master Detail Report

    I know there are lots of threads about repeating fields values across pages but not seem to work that I have tried and I was looking for a simple resolution to my problem.
    I have a master detail report like:
    Deptno: 10 Dname: Accounting
    Empno Surname Job Sal
    1234 Smith Clerk 1000
    1235 Jones Clerk 1200
    Deptno: 20 Dname: Research
    Empno Surname Job Sal
    2234 Smith Clerk 1000
    2235 Jones Clerk 1200
    etc. The employee data is displayed in a Word table.
    Now if I use the standard emp/dept tables (with only 14 employees) the report paginates properly and I see one department per page and the corresponding employees per page. I have used the <?split-by-page-break: ?> tag. A sample of the rtf file is:
    <?for-each:dept?>Dept: <?deptno?> Name: <?dname?>
    TABLE of EMPS (via insert -> table ->advanced etc)
    <?split-by-page-break: ?>
    <?end for-each?>
    Everything works fine but if I then apply a larger xml file to this rtf where the number of employees spill over onto another page the deptno and the dname do not print before the table when I want them to.
    I have tried putting things into Word headers, using the <?start:body?> tag and a couple of other ways (like @section). Could someone be quite explicit about the steps I need to follow (rather than just say put it in a header) to make sure that if the employees spill over the page the deptno and dname will display. I don't know if its made more difficult because I have multiple departments but any help would be appreciated.

    I sent a template to Chris who was able to solve the problem.
    The change that he made was from:
    <?for-each:dept?>Dept: <?deptno?> Name: <?dname?>
    TABLE of EMPS (via insert -> table ->advanced etc)
    <?split-by-page-break: ?>
    <?end for-each?>
    to:
    Dept: <?deptno?> Name: <?dname?>
    <?start:body?><?for-each@section:dept?>
    TABLE of EMPS (via insert -> table ->advanced etc)
    <?end for-each?><?end body?>
    That is, he used the start and end body tags and the section attribute and took out the <?split-by-page-break: ?> tag. I put back in the split page tag on the template he gave me but it gave me an extra page each time the department changed. So maybe you can really only use one of the other.
    Regardless, Chris sorted it out for me, so thanks.

  • =SUM(IIF(Fields!OPTION_CODE.Value="M","0",Fields!COST.Value * Fields!TOTAL_UNITS.Value )) =IIF(Fields!OPTION_CODE.Value="P","0",SUM(Fields!COST.Value * Fields!TOTAL_UNITS.Value )) =SUM(IIF(Fields!OPTION_CODE.Value="M",CDbl(Fields!COST.Value * Fields

      in this i want to calculate only Option code 'M' Amount in gross total.BUT MY Gross total calculating M and P Amount.  option code P value should visible but not to add.
    please any body help me to writing any function
    =SUM(IIF(Fields!OPTION_CODE.Value="M","0",Fields!COST.Value * Fields!TOTAL_UNITS.Value ))
    iam writing like below its showing error
    =SUM(IIF(Fields!OPTION_CODE.Value="M","0",Fields!COST.Value * Fields!TOTAL_UNITS.Value ))
    =IIF(Fields!OPTION_CODE.Value="P","0",SUM(Fields!COST.Value * Fields!TOTAL_UNITS.Value ))
    =SUM(IIF(Fields!OPTION_CODE.Value="M",CDbl(Fields!COST.Value * Fields!TOTAL_UNITS.Value), CDbl(0,0)

    Hi Pullela venu,
    I have checked the expression and found that you have incude the string "0" in the SUM function which will cause the error, please remove the "" of the value 0 as below to have a test:
    =SUM(IIF(Fields!OPTION_CODE.Value="M",0,Fields!COST.Value * Fields!TOTAL_UNITS.Value ))
     =IIF(Fields!OPTION_CODE.Value="P",0,SUM(Fields!COST.Value * Fields!TOTAL_UNITS.Value ))
    For the last expression as below is not correct, CDBL function format is CDBL(expression):
    =SUM(IIF(Fields!OPTION_CODE.Value="M",CDbl(Fields!COST.Value * Fields!TOTAL_UNITS.Value), CDbl(0,0)
    Modify as below:
    =SUM(IIF(Fields!OPTION_CODE.Value="M",CDbl(Fields!COST.Value * Fields!TOTAL_UNITS.Value), CDbl(0.0) )
    If the problem still exists, please provide the error message if the expression throw any error.
    Any problem, please feel free to ask.
    Regards
    Vicky Liu

  • What is the difference between   nvl(sum (field), 0) & sum(nvl (field,0)) ?

    What is the difference between nvl(sum (field), 0) & sum(nvl (field,0)) ?
    For the below table data i don't see any different in results
    CREATE TABLE FRUITS
    TYPE VARCHAR2(10 BYTE),
    VARIETY VARCHAR2(10 BYTE),
    PRICE NUMBER(18,2)
    TYPE     VARIETY          PRICE
    apple     gala          2.79
    apple     fuji          0.24
    apple     limbertwig     2.87
    orange     valencia     3.59
    orange     navel          9.36
    pear     bradford     7.77
    pear     bartlett     7.77
    cherry     bing          2.55
    cherry     chelan          6.33
    pear     bradford     
         navel          6.39
    select variety, nvl(sum(price),0)
    from fruits
    group by variety;
    VARIETY     NVL(SUM(PRICE),0)
    limbertwig     2.87
    bartlett     7.77
    bing     2.55
    marathon     0
    gala     2.79
    fuji     0.24
    navel     15.75
    bradford     7.77
    chelan     6.33
    valencia     3.59
    select variety, sum(nvl(price,0))
    from fruits
    group by variety;
    VARIETY     SUM(NVL(PRICE,0))
    limbertwig     2.87
    bartlett     7.77
    bing     2.55
    marathon     0
    gala     2.79
    fuji     0.24
    navel     15.75
    bradford     7.77
    chelan     6.33
    valencia     3.59
    no difference in output.
    what is the difference?
    Thanks in advance

    Do you see the difference now?
    PRAZY@11gR1> create table testing(field number);
    Table created.
    Elapsed: 00:00:00.10
    PRAZY@11gR1> insert into testing select null from dual connect by level<=5;
    5 rows created.
    Elapsed: 00:00:00.00
    PRAZY@11gR1> select * from testing;
         FIELD
    Elapsed: 00:00:00.01
    PRAZY@11gR1> select sum(nvl(field,1)) from testing;
    SUM(NVL(FIELD,1))
                    5
    Elapsed: 00:00:00.00
    PRAZY@11gR1> select nvl(sum(field),1) from testing;
    NVL(SUM(FIELD),1)
                    1
    Elapsed: 00:00:00.00In the former, we are substituting 1 to null value and summing-up. hence we got 5. in the later, we are summing-up the null, which is null and substituting 1 if the result is null. so we got 1.
    Regards,
    Prazy

  • Problem with currency  field in smart form

    hi
    friends ..
    i had problem with currency field in smartform iam printing 5 currecny
    fields after the main window .But not getting printed on right way gets printed down from the given mesaurement and i get lot of gap betwen the
    each fields for ex.
    33,260.00
    120.00
    0.00
    0.00
    0.00
    i thought the the problem is with space .so iwanted to condense it but cannot as it is currency field so move into character fields .but the user want out put in currency format like 22,60.20 if i  get the value in char variable i get 2260.20 which i dont want .
    so pls help me how to condense or shift left and print the currency field on right place.
    regards
    answers will be rewarded points.

    hi,
    this is a normal problem u can avoid this by moveing these currencu value to a character field then print the char field us ing condece... &var(C)&..
    eve if not solve the problem use the TEMPLATE node..
    Please Close this thread.. when u r problem is solved. Reward all Helpful answers
    Regards
    Naresh Reddy K

  • Trouble when attempting to Sum Calculated Field.

    I had to create a calculated field called RI_Limit which contains static data.  (Developers/DBA could not enter it into the database at this time, so this was a work around. 
    The calculated field is setup as such:
    =iif(Fields!Location_LOCATION_NAME.Value = "a", 8, iif(Fields!Location_LOCATION_NAME.Value = "b",2, iif(Fields!Location_LOCATION_NAME.Value = "c",0, iif(Fields!Location_LOCATION_NAME.Value = "d",0, iif(Fields!Location_LOCATION_NAME.Value = "e",1, iif(Fields!Location_LOCATION_NAME.Value = "f",1, iif(Fields!Location_LOCATION_NAME.Value = "g ",0, iif(Fields!Location_LOCATION_NAME.Value = "h",0,iif(Fields!Location_LOCATION_NAME.Value = "i",4,iif(Fields!Location_LOCATION_NAME.Value = "j A",0,iif(Fields!Location_LOCATION_NAME.Value = "k",0,iif(Fields!Location_LOCATION_NAME.Value = "l",7,iif(Fields!Location_LOCATION_NAME.Value = "m",0,iif(Fields!Location_LOCATION_NAME.Value = "n", 1, iif(Fields!Location_LOCATION_NAME.Value = "o",0, iif(Fields!Location_LOCATION_NAME.Value = "p",1, iif(Fields!Location_LOCATION_NAME.Value = "q",3, iif(Fields!Location_LOCATION_NAME.Value = "r",1, iif(Fields!Location_LOCATION_NAME.Value = "s",1, iif(Fields!Location_LOCATION_NAME.Value = "t",3, iif(Fields!Location_LOCATION_NAME.Value = "u",5,iif(Fields!Location_LOCATION_NAME.Value = "v",0,iif(Fields!Location_LOCATION_NAME.Value = "w",0,"NA")))))))))))))))))))))))
    and I setup a textbox with that expression and the numbers fill in correctly with its cooresponding site name.
    However, when I go to sub total or total, I get a much larger number than expected. (See screenshot)
    I have searched the internet on a way to calculate both the total by Location Level 2 and LOB total, but nothing that pertains to the specific issue where by calculated field contains static data.  Nothing I try produces an accurate sum.  Any suggestions?

    Hi Katherine,
    Sorry for taking a few days to reply.
    I tried the suggestion, but it it still not summing my calculated fields.  The total row will calculate my other cells okay but not the calculated fields that I had to add to the report.  When I attempted to write an expression to sum the calculated
    fields I get the following error message. 
    The expression used for the calculated field '=sum(iif(Fields!Location_LOCATION_NAME.Value = "test", 8, iif(Fields!Location_LOCATION_NAME.Value = "test1",2, iif(Fields!Location_LOCATION_NAME.Value = "test2",0, iif(Fields!Location_LOCATION_NAME.Value = "test3",0, iif(Fields!Location_LOCATION_NAME.Value = "test4",1, iif(Fields!Location_LOCATION_NAME.Value = "test5",1, iif(Fields!Location_LOCATION_NAME.Value = "test6 ",0, Fields!Location_LOCATION_NAME.Value = "test7",0,Fields!Location_LOCATION_NAME.Value = "test8",4,Fields!Location_LOCATION_NAME.Value = "test9",0,Fields!Location_LOCATION_NAME.Value = "test10",0,Fields!Location_LOCATION_NAME.Value = "test11",7,Fields!Location_LOCATION_NAME.Value = "test12",0,Fields!))' includes an aggregate, RowNumber, RunningValue, Previous or lookup function. Aggregate, RowNumber, RunningValue, Previous and lookup functions cannot be used in calculated field expressions.
    The Espression for the calculated field I am attempting to sum is the following:

  • How to sum a field in smartform

    hi experts,
    i m new to smartform. i made a smartform in which i get the output in a tabular form......
    i want to sum a field. how can i get the sum in the footer?

    Hi
    Welcome to SDN forum
    see this and doa ccordingly
    Subtotals - Check the link...
    Re: Subtotal with Table Node in smartforms
    You can use the PROGRAM LINES node to calculate the page totals in Table node.
    Table Node has three sections:
    Header: (Triggered once in the beginning of a page)
    Create a Program lines node to reset the value of TOTAL to 0.
    Main Area (For each row of internal table)
    Create a Program lines node to add the Value to TOTAL
    Footer (Triggered once in the End of a page)
    Display the TOTAL
    Note: 1) You can declare the TOTAL variable in the GLOBAL Definitions under GLOBAL DATA.
    2) In the PROGRAM lines always pass the TOTAL in both INPUT and OUTPUT parameters
    <b>Reward points for useful Answers</b>
    Regards
    Anji

  • Sum calculated field in report

    Hi, I have a report that groups by employee then by machine. In this report I sum several fields, but need to sum a calculated field and can't figure it out. This is the calculation:
    <?( QTY_MOVED) div ( TIME +.001 ) div ( INVERSE + .001)?>
    This is a total field using a field that works fine.
    <?sum(current-group()/QTY_REJ)?>
    How do I incorporate the calculation in the <?sum(current-group()/.............I get errors if I just put in the calculation above.
    thanks!

    Thank you for your help. After taking your advice and getting it to work by messing around with the brackets, management has changed their mind on the calc. Now they want me to use this calculation:
    SELECT EMPLOYEE, SUM(QTY_MOVED), SUM(QTY_REJ), SUM(TIME), (nvl([b]sum(QTY_MOVED),0)/nvl(sum(TIME),0))/nvl(sum(INVERSE),0) eff ,'DIRECT'
    FROM VW_TIMETRACK
    WHERE START_DATE >= :BEGIN
    AND START_DATE <= :END
    AND WORK_ORDER <> ' '
    GROUP BY EMPLOYEE
    to get the average. Now the weird thing is, I can get the value in toad, and I can get it to output in raw xml data, but when I try to add the eff field right next to the sum(time) field in the word form, nothing shows up. Absolutely no data. But it is in the xml. I'm using <?sum(current-group()/EFF)?> , just like I am for <?sum(current-group()/TIME)?> . I've made it text, numeric, decimal. Nothing is coming out.

  • Sum after field change

    Does any one know how to sum a column upon the field change of another column?  For instance;  a construction estimate is dividedinto, say 50 divisions (categories). Each entry into my general ledger, a numbers spread sheet, has a column for, Job, and division.  To bill a job I would filter by job name, then sort the division column, accending.  I would then right click, and sum after field change.  In this way I would have the sum of each divisions costs to date, and compare it with the original estimate.  The new numbers update does not seem to have this feature, (sum after field change).  Does anyone know how to accomplish this, perhaps with sum if?

    Numbers seems to perform calculations when any dependencies are changed.  so entering a new number should cause a sum to update.
    try this as an experiment:
    in a small table make the last row a footer row then in footer of column A enter the formula:
    =sum(A)
    like this:
    now enter values in the column:

Maybe you are looking for