SUM function with condition in RTF template

Hi All,
I have a problem in calculating the SUM in RTF template with condition,
Here is the XML
- <LIST_G_LINE_NOTES>
- <G_LINE_NOTES>
<LINE_TRX_ID>1567856</LINE_TRX_ID>
<LINE_ID />
- <LIST_G_TRX_LINE>
- <G_TRX_LINE>
<CF_ITEM_NO>SDCN1144B</CF_ITEM_NO>
</G_TRX_LINE>
</LIST_G_TRX_LINE>
- <LIST_G_LINE_EQUIVALENT_UNIT_PRICE>
- <G_LINE_EQUIVALENT_UNIT_PRICE>
<LINE_EQUIVALENT_UNIT_PRICE>-15.99</LINE_EQUIVALENT_UNIT_PRICE>
<LINE_EXCHANGE_EXTENDED_AMOUNT>-223.86</LINE_EXCHANGE_EXTENDED_AMOUNT>
<CUSTOMER_TRX_LINE_ID>1567856</CUSTOMER_TRX_LINE_ID>
</G_LINE_EQUIVALENT_UNIT_PRICE>
</LIST_G_LINE_EQUIVALENT_UNIT_PRICE>
- <LIST_G_TRX_LINE>
- <G_TRX_LINE>
<CF_ITEM_NO></CF_ITEM_NO>
</G_TRX_LINE>
</LIST_G_TRX_LINE>
I need the summation of field LINE_EXCHANGE_EXTENDED_AMOUNT with the condition CF_ITEM_NO!=''
can anybody help me with the solution.
Thanks in Advance

Kavipriya,
Here is the XML
<LIST_G_LINE_NOTES>
<G_LINE_NOTES>
<LINE_TRX_ID>1567856</LINE_TRX_ID>
<LINE_ID />
<LIST_G_TRX_LINE>
<G_TRX_LINE>
<LINE_DELIVERY_ID />
<DISCOUNT>0</DISCOUNT>
<CP_LN_TAX_AMT />
<CF_ITEM_NO>SDCN1144B</CF_ITEM_NO>
</G_TRX_LINE>
</LIST_G_TRX_LINE>
<LIST_G_LINE_EQUIVALENT_UNIT_PRICE>
<G_LINE_EQUIVALENT_UNIT_PRICE>
<LINE_EXCHANGE_EXTENDED_AMOUNT>-223.86</LINE_EXCHANGE_EXTENDED_AMOUNT>
</G_LINE_EQUIVALENT_UNIT_PRICE>
</LIST_G_LINE_EQUIVALENT_UNIT_PRICE>
</G_LINE_NOTES>
Edited by: user13012317 on Mar 10, 2011 11:00 PM

