Formatting Numeric Field

Post Author: Mary Fetsch
CA Forum: Formula
I have a Rate database field coming into Crystal Reports 11.  It's coming in with 4 decimal places, but I don't want to show trailing zeros.  For example, I want to show .9500 as .95 and 1.2750 as 1.275.  I've looked all over but haven't found a way to do that.  Is there a way?  Thanks!

Post Author: SKodidine
CA Forum: Formula
From what I understand, you will have to convert it into string prior to using it in CR.  Here is a KBase article that suggests a way.
http://technicalsupport.businessobjects.com/KanisaSupportSite/search.do?cmd=displayKC&docType=kc&externalId=8783671&sliceId=&dialogID=5670059&stateId=1%200%205666831

Similar Messages

  • Format Numeric Field

    I format a Numeric Field with: 88/99/8888, and now i need a script to make sure that "99" is not greater than 12.
    Can someone help me out on this please?

    Why not simply use a date control. The user would pick the date from a calendar and you woudl not have to do any checks.
    Conversely use a date object would allow you to set a display and edit pattern that would match the date format you want hence having all of this done for you.
    If you must go the route you are going here is a simple example of javascript that you could use:
    //create a variable to hold the string
    var str_temp = TextField1.rawValue;
    //Test to see if the string is > 12
    if (str_temp.substr(3,2) > "12"){
    //The string is graeter than 12 so let the user know
    app.alert("You cannot enter a value greater than 12");
    //Put the cursor back in the offending field
    xfa.host.setFocus("TextField1");
    Assuming the field that holds the date is TextField1 and the code is running on some other event in the same context as TextField1.

  • Format numeric field as user enters value

    I have a numeric field that I want to be formatted as 999-999999-999 so that when users enter 12-digit part numbers, the field automatically formats the value that they have entered. Is there a way to format their value as it is entered so that when they type the fourth number, a hyphen is placed between the third and fourth digit?
    Additionally, is there a way to allow a numeric field to have a default value with letters? I want to have a default value of "xxx-xxxxxx-xxx" but I don't want to allow the user to enter anything but numbers in the field. I tried using a text field, but I can't get it to reject letters and only accept numbers.

    Hi,
    You can define a display format pattern of "num{999-999999-999}" that will add the hyphens in once they leave the field, or maybe having three fields with the comb option set and hyphens between them would suit more?
    You can use the null display pattern to display any sort of text in a numeric, date, or whatever field.  Have a look at this sample, Adobe LiveCycle Designer Cookbooks by BR001: Adding Ghost Text to LiveCycle Designer form
    Regards
    Bruce

  • Problem with pattern numeric field

    Hi All.
    I tryed to format numeric field with patterns num{zzzzzzzzzzzzzzzzzzz9} or num{99999999999999999999}. But when I enter 20 numeric characters like 12345678901234567890 as a result I got 12345678901234567000. How fix that problem?
    Thanks.

    The result you're getting is correct, because you pattern only allows a period to separate the decimal places.
    Try the following edit pattern:
    num{zzzzzzzzzzz9,99}|num{zzzzzzzzzzz9.99}
    and this display pattern:
    num{zzz.zzz.zzz.zz9,99}

  • Format of numeric field cannot retain via Live Office

    In Webi, I changed the format of an numeric field to 2 decimal places.  When I retrieved this field to Excel via Live Office, I found the format of 2 decimal places cannot be retained.  It ended up displayed in 1 decimal places.
    I found when a webi report exported to Excel, the format can be retained.  
    Does anyone know if this is a product design or product issue? Thanks.
    Regards,
    Gloria

    Hi Gloria,
    I had a look at this in XI release 3.0 and received the same issue. The only way I could get this to work was to use the FormatNumber() method. This returns the value as a string, which live office represents with the trailing 0.
    So if the cell value was 12345.6, then FormatNumber([my cell]; "#,##0.00") will display 12345.60. This will display correctly in Excel (except that it is justified as text) when brought in by live office.
    This more of a work around than a fix, so you may want to raise a case.
    Regards
    Alan

  • How to format a numeric field in ES2 ?

    Hi...
    I'm trying to format a numeric field in LiveCycle designer using six digit and allowing zero's "000000"…
    I went to patterns for setting the format, unfortunately I couldn't know how figure it out?
    I’ve tried this pattern: null{}|zero{000000}|num.integer{}
    It didn’t work!
    what actually I’m looking for is six digit at all time for instance if enter value of 1 in the field expect to appear 000001 ,and if i enter value 567 the appearance will be 000567 in the field and so on...etc.
    Another issue is how to validate a range of numeric value like 000001-999999 so that the input will be only restricted by those values…
    Hope this is clear! And sorry for my bad English
    Best Regards...

    Hi,
    could you please share your solution?
    I have a similar problem. I need to allow zeros before my integers to be inputed to the form.
    thanks.
    Please see my posting here:
    http://forums.adobe.com/thread/870306?tstart=0

  • MS Excel automatically converts numeric fields to date format

    I have at least 2 different spreadsheets where this happens.  I maintain them for months, adding, changing, deleting data.  They contain lots of data elements (numeric, text, date, etc).   Some columns are all numeric, some all dates,
    etc.  Then suddenly when I open the spreadsheet, my numeric formatted data has been converted to date format.  I see lots of # signs in cells, which is an indication that this happened, and selecting an affected cell shows a date, generally in the
    early 1900s, depending on the original numeric value that was in the cell.  I convert the fields back to numeric, but sometime later the same problem occurs -- numeric fields are now date formatted.  I cannot identfy any specific change that I make
    that would cause this.  And I only recognize it as having occurred when I open the spreadsheet, not anytime during its maintenance.  I am using MS Excel 2007 SP2 in a Windows XP SP3 environment.  The machine is well maintained and updated /
    kept current by our corporate IT group.  I have done numerous Internet searches and cannot find anything like this in any other blog.  Thanks for your help.

    Hi,
    Were some of the these data imported from a .csv file? As far as I know, data formats cannot be saved in .csv file. If this is the situation, try this:
    Save a copy of your .csv file changing the extension of your file from .csv to .txt
    open excel.
    go to DATA --> Import external data --> Import data --> browse to find the .txt file you made earlier
    The text import wizard should open.
    Click on delimited, click next
    click comma, click next
    You should now see all columns appear with heading GENERAL --> highlight the columns with the values that are changing to date and click TEXT (top right) instead. The heading of these columns should now change to TEXT.
    click finish
    Excel will now treat the column as text when it imports the data and will not change them to dates
    If this is not the situation, this issue might be caused by some add-ins.
    Start Excel in safe mode:  Press and hold the
    CTRL key, and then click the Excel program to start. Then, click File > Open to open the Excel file.
    If the problem does not occur in the safe mode, this issue might be related to some third-party add-ins in the Office program, we can try to disable them.
    Best Regards,
    Sally Tang

  • OBIEE Presentation Services : Default formatting for numeric fields

    Hello all.
    I need help in setting default formatting for numeric fields in criteria. If a user adds an numeric field, it does not have any formatting associated with it. I want to know how do you set default formatting (for example if user adds sales measure it should appear in default format like $1,000 or even with decimal places).
    Please help.
    Thank you.

    Hi,
    1) We have so many subject areas. If we select "system wide default for this data type", is this change going to reflect in all subject areas.No should do this subject area wise.
    2) Will this effect if we migrate from dev to prod environment.Yes it will effect.
    I hope u will follow this to-
    http://forums.oracle.com/forums/ann.jspa?annID=939 :)
    Regards,
    Srikanth

  • SQL Server Report Builder Numeric Field Formatting

    I am creating Reports in SQL Server Report builder.
    When I set format of any number fields, in design it is displaying sample value.
    For e.g. If I set format 0.00 to one numeric field, it started to display 12345.00
    I have 10-12 fields in design, it caused very much confusion.
    Is there any solution to change this?
    When I open report in Visual Studio, it doesn't display like that.
    Check Following screenshots:
    In Report Builder:
    In Visual Studio:

    Hi Harsh10,
    If I understand correctly, there are two placeholders in each textbox in the report. You want the second placeholder which contains numeric field to format as 0.00. If in this scenario, we can refer to the following steps:
    Right-click the second placeholder which contains numeric field in each textbox to open the Placeholder Properties dialog box.
    Click Number in the left pane.
    Select Number with Decimal places ‘2’ in the Category drop-down list.
    Reference:
    Formatting Text and Placeholders (Report Builder and SSRS)
    If there are any other questions, please feel free to ask.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Null values in Numeric fields of Datasets

    I am wondering if anyone has run into this problem before and
    checking to see if anyone has an elegant solution.
    I have a rather large data set. (actually 5 of them on a
    single page) I am sorting certain columns in a table as numbers so
    i assign the variable " ds1.setColumnType("somenumbercolumn",
    "number")" In most cases Spry works great and it sorts by numbers
    properly. The problem is some of the fields in the XML file are
    null and I am trying to sort them as a number. Spry actually
    adjusts for this (as far as i can tell) and treats them like a 0
    which isn't exactly ideal considering there are real zero values in
    the data. I know spry doesn't currently format numbers:
    So here is my question. Does anyone one have a solution to
    fixing null values in a table so that it is still sortable but
    doesn't display a "0" and instead displays something like "--" or
    whatever. I have the option of editing the XML file as well, but I
    still need the table to sort by number.
    If not null values, how about non numeric fields which can
    still be sorted in a numeric column?

    Hi,
    We have an old post that raised a similar problem with yours.
    The post can be found
    here
    For you situation, you should add an if condition for the
    rows that have 0 and to add a custom string instead 0.
    for (var i = 0; i < numRows; i++)
    if(rows
    [ "field_name"] == 0)
    rows[ "field_name" ] = '--';
    Hope this helps you,
    Diana

  • How to get the width of a numeric field at runtime

    Hi, everyone :D
    Is there a built-in that let me get the width of a numeric field at runtime? The SRW bulit in only has the SWR.GET_PAGE_NUM built-in. Is there something like the Get_item_property of Forms IN Report?
    Thanks
    Edited by: user12422762 on 07-ene-2010 14:16
    Edited by: user12422762 on 07-ene-2010 14:30
    Edited by: user12422762 on 08-ene-2010 4:40
    Edited by: user12422762 on 08-ene-2010 4:50

    Hi. Thanks for answering. I need the width because i want to set the format of the field at runtime. The quantity of decimal digits for all the numeric fieds in the report is received as a parameter.
    I can use a function to create the respective decimal mask ('D99,'D999',etc.) and then call the SRW.SET_FORMAT_MASK in the format trigger of every single field, but i'd have to type the mask of the integral part of the number in the code of the trigger ('99G999D99, '999G999G999D'). However, If i could get the width, i'd just create a function and call it from every format trigger.
    Edited by: user12422762 on 08-ene-2010 10:05
    Edited by: user12422762 on 08-ene-2010 10:06
    Edited by: user12422762 on 08-ene-2010 10:08

  • How to right align a read only numeric field in a panel form layout

    Hi, does anyone know how to right align a read only numeric field in a panel form layout? I am using: Style Class = AFFieldNumberMarker, but it only seems to work if the field is disabled. Disabling the field gives it a difference appearance that does not look right on our forms. These are calculated fields, which cannot be modified, so read only is necessary.
    I have looked online for some answers, and it seems that others are having similar issues.
    I have tried different combinations for the properties, but so far I cannot get it to work.
    Thanks
    Judy
    I am using JDEV 11.1.1.5

    Sorry for the delay in my response. Here is the code
    <af:inputText value="#{bindings.TotalAirlineCostEst.inputValue}"
    label="#{bindings.TotalAirlineCostEst.hints.label}"
    required="#{bindings.TotalAirlineCostEst.hints.mandatory}"
    columns="#{bindings.TotalAirlineCostEst.hints.displayWidth}"
    maximumLength="#{bindings.TotalAirlineCostEst.hints.precision}"
    shortDesc="#{bindings.TotalAirlineCostEst.hints.tooltip}"
    id="it20" readOnly="false"
    disabled="true"
    styleClass="AFFieldNumberMarker">
    <f:validator binding="#{bindings.TotalAirlineCostEst.validator}"/>
    <af:convertNumber groupingUsed="true"
    pattern="#{bindings.TotalAirlineCostEst.format}"
    type="number"
    maxFractionDigits="0"/>
    </af:inputText>
    thank you,
    Judy

  • Alv output to Excel with numeric fields as numeric fields only and not char

    Hi,
    When we download the alv output to excel format in the locat file using the toolbar button provided in the ALV, the numeric fields get converted to character format. Is there any other way or settings in ALV so that the numeric fields will be get saved as numeric fields only and not character?
    Rgds,
    MAdhuri

    any idea for above problem is welcome

  • Change the style of a numeric field when his value is 0

    I need show a numeric field in some reports with color red and italic font, but only when the value of number is low than zero. In another case the text must be normal. Is really possible do that? That applies to section details or final summaries.
    Many thanks for the help.

    Hi
    To make your number filed in Red :
    Right click on the field and go in format field click on Font tab and go in Color formula editor and give the following formula :
    If Sum(fieldValue} < 0 Then CrRed else CrNoColor
    Now go in Style formula editor and give the following :
    if sum() < 0 then Critalic
    This will make your field red and italic when it is less than 0
    Thanks,
    Sastry

  • Numeric fields shows ## in Preview from SAP B1

    I created a Crystal report layout from the Production order.
    If I preview the report in Crystal Reports the data is shown correctly.
    When i Preview the report through SAP Business One, all numeric fields, e.g. docnum, quantity, Shows # values instead of the numeric values.
    This is SAP B1 Hana.

    Hi Janice,
    Several options:
    If these are discret fiels (single values from a single record), basically the size to display is too small:
    The picture suggest the size of the layout for the field in CR, not the size of the field (meaning, saying 2 digits in the format while you have 4 to show),
    The size of the display is too small, but I don't take it.
    If a summary field, then the report is trying to mix values with different units, which is not coherent; in which case B1 display *
    Regards,
    Eric

Maybe you are looking for

  • Adobe CS4 crashing computer, Please Help!

    Last week I purchased a refurbished Macbook Pro from Apple, spent the weekend transferring all my files over so I could be ready for work this week. I made sure to do a clean install of Adobe CS4, rather than pulling it over from my old computer with

  • Regarding vat calculating wrongly in miro

    hi, Issue:Reg: Miro Tax Differences Tax Codes showing the small differences while doing the MIRO transactions.  In all the three tax codes  Vat and Cst shows correctly in the purchase order levels  whereas  while doing the Miro transactions the VAT a

  • How to find Onsite & Offshore Info and Progression Module in ECC 6.0

    Hi Experts, How to find the Onsite & Offshore information of an employee.. Is progression module is available in ECC 6.0 Thanks in Advance. Regards, IFF

  • Getting error for opening shopping cart after deleting user fron org struct

    Hi Experts I am getting dump user attribute not maintained after deleting user assignment from org structure. what can i do to retain old status. or atleas wants to avoid getting this dump ..while displaying this SC. pl provide any solution Regards N

  • Proper Setup of Timemachine

    Hello everyone, i am new to the Mac world...but have been a long time techie in the windows enviornment and had a few questions on the proper setup of Timemachine. I have a 500gb Western Digital external HD setup as my Timemachine drive which works f