Again: Number Format, Decimals in calculated fields

My customer wants to know how he can have calculated fields in his reports.
I've found out that e.g. this works for the calculation:
<?format-number:((SALARY) div (../../DEPTSAL));'#,##0.00'?>
But there is no way that I can get a precision of two decimals. All given formats are ignored.
Maybe this is an issue with the european decimal sign , (Comma).
How is this to be fixed?
The use of the translate function was recommended somewhere. I have no idea how to bring it together with my calculation formula.
Thanks in advance,
Kai
Message was edited by:
kai

Hi kai,
First you need to remove comma from your amount field then you can get your result.
If you have any comma in your amount field then xml number format does not work.
Look this forum:
Re: How to indicate number percission in a template?
Thanks
Ravi
Message was edited by:
Ravi Tripathi

Similar Messages

  • ALV column with variable number of decimals to be displayed

    Hi,
    I've an ALV where I need to display a numeric column with a variable number of decimal row-by-row, from 0 (no decimals) to 4.
    I've declared the numeric field as TYPE P DECIMALS 4.
    I've tried with DECMLFIELD in ALV catalog, and this works for 1 to n decimals, but when  I leave the field indicated in DECMLFIELD equal to 0, ALV shows the default number of decimals of the field (4 in that case).
    Any help will be very appreciated.
    Thanks.
    Jordi

    No, I didn't try EDIT_MASK.
    How should I use it to format output to display decimals or not depending on the row?
    I have 2 kinds of values, all stored in a TYPE P DECIMALS 4: Those that really are an integer (decimals should not be displayed for that ones) and the values that really have 4 decimals (which should be displayed with decimals in ALV).
    Example:
    13,0000 should be displayed as 13
    0,4567 should be displayed as 0,4567
    With EDIT_MASK could I do that?
    Thank you very much.

  • Retrival of calculated field from MDM

    Hi,
    I have a reqiurement where i want retrieve field which is a calculated field. Ex: i'm creating a record and record is getting saved in the back end (MDM) and i want retrieve field (Variety number) which is a calculated field.
    Any response  is appreciable.
    Thanks in advance,
    Revathy.

    What problem are you facing? Are you calling an RFC to get the value?

  • Number format issue - comma (1,5) instead of period (1.5) before decimals?

    I am using an input field of data type Number. In Norway we use a comma before decimals. I can't get this to work in VC. Have tried to set Number format with 'Local format' checked but this is not helping. (even if my portal is showing Norwegian texts as supposed by the language setting)
    If I uncheck this and go to Custom formatting I get to set my own format. NSTR(@OPERATORER_N, ".2") gives me two decimals but with a period as the decimal point. NSTR(@OPERATORER_N, ",2") does not work.
    I do not want thousands separator.
    Tips?
    Henning Strand

    Hi,
    Check the se Threads i think you definitly get the idea or solution.
    But every body ask about to get dot separatot instaed of Comma Separator since this can be get easyly with Language Portal Settings
    Thousands separator
    http://help.sap.com/saphelp_nw70/helpdata/en/38/2d9b732beb4c68bba2962602a7d6bd/content.htm
    http://help.sap.com/saphelp_nw70/helpdata/en/26/64fb472a144a0dbaf88f5ec75d9270/content.htm
    http://oregonstate.edu/dept/computing/warehouse/PDF/8-reports.pdf
    Re: Supressing Currency & Thousands Separator
    Re: Special Number format Mask Visual Compser
    All the best
    Govindu

  • How to keep a calculation field blank until the user enters a number?

    I am building a sales sheet for a school that sells scrip as a fund-raiser. I have the document set so that when the user enters the number of scrip certificates he wants (say, two $25 gift certificates at Lowe's), the program will automatically calculate that this user owes $50 for that scrip category. However, there are more than 100 companies that one can choose from, and if the user doesn't enter a number, the calculated field shows $0. Is there a way that each field can stay blank until the user enters a number bigger than zero? By the way, I'm using this calculation to determine the value (borrowed from a user on this forum): event.value = 50 * this.getField("Lowes").value
    Thanks!

    There are two approaches. You can either add the following Validate script:
    // Custom Validate script for calculated field
    if (+event.value !== 0) event.value = "";
    Or you can change your custom Calculate script and set the Format type of the field to "None":
    // Custom Calculate script
    (function () {
        var v = +getField("Lowes").value;
        event.value = (v !== 0) ? util.printf("$%.2f", v) : "";

  • Number formatted Amount field not working in Excel 2010

    Hi,
    We have BI reports in EBS 11.5.10.2 designed using word 2007 RTF templates. The output is selected to write to Excel so that they can calculate on amount fields. Recently we upgraded to Office 2010 and the amount filed which has number format when downloaded to Excel will not allow to use functions like Sum. If i deleted the table column and add the column back, then it works. Is anyone runing into similar issues....

    Interesting to note this is still a problem, but even more interesting is as to why Excel works fine the first time you bring in the xsd, but not after you save it.  I found information that says it's related to resolving externally referenced xsds,
    which is fine, but again, why does it work the first ime and not the second?   If it were a problem with external xsds then it should never work at all so I think that answer is bogus.
    Something has to be getting corrupted on the save and it's not important enough to MS to spend the time to fix it.

  • Populating the "number format" and "calculate" field properties?

    I've been making a lot of Acrobat forms with an extremely large number of form fields (as in, over a hundred or more per form).
    Each field has to have these properties:
    -Set to Number format, with 4 decimal places specified
    -Set the Calculate property with a simplified field notation (field1*field2), to perform multiplication, or, it's set wtih the "value is the (product) of the following fields" function.
    Is there a way of copying these attributes to already pre-existing fields?  It appears that for already existing fields, if you want them all to have these same attributes, you have to set them one by one-- very tedious.  If you multi-select all fields at once, it doesn't let you set them all to the same calculation setting, and it doesn't even let you set them all to number format.
    So, up till now I've simply made one (or a few) fields, set them to these properties, and then populated them by duplicating the fields, but-- I still then have then to go in and re-name every single field, so that each is a unique field-- also very tedious.
    Is there some way that I don't know about, that would allow me to set these properties to multiple pre-existing fields at the same time?

    Unfortunately, no.
    However, you can set the the field's calculation formula using a simple script.
    Let's say your fields are called field1, field2, field3, etc. You can then run this code from the console:
    maxFields = 100; // let's say you have 100 fields
    for (i=1; i<=maxFields; i++) {
         f = this.getField("field"+i);
         if (f) f.setAction("Calculate", "event.value = this.getField('x').value * this.getField('y').value;");
    Of course, you can adjust the formula to your own needs.
    Make sure you use single quotes inside of the script when you want to specify a literal string.

  • How Can I Change Format Mask For All Fields that type's Number Depend on Parameter in Report Builder 10g ?

    I want Change format mask for all fields that type's number
    Such as
    if  :parameter_value = 1 then
       all fields format mask = ' 999,999,990.000' ;
    else
       all fields format mask = ' 999,999,990.00' ;
    end if;
    Regards

    So, i have bad news for you : you'll have to rebuild again.
    Meanwhile i have excellent news for you : there's an online tool made by Johannes Henseler called Sidecar xml which builds the necessary xml file for you, sort of what you find in the Digital Publishing Folio Editor website, but saves it in your Folio folder.
    Next time you import all your folder (with that file), it will place all the necessary information, and even reorder the articles.
    Build once, play many times.

  • Adding Date/Time Field + X Number of Days - Basic Calculation Question

    I am assuming this is a basic calculation question. New to Adobe LiveCycle Forms.
    I have a simple form containing a table. The table appears as such:
    Text
    Formatted as Date/Time Fields
    Header 3
    Monday
    user wil choose the beginning date (Date/Time) this is DateTimeField1
    Tuesday
    this should calculate DateTimeField1 + 1
    Wednesday
    this should calculate DateTimeField1 + 2
    Thursday
    this should calculate DateTimeField1 + 3
    Friday
    this should calculate DateTimeField1 + 4
    Saturday
    this should calculate DateTimeField1 + 5
    Sunday
    this should calculate DateTimeField1 + 6
    Calculations are performed after the date is chosen for Monday. My mind tells me the simple calculation of DateTimeField1 + 1 is not going to work (and in fact doesn't!) as it needs to change Monday to a number first. I saw on another thread the following:
    Num2Date(Date2Num(Date(DateTimeField1), "DD.MM.YYYY")+7, "DD.MM.YYYY")
    Thought this was going to get me close. No cigars though!
    Any quick help is greatly appreciated. And since I am new to this, details about what needs to be changed would be great too!
    Thanks

    Here an addition for you date field.
    This FormCalc script in the exit:Event will check it the selected date is on a monday.
    If not it will go the days back until the last monday.
    var Selection = Date2Num($.formattedValue, DateFmt(2))
    var WeekDay = Num2Date(Selection, "E")
    var NewDate
    if (WeekDay eq 1) then
              NewDate = Selection - 6
    elseif (WeekDay eq 3) then
              NewDate = Selection - 1
    elseif (WeekDay eq 4) then
              NewDate = Selection - 2
    elseif (WeekDay eq 5) then
              NewDate = Selection - 3
    elseif (WeekDay eq 6) then
              NewDate = Selection - 4
    elseif (WeekDay eq 7) then
              NewDate = Selection - 5
    else
              NewDate = Selection
    endif
    $ = Num2Date(NewDate, "EEE DD.MM.YYYY")
    Hope this helps, too.

  • Cannot summarize my calculated field(number)

    Post Author: bwebb
    CA Forum: Formula
    I am using Crystal Reports XI  version 11.5.3.417
    My calculated field formula is:
    IIF({bw_spread.fy_period}=totext(dateadd("m",3,{@max_data_date}),"yyyy.MM"),{bw_spread.actual_cost},0)
    bw_spread.fy_period (string) and typical data = 2008.04
    @max_data_date (datetime) and gets 3 months added, then turned into text in the same format as fy_period
    bw_spread.actual_cost(number)
    It takes a text field that has the Fiscal Period and compares it to the a Date that has been re-formatted as text, then returns the actual cost if they are equal else zero.
    The formula works and returns a number and shows up nicely in the report.  The problem is, that I cannot SUM this field in the group footers.

    Post Author: V361
    CA Forum: Formula
    This may not directly apply to your situation,  but here is something I found.
    Create 3 formulas as below ;
    Formula 1 :- RunningTotalName
    WhilePrintingRecords;
    CurrencyVar Amount;
    Amount := Amount + {Customer.Last Year's Sales}
    Place the above formula on the details section . and suppress this
    formula if u dont want to display .
    Formula2 :- Display
    WhilePrintingRecords;
    CurrencyVar Amount
    Place this formula on PageFooter Section
    formula3 :- AmountToReset
    WhilePrintingRecords;
    CurrencyVar Amount := 0;
    place this formula on PageHeader section and suppress the same.

  • Trouble with calculating fields. Can't select (check) fields. Also can't figure out what's wrong with a division field (percent) that I created. Keep getting the pop up that format of the field doesn't allow blah blah blah... Help!

    Trouble with calculating fields. Can't select (check) fields. Also can't figure out what's wrong with a division field (percent) that I created. Keep getting the pop up that format of the field doesn't allow blah blah blah... Help!

    1. Use the mouse to select the field and then press the space bar.
    2. A null string is the same as zero. What is the result for division by zero?

  • If a Custom field is defined as Text in Project Server, but is actualy a number field, is it possible to number format it in a report (BI)?

    The users have defined the field as Text, and now the field contains data, so it is not possible to change the type.
    While including the field in the Report and choosing number format, it is not getting formatted (for example, if I want seperators like a comma for thousand).
    Is it possible?
    Thanks in advance.

    Hi,
    I don't think so you can directly format a text field as number in SSRS.  For doing this first you have to convert your text field into Integer or Decimal (whatever is your requirement) into SQL query.
    Then using SSRS textbox properties you can define the number format also can use the 1000 separator from SSRS then.
    To perform this, I have created a "Test" table with 2 columns only "ProjectName" varchar(50) and ProjectDuration Varchar(9).
    Then using SQL query first I converted ProjectDuration datatype from Varchar to INT using below query
    SELECT     ProjectName, CONVERT(int,ProjectDuration) ProjectDuration
    FROM         Test
    Then using SSRS interface changed the ProjectDuration tect box property like this
    That's all I am getting below desire result
    Hope this helps you and let me know in case have any doubts.
    Thanks !!!
    Sachin Vashishth MCTS

  • How can I validate that a calculated field equals a specific number?

    Thanks in advance for your input and advice. I have a calculated field that adds up the sum of two percentages (e.g 25% and 50%). I want to validate the sum of those percentages equals 100%. Thanks, Any help would be appreciated.

    Thanks for your response. If the sum of the values in the calculated field does not equal 100%, an alert should appear to indicate that the sum of those fields must equal 100%. As far as checking whether both of the fields being calculated, that is not as important; only one of those fields could have an entry as long as it equals 100%.  Does that help? Thanks again for your help.

  • Number formating befor calculation

    Hi,
    I have two values as a out come of my RTF template. One A and another is B.
    Value B is always in 1 or 2 digits like 6, 8, 12, 21 but value A is in 2 decimals and in European number format e.g 23.223,34
    Whenever I am trying to multiply these values the answer is always '0', I think its because of number format of 'A'.
    A = <?TaxableAmount?>
    B = <?taxRate?>
    C= <?xdofx:TO_NUMBER(TaxableAmount/taxRate)?>
    If I remove TO_NUMBER then the 'C' is blank nothing happens.
    Will you please guide me how to handle number formatting? I am new to BI.
    Regards,

    you said that u were trying do multiplication but when in code u have division ??
    <?xdofx:TO_NUMBER(TaxableAmount * taxRate)?>
    What is that format 23.222,34 like this in A. because of that raw format it is not working i think
    if u want to do with format currency TO EUR u can do like below . but check once why A format is like that
    <?format-currency: XML_FIELD;EUR;'true'?>
    Links
    http://download.oracle.com/docs/cd/E10415_01/doc/bi.1013/e10416/bip_misc_101333.htm
    Parameters
    <?format-currency: raw format; CurrencyCode; display-symbol?>
    raw format Data source must be in a raw format, with no formatting applied (for example: 1000.00 European format 1.000,00 will not work)
    CurrencyCode The ISO three-letter currency code
    display-symbol Boolean in string format, which is either "true" or "false"
    Examples
    <?format-currency: 12345.67890 ; ’EUR’?> 12,345.68
    <?format-currency: 12345.67890 ; ’EUR’; ’true’?> €12,345.68
    <?format-currency: 12345.67890 ; ‘EUR’; ‘false’?> 12,345.68 With display-symbol = 'false'
    <?format-currency: 12345.67890 ; ‘USD’; ‘true’?> $12,345.68 CurrencyCode set to 'USD'

  • Showing formatting in an unsaved calculated field.

    I have a form that takes entered criteria and outputs a calculated field based on what is put into the fields. Nothing is ever saved. Choosing the formatting does not work. How can I show the calculated field formatted as currency ($) even though it is not saved?

    When I say nothing is ever saved, there is no table associated with the form on this page, only fields where numbers are entered and a calculation performed in order to show in the report associated with the page what benefits are available, based on the data entry and calculation.
    We do have a submit button that triggers the calculation, but does not save anything.
    Thanks, guys, for your input. I will do some experimenting with this and see if I can get it to work. Otherwise, I will resort to Java Script, although it is not my best thing. :-)

Maybe you are looking for

  • Field cost centre is a required field for GL account Error

    The error that I get during a sales transaction is: Field cost centre is a required field for GL account Error. Where or which transaction in FI do I use to maintain this setting. Thank you.

  • No Method Signature - initQuery error after VO Substitution

    Hi All, I have done a VO Substitution for "NewBankAccountVOImpl". Below is the exact Requirement, iReceivables -> Query for a given Customer -> Go to accounts Tab -> Try to Pay off an invoice -> You get an option choose Payment Method as "New Bank Ac

  • Is File handling in Java Swing possible?

    Hi I need to know whether file handling in Java Swing is possible or not?

  • RAC running with 3hrs gap among nodes

    Hello Gurus, We are in a very strange situtaion. We are running our system on 3 node RAC.The OS is RHEL 4 update 5 64 bit.The database is 10.2.0.4 with oracle clusterware. The problem is that the the 3rd node has it's time set as 3 hrs ahead of first

  • Font Book woodtype ornaments font displays as dots

    In Font Book, when I add Adobe's Woodtype ornaments to the system folder and then open Font Book, when I view it in Font Book it only has dots for characters. If I open an application, such as Indesign, I get the result. In Font Book it tells me it's