Similar Messages

  • Using OR condition in RTF Template

    Hi,
    How to use OR condition in RTF?
    say for example,consider the EMP table.
    I want to show the employees of department 10 and 20 in my XML Publisher report.
    How can i write --
    if deptno = 10 or deptno =20 in RTF template

    you can add the condition in RTF template
    <?if:XMLfield=30 or XMLfield=10 ?> to display <?end if?>

  • FR Studio - Sum formula with conditional replacement not working

    Hi All,
    I'm on Hyperion FR Studio 11.1.2 and trying to build a report against our HFM information.
    I'm building a drillable income statement report that conditionally replaces any future months' information with a "-". However, when I try to use the [A:L].sum function to sum up all the months to get to a YTD value, the result comes up with nothing. The reason I'm using the conditional replace is because I don't want the periodic amount pulling through for the next month as a negative number and subsequently make the YTD sum zero.
    I also tried to change the conditional replace to "0" hoping it would recognize a number better than a dash, but the summation formula still didn't work. I'm also hesitant to use the "YTD" view to pull the YTD column because I have the report scaled to thousands. The report does not always foot when adding the rounded periodic values vs. pulling a rounded YTD value.
    Does anyone have a suggestion on how to build this report better or how to get the summation formula to work?
    Thank you!
    MR

    Might be best to open an SAP message.  But till then try the following.  It may work-
    include two formulae in your query
    Formula1 = First Day of Next week
    Formula2 = Original Promise Date
    Calculate Past due Days = Formula1 -Formula2
    You can hide both Formula1 and Formula 2 in query view. (or you can leave them open temporarily to see if they are actually getting populated). Also ensure that the dates on which the replacement path is being done are present in the query view.
    I dont know why but this worked for us.

  • "Or" condition in RTF Template

    Hello,
    In my RTF template, I try to test a statement for two values. I tried
    <?xdofx:if :A!='0' or B!= '0'?>
    <?if:A!='0' or B != '0'?>
    It doesn't work : there isn't any error but the result is wrong.
    Is there another syntax I've got to use ?
    Thanks
    Version : BI Publisher 10g
    Edited by: jbg on 4 oct. 2011 23:49

    Condition usage looks fine.
    Do these conditions individually work? Whats is your requirement?
    If possible paste a sample xml here

  • Problems with check printing RTF template

    To BI Publisher Gurus,
    I am working on the check printing RTF template and facing a few issues with page breaks, filling the insufficient invoice lines with template and positioning of the table(s) itself inside the RTF template.
    For page break, am using the following piece of code just before the end of all of my FE loops.
    <xsl:if xdofo:ctx="inblock" test="position()-1<count($inner_group)"><xsl:attribute name="break-before">page</xsl:att:attribute></xsl:if>
    the $inner_group is my group for G_INVOICES to loop through all the invoices of a check in G_CHECKS group.
    The problem I'm facing is, everytime a check is printed its printing a blank page in between. Searched all the earlier forum posts but none of the solutions worked in my case.
    Second issue, for filling the insufficient invoice lines (in my case, am printing 26 invoices per page per check), the call to the blank lines template is repeating twice and found no way to get rid of it.
    Third issue, if the check is running into a second page, the call to the blank lines template does not work and the position of the bottom part of check is getting misaligned.
    I am ready to send my template and the sample XML file to look at. Thanks for your time and effort.
    -Uday

    Hi Tim,
    Hi Tim,
    Could you please send me the sample rtf. We are also using APXPBFEG program for check printing..
    Also I have problem in generating dots(....) in the check where if total invoices lines are 37 and we have only one line of invoice then I have to generate 36 dots (.) in the invoice porition of the check..
    I appreciate your help..
    Thanks
    Krishna
    [email protected]

  • If like condition in rtf (template for oracle report)

    i'm begineer developer in oracle ebs i'm using report builder and rtf (xml) template to build report
    can anyone help my i want to make 2 layout in 1 template (1 rtf file) and give condition with if, lower and like (in sql i'm use like) but is error
    i give this query in my rft template:
    <?if: lower(WORK_ORDER_TYPE) like 'breakdown'?>
        <?start:body?>
            my_template
        <?end:body?>
    <?end if?>please help my for this problem
    thank you very much

    You can use choose too,
    note: the conditions are same
    <?choose:?>
    <?when: SHIP_COUNTRY_CODE=’IT’?>
    <?concat(‘Iscrizione Registro AEE n.’,WEEE_REG_NUM)?>
    <?end when?>
    <?when: SHIP_COUNTRY_CODE=’IT’?>
    <?concat(‘WEEE Registration No.’,WEEE_REG_NUM)?>
    <?end when?>
    <?end choose?>

  • Menu parameter and condition in rtf template

    Hello Guys,
    I have a problem with the .rtf xml condition for my
    menu parameter.
    <?sum(COUNT
    (../P_TIME_2 =2011)
    )?>
    the above does not work. I was wondering if a "IN" clause
    or something is needed but I dont know the syntax well.

    Hello AlexAnd,
    Thanks for your reply. Unfortunately I cant post the XML here (I dont even know how to see the xml).
    Let me explain what I did so far:
    I just added a field using the BI publisher Word Plugin (.rtf).
    BI Publisher Tab - > ab¦Field - > select fied and "sum" as caluclation method in window and that popped up- > double click on field and look
    at the code.
    Now this code says
    <?sum(mySalaryCount)?>
    I want to sum up mySalaryCount from the database but only when the column for a specific row
    has the right year value.
    lets say the one that has the value 2011. So I extend to code.
    <?sum(mySalaryCount)
    (../menuParamter_selected_year =2011)
    ?>
    the problem is, the above does not work. it works for "normal" parameters but does not seem to work for
    menu parameters (as set in the bi publisher data model)
    I guess the menuparameter is a list/array and hence the = is not the right operator.
    *in my case a menu parameter                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • [WebIntelligence Reporting] How to use count function with condition !?

    Post Author: xuanthuyit
    CA Forum: WebIntelligence Reporting
    Hi everyone,
    I want to make a report like this  with WebIntelligence reporting.
    I want to show the number of Outlet of each chanel (Horeca, Grocery, Convenience) at the end of report !
    But I don't know how to do that with WebIntelligence Reporting.
    Please help asap. . .
    Thank you verry much,

    Post Author: jsanzone
    CA Forum: WebIntelligence Reporting
    xuanthuyit:
    Apparently =count() &#91;and use of a where&#93; was permissible in previous versions of BusObjects, however, things in XI are different (as other users tell me, being XI is my first experience w/ BusObj...), so anyhow, here is the solution to your question.
    You will have have to create two variables for each condition you have.  One variable will be the "helper" and the other variable will be the "worker".  For instance, create a variable called channel_x and the formula:  =if(channel="haney";<metric>;0)  (where "haney" is the name of your organization and <metric> is the metric you are using to count or sum things in your report).  Once channel_x is saved create another variable called channel_x_count and the formula:  =sum(&#91;channel_x&#93;).  Once channel_x_count is saved, then on your report towards the bottom you can use the Template bar to drag in a new table (perhaps you want to use the Horizontal Table type), and then you can drag channel_x_count into your new table.  You will have to repeat the creations of more channel_x type variables (maybe call it channel_y and channel_y_count) or something more descriptive, but in any case substitute the "haney" constant for the next store you want to track, etc, etc.

  • Error while sorting in combination with xdofx in rtf template

    I'm trying to sort my invoices in a rtf/xml template.
    To do so I used a statement I found on google:
    <?sort:xdofx:lpad(H_FACTUUR_NR,15,’0’)?>
    The error is:
    java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at oracle.apps.xdo.common.xml.XSLT10gR1.invokeNewXSLStylesheet(Unknown Source)
         at oracle.apps.xdo.common.xml.XSLT10gR1.transform(Unknown Source)
         at oracle.apps.xdo.common.xml.XSLTWrapper.transform(Unknown Source)
         at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(Unknown Source)
         at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(Unknown Source)
         at oracle.apps.xdo.template.FOProcessor.createFO(Unknown Source)
         at oracle.apps.xdo.template.FOProcessor.generate(Unknown Source)
         at RTF2PDF.runRTFto(RTF2PDF.java:629)
         at RTF2PDF.runXDO(RTF2PDF.java:442)
         at RTF2PDF.main(RTF2PDF.java:289)
    Caused by: oracle.xdo.parser.v2.XPathException: Namespace prefix 'xdofx' used but not declared.
         at oracle.xdo.parser.v2.XSLProcessor.reportException(XSLProcessor.java:806)
         at oracle.xdo.parser.v2.XSLProcessor.newXSLStylesheet(XSLProcessor.java:571)
    Any advise?
    Best regards,
    Joost.

    I used the following XSL and its Working !
    <?xdoxslt:xdo_format_date($_XDOXSLTCTX, "YOUR COLUMN",'DD-MMM-YYYY HH12:MI:SS AM')?>

  • How to Print Footer details conditionally in RTF template ( XML Bi report)

    Hi,
    I have a XML ( BI) report. in which i am printing carry frwd / running total/ sub group total values in the footer section.
    I have add one more condition to display the footer values based on the <xdofo:show-carry-forward ...> values.
    Please suggest and help me on this, how to handle this case.
    Regards,
    KAP.

    Hi,
    Thanks for the reply...
    Actually i am looking for the following scenarios :
    1. i want to Hide/ Don't show last 3-pages Footer information in the report.
    2. While i am displaying the Carry forward information in the report
    a. if the page/ running total is 0, i don't want to display the footer information.
    b. only case if the page/ running total is > 0, i want enable footer information dynamically for each page.
    i have done as follows :
    in the Template main body :
    *<?template:footer?>*
    **1000* *1000**
    *<?end template?>*
    and for behind 1000 currently :
    <xdofo:inline-total display-condition="exceptlast" name="RUNAMT"><xdofo:show-carry-forward name="RUNAMT" format="99G999G999D00"/></xdofo:inline-total>
    it was printing the " RUNAMT " calculated page total sucessfully. but here if the Total = 0 then i don't want to show the value in FOOTER...
    Thanks in Advance.
    Please let me know, if more information required to help..
    KAP..

  • Limit of for each conditions in rtf templates

    Hi Everyone,
    I have a use case where i need to genereate a report by using values from two data sets. data sales, cost.
    Data set sales have four columns product1, product 2, product 3, product 4
    Cost has cost1,cost 2, cost 3, cost 4.
    I need to display in below format
    product 1| product 2| cost 1|cost 2| product 3| product 4| cost 3| cost 4|
    To get above format i am using four for each condition groupings two for each data set
    <?for-each:/data/sales?><?product1?>|<?product2?><?end for-each?>|<?for-each:/data/cost?><?cost1?>|<?cost2?><?end for-each?>|<?for_each:/data/sales?><?product3?>|<?product 4?><?end for-each?>|<?for-each:/data/cost?><?cost3?>|<?cost4?><?end for-each?>
    If i use first two for each conditions i am able to see values in template but if i use four line is missing in the template.
    I did not understand where lies the problem.
    Please let me know if you need more info.
    Regards
    Sandeep

    If you have product ID or key in the cost data set, then you can follow the method in this post to display data:
    http://blogs.oracle.com/xmlpublisher/2009/09/formatting_concatenated_dataso.html

  • Using Wild Card % in the IF condition of RTF templates

    Hi every one, we have a requirements to make bold whenever COL1 ends with Total. Below logic is not working. Can any body help?
    Thanks in advance.
    <?if@row:COL1like '%Total'?> <xsl:attribute name="font-weight" xdofo:ctx="incontext">bold</xsl:attribute><?end if?>
    -Phani Reddy
    ADP india,
    [email protected]

    You can do these
    <?if@row:contains(COL1,'Total')?> <?end if?>
    or
    <?if@row:ends-with(COL1,'Total')?> <?end if?>

  • ?for-each-group? dosen't work with page break - rtf template???

    Hello all,
    When I give a page break inside the for-each-group the group doesn't iterate any code after the page break. I can't give <?split-by-pagebreak?> in this case because I want that loop to be iterated for every department, and should show the report in one column(ms word column), and the department description in two columns.....as this has to happen for every department I can't write separate code........everything should go into one file......
    Final file should look like:
    <for every department>
    <department_report-a table>--one column(ms word column)
    <department_description-a huge text>--two columns(ms word columns)
    <next department>
    how can I achieve this - please help, its urgent.
    Thanks for your time.
    DK

    bipuser thanks for your response
    i will have table data also so i cannot keep in the same line.
    its strange for the last 2-3 days below syntax gave me space at the beginning of each group now it is working i didnt do any change
    <?for-each:G_1?>
    ABCDEFDG
    <?split-by-page-break:?><?end for-each?>

  • SUM Function in RTF Template

    Hi buddies,
    can we use functions like SUM,AVG etc. in the RTF Template.
    If possible please give adivce for the below scenario
    I have one column in the main body table "Extended Amount", I want to sum this field for the another column Total Extended Amount below this Main table.
    with regards
    Ram

    Hi All,
    I have a problem in calculating the SUM in RTF template with condition,
    Here is the XML
    - <LIST_G_LINE_NOTES>
    - <G_LINE_NOTES>
    <LINE_TRX_ID>1567856</LINE_TRX_ID>
    <LINE_ID />
    - <LIST_G_TRX_LINE>
    - <G_TRX_LINE>
    <CF_ITEM_NO>SDCN1144B</CF_ITEM_NO>
    </G_TRX_LINE>
    </LIST_G_TRX_LINE>
    - <LIST_G_LINE_EQUIVALENT_UNIT_PRICE>
    - <G_LINE_EQUIVALENT_UNIT_PRICE>
    <LINE_EQUIVALENT_UNIT_PRICE>-15.99</LINE_EQUIVALENT_UNIT_PRICE>
    <LINE_EXCHANGE_EXTENDED_AMOUNT>-223.86</LINE_EXCHANGE_EXTENDED_AMOUNT>
    <CUSTOMER_TRX_LINE_ID>1567856</CUSTOMER_TRX_LINE_ID>
    </G_LINE_EQUIVALENT_UNIT_PRICE>
    </LIST_G_LINE_EQUIVALENT_UNIT_PRICE>
    - <LIST_G_TRX_LINE>
    - <G_TRX_LINE>
    <CF_ITEM_NO></CF_ITEM_NO>
    </G_TRX_LINE>
    </LIST_G_TRX_LINE>
    I need the summation of field LINE_EXCHANGE_EXTENDED_AMOUNT with the condition CF_ITEM_NO!=''
    can anybody help me with the solution.
    Thanks in Advance

  • Conditional Formatting in RTF templates

    HI
    I am just going around with designing of rtf templates. I have a question regarding the conditional formatting feature. The question is
    IF i am having different type of customers(corporate,individual,etc..) passed as parameters, Can an particular cell be formatted with different colors for different customers. for example, if the parameter is corporate customer the the color of particular cell should be RED in color, and if parameter is Individual the color of cell Must be GREEN in color.
    Please help me out with this.
    Thanks in advance

    Yes you can conditionally format the individual cells.
    Take a look at the guide (link provided) and search for "Cell Highlighting":
    http://docs.oracle.com/cd/E10415_01/doc/bi.1013/e12187/T421739T481157.htm
    Example code: <?if:debit>1000?><xsl:attribute xdofo:ctx="block" name="background-color">red</xsl:attribute><?end if?> <?debit?>
    Thanks,
    Bipuser

Maybe you are looking for

  • Creating Multiple JVMS with JNI_CreateJavaVM

    Hey there I'm trying to create 2 JVMS in from within a C++ program - in order to start a couple of Java servers. I've been hunting around the discussion groups and the web and there are references to not being able to create more than a single JVM wi

  • Different number range for recurring docs for diff company code

    Hi, We define X1 as the number range for recurring company codes. For 2 company codes, we have given the same number range for X1, 100000-1999999 Now when a recurring doc is posted for both the company codes monthly, the company codes have same dco n

  • Invoice status info to vendors

    Hello All Is there any readymade package available from SAP, wherein the suppliers can check the invoice status. For e.g. Whether the Invoice has been entered in SAP, what is the due date, whether it is already paid, or if there is any block? Current

  • Crystal Reports Replacement?

    Im in the market to find what other companies are replacing Crystal Reports with. Im interested in some sort of PDF solution - but I want to know what other companies are using instead of Crysytal. Either a WYSIWYG editor for building reports and bin

  • Errors installing CC2014

    I can't seem to find anything on this. If there's a discussion already please give me a link. I'm trying to install on a Win 8.1 x64 box and these are the error messages I'm getting: Exit Code: 7 Please see specific errors below for troubleshooting.