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

Similar Messages

  • Is it possible to use the status of a checkbox to change the fillcolor of a numeric field?

    I have read through most all of the threads, but found none pertaining to my specific question.  I would like to change the fillcolor of a numeric field based upon the status (on/off) of a checkbox located on a different page.  In other words, if the checkbox is checked I want the numeric field to be yellow with a solid (thin) black border.  I have tried:
    If (CheckBox1.rawValue="1")
    {this.fillcolor="R,G,B";} else
    {this.fillcolor="250,250,250"};
    I haven't gotten the correct RGB values yet for the color I am using, that is why the script has "R,G,B"
    I am pretty new at javascript and have been learning a lot from the forums, but I just can't seem to figure this one out.  Any help would be greatly appreciated.  Thanks

    Give this a go...
    // form1.page1.cb::click - (JavaScript, client)
    if (this.rawValue == 1) {
      xfa.resolveNode("form1.page1.nf.ui.#numericEdit.border.fill.color").value = "255,255,0";
      form1.page1.nf.border.edge.color.value = "0,0,0";
    else {
      xfa.resolveNode("form1.page1.nf.ui.#numericEdit.border.fill.color").value = "255,255,255";
      form1.page1.nf.border.edge.color.value = "255,255,255";
    Don't forget to make your form a dynamic form.
    Steve

  • Change the background of a text field when a checkbox is checked?

    Hi,
    I'm new to Adobe JS, having done some browser scripting previously.
    I'm making a form in which I would like to change the background of a text field to bright yellow (RGB code 220,220,0) when a corresponding checkbox is checked?
    I have a checkbox named chkCD56, with an option value set to 1.
    I have a text field named CD56 with a transparent background.
    Can someone help me with the JS code?
    Thanks.

    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

  • Changing the colour of a text box when the value is zero

    Hello
    I have some code in an expression that changes the fill colour of a text box in a matrix in an SSRS report.
    When the value in the year fields is greater than zero then fine it changes the colour to what I want it to be but when the value is zero then the colour just stays white.
    I'm not testing the value in the year fields but in the Tier field. It seems to default to no colour when the year fields are 0 though.
    The code I am using is as follows
    =switch(Fields!TIER.Value=1,"PaleGreen",Fields!TIER.Value=2,"Cyan",Fields!TIER.Value=3,"Beige")
    This code is in the year field textbox fill property.
    I have loaded a screenshot to show an example showing what is happening in the matrix.
    Thanks for any help on this
    Regards
    John

    Hi John,
    According to your description, you want to change the background color of a textbox when its value is greater than zero. If in this scenario, we can use the expression below to control the BackgroundColor property of the textbox:
    =iif(Fields!SalesAmount.Value>0,"Yellow","White")
    If there are any misunderstanding, please elaborate the issue for further investigation.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Can we change the data type of a field based on the value of the field

    HI Gurus,
    My Requirement is as below -- Could you please guide me
    in the Printable Adobe form -- for ex - as usual for dates fields in the Object Pallette the object type is a date/time field  and for quantity/currency fields corresponding fields are taken
    now in case the either the date, quantity or currency is initial in place of displaying 0.00 or empty date we need to display N/A (Not Applicable)
    for this I would like to change the data type of the field
    to put it simply --
    we need to change the data type of date field from DATE&TIME to Char type to hold N/A or  Quantity field to Char field to hold N/A
    how can we realize this in SAP adobe forms
    Thanks in Advace
    Ramchander Rao.K

    Hello Ramchander,
         You cannot change the data type of the field at run time in Adobe forms because the type of field you choose at the time of design level is associated with the data type itself.
    If you want to achieve your requirement, then your main idea should be to set the data type as CHARACTER itself while designing the field in the adobe form itself. CHAR field will comfortably hold the value of Calculation/amount field, Currency field, Amount, Date, Time HHMMSS, Unit Accuracy, Currency key, Floating point number, Numeric text, Client, Language and many other data types.
    After designing the field as TEXT field in Adobe form you have two options.
    Option 1:
    Select the Date field initially as type TEXT field or CHAR field in Adobe forms.
    Suppose the name of the field is TEXTFIELD1, then write the Javascript code on this field in Initialize event as below.
    if ( this.rawvalue == null )
         this.rawvalue = "N/A";
    If the field is not blank, then it will show the date. Else it will show "N/A".
    Option 2:
    Select the Date field initially as type TEXT field or CHAR field in Adobe forms. Do the formatting part in ABAP itself. It will increase the performance. Avoid Javascript as much as possible.
    Suppose you have a DATE variable l_dats of type DATS. Then take another variable l_date of type CHAR. Then write the below ABAP code.
    MOVE l_dats TO l_date.
    IF l_date IS INITIAL.
         l_date = 'N/A'.
    ENDIF.
    Bind the l_date to the TEXT field in the form.
    Even in this case, if the field is not blank, then it will show the date. Else it will show "N/A".
    But I will suggest you to use Option 2 of keeping the AMOUNT, QUANTITY, DATE, TIME fields etc as CHAR or TEXT fields in Adobe form and do the required formatting in ABAP itself.

  • Can you change the UseNames to a different field? e.g. FirstName+Lastname rather than displayname?

    Can you change the UseNames to a difference field? e.g. FirstName+Lastname rather than displayname?
    I have the problem that all our display names are lastname, firstname so when you join if your name is Fred Bloggs it will announce "Bloggs, Fred is joining the confernce" I'd rather it say "Fred Bloggs is joining the conference"
    I cannot change the display name used in the AD as lastname, firstname is the corporate standard.

    Please refer to http://social.technet.microsoft.com/forums/lync/en-US/839ef1ad-522b-4191-8e90-3e277d318516/ms-lync-ms-exchange-display-name-attributes 
    You can use ABSconfig from Lync Reskit tools
    Please remember, if you see a post that helped you please click ;Vote As Helpful" and if it answered your question please click "Mark As Answer" Regards Edwin Anthony Joseph

  • Word Crashes after changing the style of 'Bullets'

    Hi,
    I hope someone can help me this problem. The problem occurs when I use Microsoft Word 2004 for Mac.
    Word crashes when I go into the Formatting Palette > Bullets and Numbering and then try to change the style of the bullet. I noticed that in the drop down box of bullet styles there are two or three blanks spaces rather than an actual bullet. Then when I move the mouse over the blank entries in order to click on an actual bullet style, Word crashes.
    Should I uninstall Word and then reinstall it? Or is there a much simpler way of fixing the problem?
    I have only had my MacBook for 10 days and I am already having so many problems with Microsoft Word.
    Thanks in advance.
      Mac OS X (10.4.9)  

    Since Word is not an Apple product, you'll get better response if you use a forum dedicated to Microsoft's Mac products such as <http://groups.google.com/groups/dir?sel=33607053> rather than an Apple forum.
    Be sure to search the forum first in case someone has already had a similar question answered. You'll get your answer faster this way. Post your question in the forum if you don't find anything that helps you.

  • How to change the style of the main application window shell

    Hello,
    I am migrating my application from eclipse 3.x to eclipse 4.3 and I want to set the style of the main application window i.e. the shell that is created in application MTrimmedWindow in e4.
    Earlier we were doing it using
    IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
    configurer.setInitialSize(new Point(0, 0));
    configurer.setShowCoolBar(false);
    configurer.setShowStatusLine(false);
    configurer.setShellStyle(SWT.DIALOG_TRIM | SWT.RESIZE);
    But now in e4 application after reading some forum replies I got to know that custom renderer needs to be created for that.
    I created my own renderer extending WBWRenderer and as I wanted to change the style of shell I am overriding createWidget method.
    Now the problem is that if I am just creating a new shell in this createWidget method then it is not working. Might be because this method has a lot of other code also.
    So I copied all this code into my overridden method of createWidget & just changed the style of shell according to my need. Then this worked but for this I have to put some private methods also into my custom renderer class from WBWRenderer.
    SO my question is to confirm that if I am doing it in a right way?
    or is there any other mechanism to do this in a more efficient way?
    Thanks

    This can now be solved with a specific "persisted state" key flag, as documented in https://bugs.eclipse.org/bugs/show_bug.cgi?id=386951 . For example to realize a NO_TRIM window, add the key/value styleOverride/8, where 8 is the value if you get the numeric of
    int val = SWT.NO_TRIM;
    System.out.println(val);
    Hey Zugi: Liebe Grüsse! Master UIBK/2010

  • I see there is no way to change the security questions i set up when I first purchased my ipod touch. Software takes you in circles with no help

    I see there is no way to change the security questions i set up when I first purchased my ipod touch. All the answers I get do not work. Can't by another device until I get around this issue.

    Reset Security Questions
    Frequently asked questions about Apple ID
    Manage My Apple ID
    Or you can email iTunes Support at iTunes Store Support.
    If all else fails:
      1. Go to: Apple Express Lane;
      2. Under Product Categories choose iTunes;
      3. Then choose iTunes Store;
      4. Then choose Account Management;
      5. Now choose iTunes Store Security and answer the bullet questions, then click
          Continue;
      6. Sign in with your Apple ID and press Continue;
      7. Under Contact Options fill out the information and advise iTunes that you would
          like your security/challenge questions reset;
      8. Click Send/Continue.
    You should get a response within 24 hours by email.
    In the event you are unsuccessful then contact AppleCare - Contacting Apple for support and service.
    Another user had success doing the following:
    I got some help from an apple assistant on the phone. It is kind of round about way to get in.
    Here is what he said to do and it is working for me...
      a. on the device that is asking you for the security questions go to "settings", > "store" >
          tap the Apple ID and choose view"Apple ID" and sign in.
      b. Tap on payment information and add a credit/debit card of your preference then select
          "done", in the upper right corner
      c. sign out and back into iTunes on the device by going to "settings"> "store" > tap the
          Apple ID and choose "sign-out" > Tap "sign -in" > "use existing Apple ID" and you
          should be asked to verify your security code for the credit /debit card and NOT the
          security questions.
      d. At this time you can remove the card by going back in to edit the payment info and
          selecting "none" as the card type then saving the changes by selecting "done". You
          should now be able to use your iTunes store credit without answering the security
          questions.
    It's working for me ...I just have to put in my 3 digit security pin from the credit card I am using.
    Good Luck friends!

  • 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

  • Changing the background of a text field in adobe interactive forms

    Hello All,
    Is there any way to change the background colour of text field in interactive form dynamically.??
    Thanks,

    Naresh,
    Change the language to JavaScipt in Script Editor of LiveCycle Designer and use the following code to highlight the area of TextField where R,G,B means that you have to give the RGB values of the color you want.
    <YourTextFieldName>.border.edge.color.value = "R,G,B";
    For eg:- If you have a textfield with name TextField1 then this will highlight the TextField1 area in red color.
    if ((TextField1.rawValue==null) || (TextField1.rawValue==""))
      TextField1.border.edge.color.value = "255,0,0";
    You can use this on exit event of Textfield1 or at the submit button where you check the form data.
    Chintan

  • How can I change the precision of a numeric array indicator using property nodes ?

    I want to change the precision of a numeric array indicator programatically using property nodes. I tried to see all the array properties but I couldn't find it. URGENT !!!

    If you want to change the precision of an element in an array you must first get the reference to the array element. Then raise the reference to the more specific class of a digital numeric. Use a property node connected to that reference to set the precision. See the attached vi for an example.
    Brian
    Attachments:
    ArrayElementPrec.vi ‏27 KB

  • How do I change the font size of a document when I PRINT?

    How to I change the font size of a document when I print it?

    To specifically and fully answer your question, no, you absolutely cannot change the “font size” as a function of print.
    First of all, there isn't a single “font size” associated with a PDF file (and we assume you are referring to a PDF file since this is an Acrobat forum).
    Secondly, PDF is a final form file format meaning that the content is static in terms of location, size, etc. on the page. To change the point size of any particular text, you really need to go back to the source document and make the changes there.
              - Dov

  • I have changed the email signature on my iPhone, when composing a new email the signature is there, however when I am replying to an email it is not, how can I make sure that the signature is at the end of every email I send?

    I have changed the email signature on my iPhone, when composing a new email the signature is there, however when I am replying to an email it is not, how can I make sure that the signature is at the end of every email I send?

    Yes I know what you mean about it cluttering the thread and for personal emails it is better without the signature. However this relates to sending business emails from an iPhone so I need the signature present on every email.
    I can't find anything in Settings so I was hoping someone may have some knowledge/information/experience regarding this problem.

  • How do i change the cursor on a jtable header when clicked for sorting?

    here is my question, how do i change the cursor on a jtable header when I click the header for sorting?
    I think it is suppose to be in the fragment of code where the header listener is implemented for sorting, but I'm not quite sure what is the exact component that holds everything so that i can change the cursor...
    below is what I've tried, but it doesn't seem to work... thank you
    public void addMouseListenerToHeaderInTable(JTable table) {
    final TableSorter sorter = this;
    final JTable tableView = table;
    tableView.setColumnSelectionAllowed(false);
    MouseAdapter listMouseListener = new
    MouseAdapter() {
    public void mouseClicked(MouseEvent e) {
    TableColumnModel columnModel =
    tableView.getColumnModel();
    int viewColumn =
    columnModel.getColumnIndexAtX(e.getX());
    int column =
    tableView.convertColumnIndexToModel
    (viewColumn);
    System.out.println("column = "+column);
    if (e.getClickCount() == 1 && column != -1) {
    System.out.println("Sorting ...");
    Cursor oldCursor =
    tableView.getRootPane().getCursor();
    System.out.println("oldCursor.getType()
    = "+oldCursor.getType());
    if (oldCursor.getType() !=
    Cursor.WAIT_CURSOR){
    JComponent parentPane =
    tableView.getRootPane();
    parentPane.getContentPane().setCursor
    (new Cursor(Cursor.WAIT_CURSOR));
    parentPane.setCursor(new Cursor
    (Cursor.WAIT_CURSOR));
    Cursor newCursor =
    parentPane.getCursor();
    System.out.println("newCursor.getType
    () = "+newCursor.getType());
    int shiftPressed = e.getModifiers(
    &InputEvent.SHIFT_MASK;
    boolean ascending = (shiftPressed == 0);
    //System.out.println("tableView.getRootPane()
    is "+tableView.getRootPane().getRootPane());
    sorter.sortByColumn(column, ascending);
    tableView.getRootPane().setCursor(new Cursor
    (Cursor.DEFAULT_CURSOR));
    //System.out.println("Done sorting");
    JTableHeader th = tableView.getTableHeader();
    th.addMouseListener(listMouseListener);
    }

    Hi,
    Try setting the cursor for the table header.
    table.getHeader().setCursor(Wait_Cursor);
    Bala.

Maybe you are looking for

  • ITunes silently fails to launch in just my user account

    I'm running Windows XP SP3 32-bit with an administrator level account, installing iTunes for the first time ever on any of my systems in order to use it with my new iPod touch 5th gen, only to find that after install it won't launch. Went through the

  • 2 sums on the same field??

    hi I need a special request to do that: source : date price type 01/01/05 1000 credit 02/01/05 500 credit 02/01/05 200 debit 01/01/05 2000 debit 01/01/05 3000 debit 01/01/05 12 credit 02/01/05 12 credit result wanted: date credit debit 01/01/05 1012

  • Photoshop cs6 background content black instead of transparent

    I'm not sure what I did, but when I start a new project in PS the dialog box says that the background contents are set to transparent and the pixel aspect ratio is set to square pizels, but the document still shows a black background on screen. The l

  • Photos rotating in aperture

    When I go to pull pictures from Aperture into iMovie, the pictures have rotated 90 degrees.  They were not like that originally and I will fix them in Aperture but then other pictures rotate the next time I access that library.  Any ideas what is cau

  • How to disable/uncheck IPv6 in network adapter properties

    Hi, I need to programmtically disable/uncheck IPv6 during all Windows 7 deployments. Does anyone know where to find this in the registry or is there a Microsoft utility you can can use to achieve this? This is what I'm talking about: Open Network and