How to round numbers in RTF templates?

Hello!
I'm using BI Publisher for Word (Oracle BI Publisher Builder for Word 10.1.3.4.1) to build a template to my BI Publisher report and I want to calculate this:
avg(X)/(avg(Y)-avg(Z)/0.9)
The result should be rounded to 3 places.
I tried:
<?(sum(X) div count(X)) div ((sum(Y) div count(Y)) - (sum(Z) div count(Z)) div 0.9)?>
and I obtained the expected result.
But, when I try to round in this way:
<?xdofx:round((sum(X) div count(X)) div ((sum(Y) div count(Y))-(sum(Z) div count(Z)) div 0.9),3)?>
I obtain 0 when is expected other value.
Can someone help me?

Hi ,
You can select the number format in RTF template .Double click the Form Field select
Type :Number
Number Format :#,##0.000
Thanks.

Similar Messages

  • How to use XDOXSLT in rtf template layout for etext template creation

    <DEFINE CONCATENATION>     BookDetails
    <BASE LEVEL>     Category
    <ELEMENT> Name || '/' || Price     
    <DELIMITER>      '/'
    <END DEFINE CONCATENATION>     BookDetails
    With EFTProcessor the above details are created in xsl file as follows
    <xsl:template name="CONCAT_BookDetails">
    *I need to declare one more variable here
    EG: <xsl:value-of select="xdoxslt:set_variable($mycount, count(.//Category))"/>
    --and use this variable for any dyanamic process inside this template. How to achieve this in rtf template by declaring a xdoxslt function. How to declare this
    syntax in rtf layout so that it creates a varibale in xsl template using the EFTProcessor. Please help me out. The main point here is to include xslt functions in
    rtf template layout for etext template creation.*
    <xsl:for-each select=".//Category">
    <xsl:call-template name="CONCAT_BookDetails_V"/>
    </xsl:for-each>
    </xsl:template>

    in the next time use BI Publisher forum - BI Publisher
    <?format-number(ENTERED_CR,'##,##0.00')?>it's works for me
    output:
    444    ->  444.00
    444.55 ->  444.55

  • How to round numbers using javascript in Adobe Acrobat Pro?

    How to round numbers using java script in Adobe Acrobat Pro?
    For example:
    1.2 becomes 1.0
    1.7 becomes 2.0
    Thank you.

    Assuming you've already set the field to a Number format category and limited it to one digit to the right of the decimal, you can use the following custom Validate script:
    // Custom Validate script
    event.value = Math.round(event.value);
    More info: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/roun d

  • Page numbering in rtf templates

    Hi All,
    I have an rtf template and what I want is to display page numbers. I can achieve this with the following : <?fo:page-number?> but I want to display it by different way:
    For example if the total pages in the output is 10 pages I want the page number to be displayed as Page 1 of 10, 2 of 10, 3 of 10 etc.
    Any ideas?
    Thanks in advance,
    Konska tor

    Well, it's fixed itself. It still doesn't work on my home computer, but it does work on my work computer... as long as it works in Oracle eBus I'm happy :) Must be a certain version of word that causes the problem.

  • Issue with ROUND function in RTF template

    Hi All,
    Can anyone please help me in implementing the ROUND function at the RTF template.
    Need to handle rounding of amounts at the RTF template level itself.
    The ROUND function should be implemented to the following tags:
    <?sum(current-group()/TAXABLE_AMOUNT)?> (Record level)
    <?sum(TAXABLE_AMOUNT)?> (Report level total)
    Eg. If the Sum(current-group()/TAXABLE_AMOUNT) for a particular record is 401.65 then it should round of to 402
    we try to do this using following syntax ..
    1) by declaring variable "value"
    <?xdoxslt:set_variable($_XDOCTX, value, sum(current-group()/TAXABLE_AMOUNT))?>
    2) <?xdofx:round(sum(current-group()/TAXABLE_AMOUNT))?>
    3)<?xdofx:round(xdoxslt:sum(current-group()/TAXABLE_AMOUNT))?>
    but we ding get the solution.
    A quick response on this is highly appreciable.
    Thanks,
    Praveen

    Re: Summing derived values within xdofx:
    Re: Rounding not working

  • How to set parameter in rtf template

    Hi,
    I've created a data model query using a parameter in BI Publisher Enterprise. When I'm showing the data I'm first ask for the parameter value.
    Now I want to create a rtf template in BI Publisher Desktop. What do I have to do that the user can set the parameter and then see the result? So how to set the parameter in my query?
    Thanks
    chrissy

    Hey Chrissy... i am realy sorry, i have guided u in the wrong way...
    Above which i have explained was about Variable....
    To test passing a parameter value, ff you are using the:
    XML Publisher Runner – on the Setting tab enter a new line containing:
    Name: xslt. InvThresh
    Value: 1000
    Template Builder
    In the config file under <<TEMPLATE_BUILDER_HOME>>/config enter under the Properties section:
    <property name="xslt.InvThresh">1000</property>
    <xsl:param name="InvThresh" select="0" xdofo:ctx="begin"/>
    InvoiceNumber     Inovice Amount
    Grp: Invoice13222-2     $100.00EFE
    Grp: Invoice= <?for-each:G_INVOICE_NUM?><?if:ACCTD_AMT>$InvThresh?>
    13222-2 = <?INVOICE_NUM?>
    $100.00= <?ACCTD_AMT?>
    EFE = <?end if?><?end for-each?>
    Hope this will help u out....
    sorry for tht .....
    Thanks
    Praveen Gollu.

  • How to round numbers

    assume variable a is 4.647 and i want to convert this to 4.5 . how can i round numbers like this. Is there is a predefined method in java to achive this.

    I don't think java.lang.Math.round() will do what the original post asked for, since it rounds to the nearest long number. So you still would have to write your own method to round 4.647 down to 4.5.

  • How to print Title in RTF Template

    I want to define the Title of the Report Using Word
    File -> Properties -> Summary
    Say XYZ
    I would then like to reference this Title in my RTF Template. What syntax i can use for this?

    I want to use the Title property in Sub template which is common for all my templates. I know I can accomplish this by defining a parameter in main template and then passing it as parameter to the sub template. However i thought that Word properties is a more proper place for placing the title and somehow i need to reference it in my rtf template to that i can pass it as a parameter.

  • How to Format number in RTF template?

    Hi,
    In RTF template i am using Format_number for custom requirement. when i am using below conditon <?format-number(ENTERED_CR,'##,##0.00')?> number is getting formatted if above 1000 only. My requirement is 1). 444 should format like 444.00 2). 444.55 should format like 444.55 only. Can anyone suggest on this ASAP.

    in the next time use BI Publisher forum - BI Publisher
    <?format-number(ENTERED_CR,'##,##0.00')?>it's works for me
    output:
    444    ->  444.00
    444.55 ->  444.55

  • How to Display Page Numbers in RTF Template

    Greetings to all,
    We have a requirement in which we have to display the Page numbers on the output PDF.
    The scenario is , if the PDF contains10 pages,then on Pages , it should show Page 1/10,Page 2/10 etc.
    And If the output exceeds to more than 1 page, then on each page except the last one it should display "Continued" in the footer.
    Any comments on this would be of great help.
    Thanks,
    Sachin

    Hi Sachin,
    I have emailed you back the modified template, I have changed the following:
    What have I done in the template then?
    * Moved the Group: G_HEADERS place holder inside the <?start:body?> place holder.
    * Inserted a Section Break (Next Page) after the <?end body?> place holder for the main report. This creates what looks like a 3rd page
    * Added <?start@last-page-first:body?><?end body?> as the only thing on the 3rd page. The resets the headers and footers for the last page, so we need to declare the headers again. If the last page is actually the first page, then the first page will take the formatting of the last page.
    * Removed the "continued" from the Native Word footer and put it underneath the <?end body?> placeholder of the main template on page 2
    Let me know if you have any further issues.
    Rgds,
    Cj

  • How to round numbers in java?

    hey everyone. just wondering how i can round my final answer which is "repayment" located on the last line to the nearest whole value. thanks :) this is my code:
    //Conversion and Calculation
    principle = reader.readDouble("Enter Loan Amount: ");
    interestRate = reader.readDouble("Enter YEARLY interest rate: ");
    convertedRate = interestRate / 100;
    monthlyRate = convertedRate / 12;
    timePeriod = reader.readDouble("Enter the number of years for the repayment: ");
    convertedPeriod = timePeriod * 12;
    //Calculation Monthly Repayment Amount for a fixed number of years
    topHalf = Math.pow((1+monthlyRate),convertedPeriod);
    bottomHalf = (Math.pow((1+monthlyRate),convertedPeriod)-1);
    fraction = topHalf / bottomHalf;
    repayment = principle * monthlyRate * fraction;
    writer.println ("Fixed Monthly Repayment Amount = $" +repayment);                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Good point: Klue2k, don't forget about the negative
    case.Yes, never forget about the negative case. Your
    solution doesn't work with negative numbers!
    And by the way, if you had a little bit more of the
    good old klue2k, you wouldn't be embarassing yourself
    in this way.I think you're confusing me with somebody who give a 5h!t.

  • How to Sort Date in RTF template

    Hi
    in my report i have name, date_arrival, Time_arrival, Hotel. I created a report grouped by hotel. On the screen it's working OK. when I print yusing RTF created template, the date is not sorted as expected.
    Thanks,
    Ribhi

    I have read much about date formating. I think some of the functionality in to_chat and to_date is changing between versions. I don't know that this is the simplest way, but it is the only way that worked for me:
    <?sort: xdoxslt:format_date (ssPrimaryRevenueCloseDate,’ yyyyMMDD’, ’MM/DD/yyyy’,’Europe/London’,’GMT’)?>
    I do not understand why this function is not in the documentation.
    Edited by: user10189185 on 17-Mar-2009 05:01

  • How to show Parameter in .rtf  Templates

    Dear All,
    Kindly guide me that how can I show Report Parameters in my templates. I'll be very thankful to you for this.
    Regards
    Zain A. Siddiqui

    Hi Zain,
    If you are still looking for a solution, I would suggest trying this.
    Have another group in your report which selects parameters from fnd_concurrent_requests
    table based on the value of p_conc_request_id of your request..
    This group will show up in your xml which yiou can use.
    -Krishna.

  • How to hide codings in RTF Template

    Hi,
    I'm currently making a report which involves intensive calculation logics, for which I have no choice but to write intensive coding such as <?choose:?>, <?if:?>, <?xdoxslt:set_variable....?>. Howevever, even though all my codes are not supposed to output anything (all the logics are for setting up varialbles). There will be blank lines generated in the report outputs which mess up my format. Pls. don't suggest form fields as most of my lines are too long for the form field help properties to handle.
    Does anyone know a good way to hide coding in the RTF which won't affect the layout of the report?
    TIA,
    Jonathan

    BI Publisher 11g MSFT Plugin now offers a feature (not backward compatible) that allows up to 48kb of code in a form field. This enhancement is important as the original MSFT property limited this to be about 393 chars. Check this link for an example of this limitation: http://oraclebiblog.blogspot.com/2009/11/biee-and-bi-publishers-integration-best.html
    regards
    Jorge
    p.s I do not see other option. So please just close this post

  • How to round numbers to the nearest .25

    I would like to enter a number in one field and have it rounded to the nearest .25 in another column - (whether that's rounding up or down)
    Example:
    Actual Size
    Adjusted Size
    7.21435
    7.25
    Any help would be appreciated.
    Thanks!

    Hi c,
    The ROUND function limits the precision choices to powers of 10, so we need to work within that limitation:
    Multiply by four, round to the nearer whole number, divide by four.
    Formula in column B: =ROUND(A*4,0)/4
    All cells in B are formatted as Number, with decimal places set to 2.
    Regards,
    Barry

Maybe you are looking for

  • Personal File Sharing Quits - Help!  I have a deadline!!

    I'm having problems with personal file sharing. I have two macs, both dual 2GHz G5s. Computer 1 has all of the work files on it, and when computer 2 tries to connect, it shuts down personal file sharing! Computer 1 can connect to computer 2, but not

  • How can I read and display data with OR without recording at the same time?

    Hi all,   This forum has been of much help to me, but I have a rather specific question I can't seem to find an answer to.  I am new to LabView, educating myself with tutorials, trial and error, and this forum.    Attached is what I have so far.  I w

  • When will 5s be released in Italy?

    Hi, I live in Italy and yesterday I watched the presentation of the new iPhone 5S. At the end of the presentation they said that within December 2013 it will be released in over 100 countries. Usually Italy is in the second wave, few weeks later the

  • Is it the time to go to Google? iTunes is much more expensive than Google Play!

    I know that iTunes is amazing. But now that Google Play's started renting movies in my country (Brazil) I guess if iTunes worth it's high price for everything... I have an Apple Tv, what is very good, however isn't complete as well, per exemple that

  • ESS: Addresses check on postal code based on country

    Hi,     We have implemented ESS addresses for non standard country by reusing the existing application.     One of the requirement is to enforce postal code validation based on the selected country (for specific subtypes).     Is this validation appl