Background colour expression brings up a surprising result

0
down vote
favorite
I have a report where I want a cell colour to change if a duplicate value appears. I have used this expression for Background Colour:
IIF(Previous(Fields!CustomerSurname.Value) = Fields!CustomerSurname.Value, "Red", Fields!CustomerSurname.Value)
This works fine but if the customer surname is 'Brown' or 'Grey' then the cell colour matches the colour of the surname, eg the surname 'Brown' creates a brown cell background, not red. This doesn't happen with other surnames, eg ones that are not the names
of colours...
Any tips / guidance on how to avoid this would be appreciated - thanks.

IIF(Previous(Fields!CustomerSurname.Value) = Fields!CustomerSurname.Value, "Red", Nothing)
Please Mark This As Answer if it solved your issue
Please Vote This As Helpful if it helps to solve your issue
Visakh
My Wiki User Page
My MSDN Page
My Personal Blog
My Facebook Page

Similar Messages

  • Boring set of desktop background colours.

    A few months ago, soon after I first bought my Mac, I managed to achieve a choice of the full spectrum of colours for my desk top background colour, ending up with a delightful shade of grass green. I've no idea how, but now, wanting a change I can't find anything in desk top / screen saver except the same old boring set of solid colors and I can't seem to access the spectrum ball at all in relation to desk top.
    Incidentally, clicking on screen saver has of late resulted in a frozen screen and the beachball (Agh), necessitating the use of 'force quit' to return to normality.
    Can anyone set out an uncomplicated route to help give a change to my desk top ? Big thank you in anticipation.

    The background is just for the preview window.
    The spectrum ball is a part of the built it colour menu, easily accessed with command shift C or show colours in various apps.
    To get your apple green background using just apps available in Leopard.
    Open TextEdit > Format > Show fonts which brings up the font menu with various options along the top of the window. Forth box from left contains a blank page icon > click on the blank page and choose your colour from the colour menu.
    The TextEdit window will then be your colour > Make a big as possible > use command shift 3 to take a screen shot which will be on your desktop.
    Double click screen shot which will open in preview > draw a cropping box with the curser as big as possible > Tools > Crop > Save in User > Pictures.
    Access pictures folder from System prefs > Desktop >>
    An easier way would be to use a graphics app but not as much fun
    Maybe Paintbrush
    http://www.versiontracker.com/dyn/moreinfo/macosx/32559

  • How do I change the background colour on notes. I need a darker background due to a visual issue. Apple has now discriminated those with visual issues.  I am so not happy with many of the new changes because of this.

    I am so not happy with the new changes especially when it come to the ability to change background colours, fonts and font sizes/ colours... Does Apple really think that their only audience is the young cool crowd or people who do not have a visual impairment.  Think before you make changes to your software and programs.  You WILL lose more people to androids if you continue this way.
    At least give users the ability to make apps like notes their owned by allowing them to pick the style, theme, background and colour, font size and colour. 
    A very ****** off Apple user who is now looking at Androids.

    Hi Tricia,
    I'm sorry but I don't see an ideal way to do this. Is it the yellow label text, e.g:  "New" against the white background which is causing the difficulty?
    The only way I've found of getting the colors to change in Notes is via Settings>General>Accessibility>Invert Colors but then it looks like something has barfed all over your screen.
    I'd be very, very surprised if Apple do not fix this, firstly because I believe "Accessibility" is a legal matter and secondly because they will not want to cause difficulty for their customers.  We have to remember that this is a major, major overhaul of iOS, it has essentially been taken back to the drawing board and done from scratch again, it may take a little time, but I'm sure they will fix these issues.
    Regards,
    Steve

  • Background Colour in Pages 5.0.1

    Knowing how Apple likes to have everything sent electronically, and not printed, I am surprised that I can't change the background page colour of documents.
    I can change the background of a word, sentence and paragraph. I can even select all the text on a page and change the background colour of that.
    But there is still a white border all around this document, where the margins, headers and footers are.
    It looks really NAFF.
    Anyone got any ideas please.

    Make a page size rectangle, color it and send it to the back or make it a master object.
    Peter

  • Background colour in pages document

    Is there a way of having white as my background colour for my document and using white script?

    Peter, thank you for your response.
    I wasn't trying to lock horns with you.
    Your story about your sister in law made me laugh.
    To be certain, I am NOT arguing that black text on white background is less legible
    [I'm sure you are correct that it is more legible. That would stand to reason].
    I am saying that staring at lots of white light hurts my eyes and I don't like looking at it for a long time.
    I'm sorry you disagree with what I have experienced that applies to me personally over many years.
    However,
    I don't think that's superstition.
    That's years of personal experience, related to my own personal eyeballs [not yours].
    To drop pretensions of science,
    I'm afraid what this boils down to is I can't be told what I like to see, or look at for long periods, and what is more comfortable for me personally.
    To use a very rough analogy : 
    Would it be more painful for you to stare at a very intense little ball of light [or a few of them] / [or a neutral-coloured ball of light] against a dark night sky?
    OR at a few black dots in front of , perhaps not the sun, but some other similarly but far less intense light across say, the sky as a backdrop, all of that light shining in your eyes?
    Would you rather try and read small text on a dim lightbulb, or against a fully-lit lightbulb?
    You may be different. I personally prefer the text on the more neutral lightbulb.
    I'm perfectly happy to be surprised, but I don't think you were addressing a slightly separate topic: legibility, rather than photoreceptors being bombarded with hot-light all day.
    While legibility is a factor related to eyestrain, I would suspect for different reasons,
    and ultimately, what negligible-difference I may lose in legibility is far-more than made up for by not having to stare at a flat panel beaming hot-light into my eyes all day.

  • Unable to set background colour JTableHeader in Java 1.6_18

    We're moving our application from Java 1.4.2 to 1.6_18, so far without major problems but there's some small issues with the GUI. Originally we'd change the background colour of the JTableHeader, but in 1.6_18 that doesn't seem to work. Instead of colouring the complete header it just seems to draw an outline. It kind of gives the impression that there's something on top of the table header which hides the coloured background.
    The code below shows what I'm trying to do, and gives different results when compiled in Java 1.4.2 and Java 1.6_18. It makes no difference whether I'm using the UIManager or setting the background directly on the JTableHeader.
    The application still works fine of course, but it bugs me that I can't work out what the problem is, so any suggestions would be greatly appreciated! I've already had a look at bug [6521138|http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6521138], but it makes no difference whether a new JTableHeader is set, so I think it's different. Also, the workaround for bug [4776303|http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4776303] has no effect so I think that doesn't apply either.
        public static void main(String[] args) {
            try {
                UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
                // Doesn't give the expected result in Java 1.6_18, the background remains white-ish with only a coloured border.
                // UIManager.put("TableHeader.background", Color.GREEN);
                // UIManager.put("TableHeader.foreground", Color.BLUE);
            } catch (Exception exception) {
                exception.printStackTrace();
            final JFrame frame = new JFrame();
            frame.getContentPane().add(createPanel());
            frame.getContentPane().setLayout(new FlowLayout());
            frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
            frame.pack();
            frame.setVisible(true);
        private static JPanel createPanel() {
            final JPanel panel = new JPanel();
            final DefaultTableModel model = new DefaultTableModel(3, 2);
            final JTable table = new JTable(model);
            // Tableheaders.
            final TableColumnModel columnModel = table.getColumnModel();
            columnModel.getColumn(0).setHeaderValue("First");
            columnModel.getColumn(1).setHeaderValue("Second");
            // Doesn't give the expected result in Java 1.6_18, the background remains white-ish with only a coloured border.
            table.getTableHeader().setBackground(Color.GREEN);
            table.getTableHeader().setForeground(Color.BLUE);
            final JScrollPane scrollPane = new JScrollPane(table);
            panel.add(scrollPane);
            scrollPane.setSize(400, 100);
            panel.setSize(500, 500);
            panel.setPreferredSize(panel.getSize());
            return panel;

    Hillster wrote:
    Ah yes, when I change that setting the background of the table header indeed gets the expected background colour. Unfortunately it also makes my desktop look hopelessly outdated :-( And I can't really expect my end-customers to change their settings just to run my little application. Still, I suppose this proves that the problem lies in the L&F?Seconded Jeanette's sentiment, this is definitely a feature, not a problem. You want system LaF, you get System LaF, with all the bells and whistles. If you're sure you don't want the system embellishments, you could consider using my [_default table header cell renderer_|http://tips4java.wordpress.com/2009/02/27/default-table-header-cell-renderer/].
    db

  • A problem changing applet's background colour

    Hi there,
    I'm hoping somebody can help me with what I believe to be a problem I have in changing the background colour of an applet, the source code of which is posted below. If super.paint(g); is commented out, the background of the applet will be changed to whatever colour is specified, however if it is not the background will remain grey. As I understand though, super.paint(g); should be part of the program. What am I doing wrong? Should super.paint(g); in this example be part of the program?
    Before posting this I searched the forums and looked at some of the Q's & A's about changing an applet's background colour but am non the wiser.
    Thank you for your help.
    Regards,
    THE_TH1NG
    import javax.swing.*;
    import java.awt.Color;
    import java.awt.Graphics;
    public class Calculate extends JApplet
    public Calculate()
    //Variables used in our calculations.
    double sum; // Add the two numbers
    double product; // Multiply the two numbers
    double quotient; // The first number divided by the second number
    double difference; // The first number minus the second number - This may result in a negative value being returned
    double userInput1; //Stores the first number as a double after being converted from type string
    double userInput2; //Stores the second number as a double after being converted from type string
    public void init()
    String number1; // The first number to be entered by the user
    String number2; // The second number to be entered by the user
    number1 = JOptionPane.showInputDialog("Please enter the first floating point number"); // The user inputs the first number as a string
    number2 = JOptionPane.showInputDialog("Please enter the second floating point number"); // The user inputs the second number as a string
    // Convert the user's input from type string to type double
    userInput1 = Double.parseDouble( number1 );
    userInput2 = Double.parseDouble( number2 );
    // Perform the calculations
    sum = (userInput1 + userInput2);
    product = (userInput1 * userInput2);
    difference = (userInput1 - userInput2);
    quotient = (userInput1 / userInput2);
    public void paint( Graphics g )
    //The applets background will be set to the desired colour if super.paint(g) is commented out
    //But the background will remain grey if the code is not commented out.
    //What am I doing wrong?
    //super.paint( g );
    setBackground(new Color(50,150,255)); //Light Blue
    g.drawRect(10,10,250,100); // Draw a rectangle 250 pixels wide X 100 pixels high to enclose the rest of the program's output
    //Dispaly the results of the calculations to the user
    g.drawString( "The numbers entered are " + userInput1 + ", " + userInput2, 25, 25);
    g.drawString( "The sum is " + sum, 25, 40);
    g.drawString( "The product is " + product, 25, 55);
    g.drawString( "The difference is " + difference, 25, 70);
    g.drawString( "The quotient is " + quotient, 25, 85);

    You could try defining
    public void update(Graphics g) {
        paint(g);
    }That's the only difference I see between your code and my applet code. If that isn't it, you could try getContentPane().setBackground(...) but I don't know how that could make much difference (I would think that the content pane is transparent...)
    Another possibility is that, if you're using Swing, you probably shouldn't be overriding paint() and should stick to the paintComponent() method or whatever is appropriate.

  • Background colour of Popup LOV

    Hi,
    The disabled text-box of the popup LOVs in my application do not appear 'greyed' out when viewed in IE (they are fine in FF and GC). I am using Theme 13. Where can I change the background colour? I can't seem to find anywhere in either the template (preferred choice) or even the individual item's options to add the code for the style change.
    Thanks
    Lucy

    Ok. This looks like a bug in the Theme Template.
    Does not exactly look good, but better than before in that at least the text and links are visible !
    a. Edit the Popu LOV Template from Shared Components for the Slate Theme
    b. In Search Field - Before Field Text add the style as given below
    <div class="t1PopupHead" style="background-color:#ffffff;">c. Add the above style to Ressult Set - Before Result Set as well
    <div class="t1PopupBody" style="background-color:#ffffff;">Might be a known issue, will check it out.
    Regards,

  • Background Colour Incorrect when exporting to PDF from Crystal Reports 2008

    Hello All
    When exporting to PDF from CR2008 the background colour of the crosstab is incorrectly displayed. The problem is as follows to create a crosstab with a grey header row and column details in white we have used the following trick.
    Format Cross Tab Border Background is set to Silver.
    Crosstab Expert Grand Total Background colour is set to white.
    The result is a crosstab with header in grey and details in white.
    This report displays correctly in CR2008, and exports as seen on screen to everything but PDF. When exporting to PDF the Crosstab is completely grey taking on only the Background colour of silver, and ignoring the Grand Total Background colour being set to white.
    What is strange that when I print to PDF the format is also displayed exactly as required,
    Any help on this matter would be greatly appreciated.
    Some additional details.
    CR2008 version 12.3.1.683
    Adobe Reader version 9.3.3
    Windows XP Professional
    Thanks
    Phillip
    Edited by: Phillip L on Nov 23, 2010 1:51 PM

    If this is a big issue for you then please purchase a case and a Rep can duplicate and escalate to R&D.
    As a work around export to Editable RTF and in Word 2007 you can get a PDF export plug-in and then export to PDF.
    Thank you
    Don

  • RTF text with background colour - formatting lost in editable RTF export

    Hi
    I have designed a report in CR2008 using XSD datasource.
    I have a field which returns a RTF text. The text comes out correctly when I run the report. 
    Scenario:
    1.Background colour (eg Yellow) has been applied to the field
    2.RTF text contains paragraph breaks
    Result
    The background appears for each paragraph and where there a para break, there is white space. In other words, I want the background colour to appear for the entire field. Right now, it appears odd because I have white spaces between each paragraph with the background colour for each paragraph
    Example:
    Text is as below (with RTF coding)
    In a bad mood? Don't worry   according to research, it's good for you.
    An Australian psychology expert who has been studying emotions has found being grumpy makes us think more clearly.
    In contrast to those annoying happy types, miserable people are better at decision making and less gullible, his experiments showed.
    While cheerfulness fosters creativity, gloominess breeds attentiveness and careful thinking, Professor Joe Forgas told Australian Science Magazine.
    My export type is Editable RTF. The background colour is maintained when you choose Word for Windows option or PDF (but this is not what I want to use in the report). Can the background be maintained for Editable RTF? Is there a work around for this problem?
    Thanks

    Please re-post if this is still an issue or purchase a case and have a dedicated support engineer work with you directly:
    http://store.businessobjects.com/store/bobjamer/DisplayProductByTypePage&parentCategoryID=&categoryID=11522300?resid=-Z5tUwoHAiwAAA8@NLgAAAAS&rests=1254701640551

  • How to insert background colour into text?

    Hi,
    I'm relatively new to Dreamweaver so I'm not sure how exactly to phrase this question. Within a div file on my HTML I have created I have a few links taking the user to another page. .
    For the sake of clarity I have inserted an image to express what I am trying to say.
    The background colour for my div is a chocolate brown. I was wondering if there was any way of creating a background for the text for each link within the div? So the text would have a background with a different colour?
    I'm trying to create something that looks like this:
    Does anyone know if this is possible to do? Do I have to create separate Div files within the main div file to do this?
    Apologies for the lack of detail, I just don't know the technical words to show what I'm looking to do! Any tips or links to tutorials would be hugely appreciated.
    Thanks for reading.

    First, we need to examine the HTML code used to construct your menu.  The modern approach is to use an unordered list like this:
    <nav>
         <ul>
              <li><a href="#">Menu Item1</a></li>
              <li><a href="#">Menu Item2 </a></li>
              <li><a href="#">Menu Item3</a></li>
              <li><a href="#">Menu Item4</a></li>
              <li><a href="#">Menu Item5</a></li>
         </ul>
    </nav>
    Then style your navigation with CSS like this:
    <style>
    /**zero out margins & padding on everything**/
    margin:0;
    padding:0;
    /**fix the CSS Box Model on % layouts**/
    -moz-box-sizing:border-box;
    -webkit-box-sizing:border-box;
    box-sizing:border-box;
    nav {
        width: 100%;  /**adjust width as needed**/
        background-color: #960;
        padding: 30px;
    nav ul {
        margin: 0;
        padding: 0
    nav li {
        width: 20%;
        list-style: none;
        font-size: 14px;
        float: left;
        text-align: center;
    /**menu links**/
    nav li a {
        display: block;
        text-decoration: none;
        margin-right: 6px;   /* space between links */
        width: auto;  /* adjust as needed or use auto */
        padding: 6px;
        font-weight: bold;
        line-height: 2em;
        color: #FFF;
        background: orange;
    /**menu style on mouse over**/
    nav li:hover {
        color: #FFF;
        background: #1e5799;
    /**clear floats after nav element**/
    nav:after {
        clear: both;
        display: block;
        content: ' ' ;
    /**END MENU STYLES**/
    </style>
    Nancy O.

  • Render/Lighting/Background colour buttons automatically switch on layers?!

    Hi There,
    I've discovered what is either a bug in Acrobat 3D v7 or a problem with my scripting (most likely the latter!).
    I have a series of buttons that i've scripted so that when pressed, switch on/off various objects. However, when any of the Render Mode or Lighting or Background Colour buttons are pressed, all the objects (whether they've been switched off or not) are automatically switched on.
    Does anyone have any ideas on why this is happening? I had intended to attach my pdf as an example, but there doesn't seem to be an "attach file" option here.
    Can anyone help?
    George

    George,
    This is not a bug, it is indeed intentional. The Toolbar buttons are for the User, and if they click on a button to affect the rendermode/lighting/Background color, the safest and most logical thing for us to do was apply this affect to every object in the scene, and show the results.
    There are a Few ways you could solve this:
    1) In the 3D Properties dialog, DE-select "Show Toolbar by Default".
    2) Use a ToolEventHandler(), and re-run your functions after the user interacts with a given tool. You would need to keep a visibility state variable to know what to re-instate.
    gb

  • PSE9, how to change background colour?

    Hi
    I was shown how to change the background colour using....and this is where it all goes wrong!!
    I have taken a photo on a hi key background but there are slight colour variations due to shadow. I was shown how you can change the background colour to a consistent white using tool that allowed you to choose black,grey and white point but at this moment in time maybe a bit of bbq alcohol and age are preventing me from remembering how to do this....any ideas, please?
    Cheers

    Enhance<Adjust Color<Remove Color Cast
    Look at image and try to figure out what should be white, gray,or black. Click that area with the color cast dropper. Below is a video showing how to use the color cast tool.
    http://www.youtube.com/watch?v=Roinm3J3GjI&feature=player_embedded
    I think from your post that it is safe to assume that you used levels. Basically, you first click on something you know is white with the white dropper; then click on something you know is black with the black dropper; finally find something that is gray and click on it with the gray dropper. Note: You may want to go through and set target colors for the levels droppers to customize how they react. See the written tutorial links at the end of this post.
    Levels is covered at about 5:15 of video in video linked below. Note: It's a Photoshop video. It works the same way in Elements.
    http://www.youtube.com/watch?v=LLKc61tM5b4
    The above video gives several methods. It is a Photoshop video but several of these methods can be used in Elements. Elements has a color cast tool that is not included in Photoshop so isn't covered in this. Disregard Match Color method and Curves method as Elements does not include  these commands. (This tutorial also mentions using the fade command. Elements does not include this command. You can reduce the opacity of a duplicate layer on which you apply the variations command and use the layer's opacity to "fade" the result. If you go that route.)
    Several Photoshop Elements videos on the subject are here:
    http://www.youtube.com/results?search_query=color+cast++levels+Photoshop+Elements&aq=f
    Here are a couple of tutorial links if you don't like video:
    http://www.graphicreporter.com/tutorials/elements_levelsadjustment.html
    http://www.photoshopessentials.com/photo-editing/elements/tone-color/

  • Background colour change

    How to change  a background colour leaving the two figures in the centre intact?

    Without seeing the image it's hard to make suggestions.  Even then, there will likely be a gazillion different ways of changing the color of the background.  Are you familiar with adjustment layers?  Masks? Making selections?  Layer blending modes?  I recommend searching around on the internet for some tutorials of these very basic Photoshop functions.  They're the foundation of everything you do in PS.
    It could be as easy as creating a Hue/Saturation adjustment layer, moving the hue to something you like, then use the mask to remove what you don't want changed (sometimes it's easier to mask everything and then just add where you want the color changed on the mask).  For other changes you may get the results you want using a fill layer with a layer blending mode.

  • Design Studio 1.3: include image, change textbox background colour, Data labels allingment

    Dear Community,
    I've been trying to rebuild one of my Analayis Office Workbooks within Design Studio.
    Attempting this, I've come across some questions I hope to find answers to, with your help:
    1. How can I include images, in a local application? I've inserted the "image" component, but I can't asign an Image file to this.
    2. How can I change the background colour of a textbox-component?
    3. I have a chart in my Dashboard. The bars I want to be labled. But defining, that data labels should be placed outside the bars, there is a mixed result. Some bars show the labels outside, some others display the lable somewhere within the bar.
    Who can help with those questions? Thanks a lot.
    Kind regards
    Sarah

    1. How can I include images, in a local application? I've inserted the "image" component, but I can't asign an Image file to this.
    When working in Local Mode, go to Application -> Open Repository Folder -> and open the folder that your BI Application is named.  Place your image file there.  Go back to your Design Studio Image component and set the src to the name of that image file.  It should show up.  This gets a little more involved when working on the BI Platform or NetWeaver Platform, as you'll want to publish the Image to a public folder on the CMS somewhere (for BI Platform), or the MIME Repository (for NetWeaver Platform).  But the concept is similar in that you have to know where to place the files once you are at that point.  Also as an approach that should work without any need to publish the image to the platform (as it's a little tedious), please read this document:
    How to embed images inside of a Design Studio App without uploading to server.
    Or, if you do not want to go through the base-64 encoding, consider the addon I blogged about here:
    Design Studio 1.2 SDK - An Image Component free of MIME Repository worries
    The deployable version can be downloaded from this blog:
    Design Studio 1.2/1.3 SDK - Design Studio Utility Pack
    2. How can I change the background colour of a textbox-component?
    You will have to write a CSS rule like this:
    .testbox {
        background : #009966;
    Then assign 'testbox' as the CSS Class to the text input box.
    3. I have a chart in my Dashboard. The bars I want to be labled. But defining, that data labels should be placed outside the bars, there is a mixed result. Some bars show the labels outside, some others display the lable somewhere within the bar.
    Not sure how much control the delivered chart components would give you here.  Maybe one of the third party addons listed in this post could help?
    List of Design Studio SDK Components

Maybe you are looking for

  • Download ZIP file without changing file extension

    I regularly download a zipped csv file, of the format: "filename.csv.gz". As the name does not change, Firefox adds a digit to distinguish it, so for example I get "filename.csv-3.gz". This is a pain as it changes the file extension which means that

  • Table in which Kernel Info

    Hello, In my report program, I need to fetch the kernel info of a system. We ususally get this from release notes in SM51 transaction or from the menu System->status then click on the 'right' arrow which is next to navigate button.  Small window open

  • Dynamic Text in a JTextPane

    Dear All, I would like to ask you if it is somehow feasible to create dynamic text into a JTextArea/JTextPane and/or JEditorPane. To be more specific, by the term dynamic text, I mean to have the opportunity to specify that some of the words containe

  • How do I calculate/retrieve the depth of a current node in XSLT?

    I mean the number of parent nodes a particular node has, hard coded something like: <root> <child depth="1"> <another_child depth="2"> I do not want to hard code these levels, so i am searching for a way to do it in XSLT. I could not find a function/

  • JSlider or similar for controlling position in sound files help please.

    You know how winamp, wm player , etc, and JMStudio all have a "slider" bar to control position, along with a "numeric readout" of the current position. Fairly new to Java, but know this isn't a difficult thing to do, just haven't found out how to do