PropertyChangeListener for a JButton that contains a JPanel?

I created a class that extends from the JButton class. The class contains a JPanel that adds two components to the panel, A JLabel that contains text and a JLabel that contains an icon. Therefore this class is really just a button that contains a JPanel with 2 JLabels added to the panel. (Reason for doing this is it adds layout control to add the 2 components to a panel instead of directly to the JButton) Normally you would do a changepropertylistener to the JButton but because I added the 2 components (JLabel) to a panel and then added the JPanel to the button, the button doesn't notice any change events. How would I detect the PropertyChangeEvent for this cenario?
thanks,
Peter Landis

The solution to the problem is when the instance of the class is created, do a getComponent(0) to get the JPanel component and the do a getComponent(0) to get the JLabel component. Now from here you can add a PropertyChangeListener to the JLabel that you just obtained. The PropertyChangeListener class will look like:
class RotorItemListener implements PropertyChangeListener
     public void propertyChange(PropertyChangeEvent e)
System.out.println("CHANGE");
String name = e.getPropertyName();
if(name == "text")
System.out.println("Label changed");
This will only trap a change that occurs when the label has changed. If you omit the if(name == "text") then when the component is created, a property change event will be triggered which is not what you want. This only traps event that occur only when a change has occurred on the JLabel. Notice that during the instantiation of the component you'll see the text displayed "CHANGE" and not the "Label changed" until the label text has changed.
Pretty cool huh!

Similar Messages

  • Search for a string that contains a '

    I am searching for an email address that contains a ' (o'[email protected]). I think I'd use some sort of ESCAPE character around the tic but I can't seem to get this to work. Appreciate the help.
    select email_addr from customer
    where email_addr = 'o'[email protected]'
    That would be the SQL - should this work?
    select email_addr from customer
    where email_addr = 'o\'[email protected]' ESCAPE ('\'
    This is returning a string not properly terminated error
    Thanks

    A quick search provides this:
    Re: URGENT  update a table with a text that has a single quote in it
    or indeed:
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/sql_elements003.htm#SQLRF00218
    Message was edited by:
    Boneist

  • What happened to the elevator box for the window that contains email boxes?

    About 2 weeks ago, the window containing my Charter email lost the elevator box at the right side. The email list and text boxes still have elevators for scrolling; but the big window that contains them doesn't.
    I like to move the window contents so the menu bar (Send, Reply...Delete etc) is at the top, to maximize space for the email text. I can't do this any more. All other windows still have elevator boxes for scrolling.
    I am running Firefox 17 on a MacBook, OS 10.6.8.

    Thank you so much for sharing these, Diana.
    My hunch is that this is a problem with the Charter website. Good web designers know how to make a website look identical in different browsers, but sometimes they make mistakes. These mistakes can cause the website to look different in different browsers.
    Do you know anyone else who uses Charter in Firefox? Do they have the same problem? If they do, you will know that this is a problem with the Charter website and that Firefox is working fine on your computer.
    Either way, there might be some ways to work around this issue. One of these should hopefully do the trick.
    Option 1: Take a look near the bottom-right of the screen, where it says '''''Storage:''' x% of 1GB''. Near that corner there is a triangle. I think you can drag that triangle to make the email area bigger and create an elevator in the process. Try it out!
    Option 2: I noticed that there is a warning at the top. "Firefox prevented this page from automatically redirecting you to another page." Try clicking ''Allow''. This is perfectly safe, since you know Charter is a reputable website.
    Option 3: Just below the ''Log Out'' button there are two buttons, one with an arrow pointing upwards and one with two squares. Try clicking them. Maybe one of them will expand the email area.
    Option 4: As a last resort, you can type these three keys at the same time to make the Firefox window bigger: command ([http://www.onedigitallife.com/images/apple-command-key.jpg looks like this]) + Shift + F. You type the keys again to restore Firefox to its normal size.
    Hoping one of those does the trick. Let me know how it works out!

  • WS proxy for a WSDL that contains free-form xml

    Hi there,
    I have a problem with a web service that I am using. It is the notify interface of the WS Notification specification.
    It contains an operation
    Notify
    that has an
    xsd:any
    element in its core.
    <!-- ========== Message Types for NotificationConsumer  =========== -->
      <xsd:element name="Notify">
        <xsd:complexType>
          <xsd:sequence>
            <xsd:element maxOccurs="unbounded" minOccurs="1" ref="wsnt:NotificationMessage"/>
            <xsd:any maxOccurs="unbounded" minOccurs="0" namespace="##other" processContents="lax"/>
          </xsd:sequence>
        </xsd:complexType>
      </xsd:element>
    I created a schema that should go into that position in the message. I then put the schema as a type into the WSDL of the service that I want to invoke.
    <xs:schema version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.sap.com/projects/socrades">
      <xs:complexType name="deviceEvent">
        <xs:sequence>
          <xs:element name="deviceUUID" type="xs:string" minOccurs="0"/>
          <xs:element name="message" type="xs:string" minOccurs="0"/>
          <xs:element name="serviceID" type="xs:string" minOccurs="0"/>
        </xs:sequence>
      </xs:complexType>
    </xs:schema>
    This works well - generates a package with a class, object factory and package info (just like the other schemas that are part of the Web Service's WSDL).
    Then I try to use that class to create a request object for the web service call:
              Message msg = new NotificationMessageHolderType.Message();
              // JAXBelement for msg
              DeviceEvent deviceEvent = new DeviceEvent();
              deviceEvent.setDeviceUUID(deviceUUID);
              deviceEvent.setServiceID(serviceID);
              deviceEvent.setMessage(message);
              JAXBElement<DeviceEvent> content = new JAXBElement<DeviceEvent>(
                        new QName(URIHelper.WSN_B_2, "DeviceEvent"),
                        DeviceEvent.class, deviceEvent);
              msg.setAny(content);
              notification_message.setMessage(msg);
              Notify notify = new Notify();
              notify.getNotificationMessage().add(notification_message);
              // and send it
              eventingPort.notify(notify);
    When I run the program, I get the following error message:
    javax.xml.ws.WebServiceException: Connection IO Exception. Check nested exception for details. (Connection IO Exception. Check nested exception for details. (Exception; nested exception is:
         javax.xml.bind.MarshalException
    - with linked exception:
    [javax.xml.bind.JAXBException: com.sap.projects.socrades.DeviceEvent is not known to this context]))
         at com.sap.engine.services.webservices.espbase.client.jaxws.core.WSInvocationHandler.processTransportBindingCall(WSInvocationHandler.java:173)
         at com.sap.engine.services.webservices.espbase.client.jaxws.core.WSInvocationHandler.invokeSEISyncMethod(WSInvocationHandler.java:120)
         at com.sap.engine.services.webservices.espbase.client.jaxws.core.WSInvocationHandler.invokeSEIMethod(WSInvocationHandler.java:83)
         at com.sap.engine.services.webservices.espbase.client.jaxws.core.WSInvocationHandler.invoke(WSInvocationHandler.java:64)
         at $Proxy40.notify(Unknown Source)
         at com.sap.sii.localDiscovery.BackendConnectorImpl.receivedEvent(BackendConnectorImpl.java:452)
         at com.sap.sii.localDiscovery.interfaces.AbstractLocalDiscovery.receivedEvent(AbstractLocalDiscovery.java:174)
         at com.sap.sii.localDiscovery.DeviceServiceProxyMaternaDPWSClient.receiveEvent(DeviceServiceProxyMaternaDPWSClient.java:463)
         at org.ws4d.java.eventing.EventManager.handleIncomingEvent(Unknown Source)
         at org.ws4d.java.eventing.EventListener.handleIncomingEvent(Unknown Source)
         at org.ws4d.java.communication.Dispatcher.notifyEventListeners(Unknown Source)
         at org.ws4d.java.communication.Dispatcher.receiveSOAPEnvelope(Unknown Source)
         at org.ws4d.java.communication.Dispatcher.receiveSOAPEnvelope(Unknown Source)
         at org.ws4d.java.communication.soap.SOAPServer.receiveSOAPEnvelope(Unknown Source)
         at org.ws4d.java.communication.soap.SOAPServer.receiveSOAPEnvelope(Unknown Source)
         at org.ws4d.java.communication.http.HTTPServer.notifySOAPListener(Unknown Source)
         at org.ws4d.java.communication.http.HTTPConnectionHandler.handleConnection(Unknown Source)
         at org.ws4d.java.communication.http.HTTPConnectionHandler.run(Unknown Source)
         at java.lang.Thread.run(Thread.java:595)
    Caused by: com.sap.engine.services.webservices.espbase.client.bindings.exceptions.TransportBindingException: Connection IO Exception. Check nested exception for details. (Connection IO Exception. Check nested exception for details. (Exception; nested exception is:
         javax.xml.bind.MarshalException
    - with linked exception:
    [javax.xml.bind.JAXBException: com.sap.projects.socrades.DeviceEvent is not known to this context]))
         at com.sap.engine.services.webservices.espbase.client.bindings.impl.SOAPTransportBinding.writeSOAPRequestMessage(SOAPTransportBinding.java:239)
         at com.sap.engine.services.webservices.espbase.client.bindings.impl.SOAPTransportBinding.call_SOAP(SOAPTransportBinding.java:1055)
         at com.sap.engine.services.webservices.espbase.client.bindings.impl.SOAPTransportBinding.callWOLogging(SOAPTransportBinding.java:779)
         at com.sap.engine.services.webservices.espbase.client.bindings.impl.SOAPTransportBinding.call(SOAPTransportBinding.java:722)
         at com.sap.engine.services.webservices.espbase.client.jaxws.core.WSInvocationHandler.processTransportBindingCall(WSInvocationHandler.java:167)
         ... 18 more
    Caused by: com.sap.engine.services.webservices.espbase.client.bindings.exceptions.TransportBindingException: Connection IO Exception. Check nested exception for details. (Exception; nested exception is:
         javax.xml.bind.MarshalException
    - with linked exception:
    [javax.xml.bind.JAXBException: com.sap.projects.socrades.DeviceEvent is not known to this context])
         at com.sap.engine.services.webservices.espbase.client.bindings.impl.JAXWSUtil.serializeOutboundJAXB(JAXWSUtil.java:295)
         at com.sap.engine.services.webservices.espbase.client.bindings.impl.JAXWSUtil.serializeRequestJAXB(JAXWSUtil.java:231)
         at com.sap.engine.services.webservices.espbase.client.bindings.impl.SOAPTransportBinding.writeSOAPRequestMessage(SOAPTransportBinding.java:235)
         ... 22 more
    Caused by: java.rmi.RemoteException: Exception; nested exception is:
         javax.xml.bind.MarshalException
    - with linked exception:
    [javax.xml.bind.JAXBException: com.sap.projects.socrades.DeviceEvent is not known to this context]
         at com.sap.engine.services.webservices.espbase.client.bindings.impl.JAXWSUtil.serializeParameterJAXB(JAXWSUtil.java:140)
         at com.sap.engine.services.webservices.espbase.client.bindings.impl.JAXWSUtil.serializeParameterJAXB(JAXWSUtil.java:117)
         at com.sap.engine.services.webservices.espbase.client.bindings.impl.JAXWSUtil.serializeOutboundJAXB(JAXWSUtil.java:285)
         ... 24 more
    Caused by: javax.xml.bind.MarshalException
    - with linked exception:
    [javax.xml.bind.JAXBException: com.sap.projects.socrades.DeviceEvent is not known to this context]
         at com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:246)
         at com.sun.xml.bind.v2.runtime.BridgeImpl.marshal(BridgeImpl.java:54)
         at com.sap.engine.services.webservices.espbase.client.bindings.impl.JAXWSUtil.serializeParameterJAXB(JAXWSUtil.java:130)
         ... 26 more
    Caused by: javax.xml.bind.JAXBException: com.sap.projects.socrades.DeviceEvent is not known to this context
         at com.sun.xml.bind.v2.runtime.XMLSerializer.reportError(XMLSerializer.java:223)
         at com.sun.xml.bind.v2.runtime.XMLSerializer.reportError(XMLSerializer.java:238)
         at com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl$1.serializeBody(ElementBeanInfoImpl.java:85)
         at com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl$1.serializeBody(ElementBeanInfoImpl.java:127)
         at com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeBody(ElementBeanInfoImpl.java:244)
         at com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeRoot(ElementBeanInfoImpl.java:251)
         at com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeRoot(ElementBeanInfoImpl.java:33)
         at com.sun.xml.bind.v2.runtime.property.SingleReferenceNodeProperty.serializeBody(SingleReferenceNodeProperty.java:74)
         at com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeBody(ClassBeanInfoImpl.java:286)
         at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:619)
         at com.sun.xml.bind.v2.runtime.property.SingleElementNodeProperty.serializeBody(SingleElementNodeProperty.java:114)
         at com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeBody(ClassBeanInfoImpl.java:286)
         at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:619)
         at com.sun.xml.bind.v2.runtime.property.ArrayElementNodeProperty.serializeItem(ArrayElementNodeProperty.java:29)
         at com.sun.xml.bind.v2.runtime.property.ArrayElementProperty.serializeListBody(ArrayElementProperty.java:132)
         at com.sun.xml.bind.v2.runtime.property.ArrayERProperty.serializeBody(ArrayERProperty.java:101)
         at com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeBody(ClassBeanInfoImpl.java:286)
         at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:619)
         at com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:241)
         ... 28 more
    Caused by: javax.xml.bind.JAXBException: com.sap.projects.socrades.DeviceEvent is not known to this context
         at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getBeanInfo(JAXBContextImpl.java:507)
         at com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl$1.serializeBody(ElementBeanInfoImpl.java:82)
         ... 44 more
    It seems the main exception is that the not known to the JAXB context. Any ideas how I can make the JAXB context of the web service call aware of the class?
    Best regards,
    Patrik

    Hi Evan,
    I don't think the wsdl is broken. I assume your webservice is deployed on WAS. Typically the SAP wsdl consist of 3 files, main wsdl file and 2 other files for binding and porttypes.
    When all three files are appropriately available then only the proxy gets generated.
    Since in your case the proxy is generated and you could activate it, means there is no problem in the wsdl.
    Are there any further details in your error?
    Does your service methods require any input and you are providing the input appropriately?
    Regards,
    Vandana.

  • Count number of distinct values for a column for all tables that contains that column

    Imagine I have one Column called cdperson. With the query below I know which Tables have column cdperson
    select
    t.[name]fromsys.schemassinnerjoin 
    sys.tables 
    tons.schema_id=t.schema_idinnerjoin 
    sys.columnscont.object_id=c.object_idinnerjoin 
    sys.types  
    donc.user_type_id=d.user_type_idwherec.name ='cdperson'
    now I want to know for each table, how many distinct values of cdperson I have and I want the result ordered by the table that has more distinct values (descending)
    Table1                                                                                     
       cdperson                        select distinct(cdperson) = 10
       cdadress
       quant
    Table2 with 
       cdaddress                      (no column cdperson in this table)
       quant
    Table3
       cdperson                        select distinct(cdperson) = 100
       value
    Table 4
       cdperson                        select distinct(cdperson) = 18
       sum
    I want this result ordered by number of distinct cdperson
    table3   100
    table4   18
    table    10
    Thks for your answers

    I had to add schema name to the above script to make it work in AdventureWorks:
    CREATE TABLE #temp(TableName sysname , CNT BIGINT)
    DECLARE @QRY NVARCHAR(MAX);
    SET @qry=(SELECT
    N'INSERT INTO #TEMP SELECT '''+schema_name(t.schema_id)+'.'+T.[name] +''' AS TableName, COUNT (DISTINCT ProductID) DistCount FROM '+
    schema_name(t.schema_id)+'.'+t.[name] +';'
    FROM sys.schemas s INNER JOIN sys.tables t ON s.schema_id=t.SCHEMA_ID
    INNER JOIN sys.columns c ON t.object_id=c.object_id INNER JOIN sys.types d ON c.user_type_id=d.user_type_id
    WHERE c.name ='ProductID'
    FOR XML PATH(''))
    EXEC(@QRY)
    SELECT * FROM #temp ORDER BY TableName
    DROP TABLE #temp
    Production.Product 504
    Production.ProductCostHistory 293
    Production.ProductDocument 31
    Production.ProductInventory 432
    Production.ProductListPriceHistory 293
    Production.ProductProductPhoto 504
    Production.ProductReview 3
    Production.TransactionHistory 441
    Production.TransactionHistoryArchive 497
    Production.WorkOrder 238
    Production.WorkOrderRouting 149
    Purchasing.ProductVendor 211
    Purchasing.PurchaseOrderDetail 211
    Sales.SalesOrderDetail 266
    Sales.ShoppingCartItem 3
    Sales.SpecialOfferProduct 295
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Database Design
    New Book / Kindle: Beginner Database Design & SQL Programming Using Microsoft SQL Server 2014

  • HT1925 I am trying to remove iTunes, but am receiving an error message "The feature you are trying to use in on a network resource that is unavailable."  It is looking for a folder that contains the installation package 'iTunes.msi'

    Can anyone please help me?  I have having difficulty removing iTunes from my PC; this is the message I am getting:

    Download the Windows Installer CleanUp utility from the following page (use one of the links under the "DOWNLOAD LOCATIONS" thingy on the Major Geeks page):
    http://majorgeeks.com/download.php?det=4459
    To install the utility, doubleclick the msicuu2.exe file you downloaded.
    Now run the utility ("Start > All Programs > Windows Install Clean Up"). In the list of programs that appears in CleanUp, select any iTunes entries and click "Remove", as per the following screenshot:
    Quit out of CleanUp, restart the PC and try another iTunes install. Does it go through properly this time?

  • Search for  a big varchar2 field that contains specific string

    Hi to all,
    I've created a table with VARCHAR2 column and size of 4000 and a CONTEXT index for it. I use this SQL statement to search for a field that contains a specific word:
    SELECT text_body
    FROM my_table
    WHERE CONTAINS(text_body,'my_word')>0;
    this goes so well in SQL plus, so how can I implement this in my form?
    Thanks.

    Dear Craig,
    I installed forms 10g R2 ,besides I corrected a fault in the LOOP syntax.Thanks, The code now is correct with the function CONTAINS. but when I run my form and push the button, my form takes lots of time and return two errors:
    frm-41839 "Disc I/O error on temporary record buffer file%s".
    and frm-40900 "Unable to locate record buffer. Clear form to continue".
    the second error occurs due to memory low space I think.
    Dear Morgan,
    You are totally right with the function INSTR, but I use the function CONTAINS as it has large capabilities in my search. I even use CTXCAT index instead of CONTEXT index ,with function CATSEARCH but the problem still exists. All of the previous ways run better in SQL but not in forms(without cursor). Suppose I'm wrong with this technique. Is there another way to make such a search?!
    This is the new code:
    DECLARE
         CURSOR cc IS
    SELECT *
    FROM my_table
    WHERE CONTAINS(MY_TEXT_FIELD,'first_word AND second_word')>0;
    copy_cc my_table%rowtype;
    BEGIN
         OPEN cc;
         FETCH cc INTO copy_cc;
              LOOP
              :FORM_TEXT_FIELD:=copy_cc.my_text_field;
         EXIT WHEN cc%notfound;
              NEXT_RECORD;
              END LOOP;
              CLOSE cc;
    END;
    Regards.
    Waleed.

  • Creating exe for application that contains ARINC and MIL Codes

    Hi all,
    I am not able to create exe for my application that contains ARINC and MIL. To be precise, the ARINC and MIL part is not working in the exe created. 
    Please tell me how to create an EXE with ARINC and MIL codes.

    Did you install the according device drivers on the target machine? And no I don't mean the instrument drivers that you use in LabVIEW but the OS device drivers from NI (resp. AIT), that will access the hardware boards and provide an interface to the LabVIEW application. I would expect them to be part of the AIT SDK kit that comes with the boards.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Zooming a Jpanel that contains Jbutton

    My question is how to zoom a jpanel that contains several jbutton... I am not sure what method to use.... when using a Graphics2D object there seem to be only methods as g.drawString(...)
    g.drawRectangle(..) etc... I am kind of familiar with
    AffineTransform, scaling matrix, etc but not how to zoom a jpanel with jcomponent...
    I hope some one out there understand what i am trying to do...please could you give me any idea
    thanx

    Hello.
    The solution could be the following:
    1. Create interface ZoomPane with the following methods:
    boolean isZoomMode
    float getZoomFactor
    2. ZoomPane interface must be implemented by some JComponent (JPanel will fit, assume it's called JZoomPanel)
    3. the paint method's body of the JZoomPanel should looks like:
    Graphics2D g2 = (Graphics2D)g;
    if(isZoomMode()){
    float zoomFactor = getZoomFactor();
    g2.scale(zoomFactor, zoomFactor);
    super.paint(g);
    4. Use updated RepaintManager.
    This solution solve all painting problem. The mouse event transformation problem can be solved as described above (by means of the glass pane).

  • On file open: "This document contains JavaScript code for a widget that no longer exists."

    I had an existing, functional datepicker in a web page.
    Recently I downloaded the UI Datepicker in the Widget Browser and installed it in DW CS5. Now every time I load the file that calls the datepicker that I added myself, a warning opens with the following text:
    This document contains JavaScript code for a widget that no longer exists. If you don't remove the code, the browser might display JavaScript errors when loading the page. Would you like Dreamweaver to find all instances of this code for you?
    Widget: $("#reservDateBegin").datepicker();
    Widget: $("#reservDateEnd").datepicker();
    Clicking "Yes" opens the file and shows the search box at the bottom of the window with [current document] in File and $("#reservDateEnd").datepicker(); in Matched Text. Clicking "No" just opens the file.
    The error is wrong, since installing the widget is what caused the error in the first place!
    How can I get DW to stop showing this message?
    Thanks for any help.

    I do understand you're trying to be helpful. I was just hoping providing the relevant code snippets would be sufficient so I didn't have to take the time to provide a "cleaned" version of the files and upload those to a public-safe location.
    Zabeth69 wrote: If you don't understand what 'code at the bottom of the page' means, you have not used one of those systems. I don't know what causes the error code to come up (besides removing a Spry widget, I mean). So if it doesn't apply to you, ignore it.
    This is exactly my point: I haven't used any of the DW "systems". I've always manually coded in DW, so I can't have removed a Spry widget in the first place. It wasn't until I installed the Widget using the Widget Browser that I started getting the error (I don't mean adding the datepicker widget to the code using the DW Insert menu - I mean installing the Widget into DW itself). Ignoring such an erroneous/incorrect error seems kind of silly, since every time I open the file I get the error message.
    Anyway, as requested, the following are links to the contactUsCleaned.php page, and the php included headerCleaned.php file. Since these use php includes to complete the rendered HTML, they won't look right in the browser, but as you know viewing the source will show the relevant html, javascript, and jquery code. I didn't see any way to upload the files in this forum, which, due to the php code, would be preferable to see exactly what my code looks like...
    http://www.eventidewebdesign.com/public/contactUsCleaned.php
    http://www.eventidewebdesign.com/public/headerCleaned.php
    The footer.php file the contactUs page includes is simply a set of HTML links to the pages on the site, copyright info, and the Google Analytics script. There is no other code in the footer.php file.

  • Apply conditional formatting for a textbox in a matrix that contains an expression

    I have a matrix that contains one row, and one of the columns in this row (a field ) contains an expression. I know this field is "Textbox24" but anyway, I have created a placeholder for this field and in Placeholder Properties I have given the
    label "PD". Note that the Value in this placeholder shows "Expr" because it contains an expression.
    I don't think this is relevant, but just in case, the expression is:
    =Code.GetPercentageDifferenceBetweenCurrentAndPreviousValue()
    where GetPercentageDifferenceBetweenCurrentAndPreviousValue is custom code for the report which returns a decimal value. This works correctly in Preview mode.
    I now want to apply conditional formatting on this field so the colour of the font changes depending on the value of the expression. I clicked on the text box of that field, and in Properties > Color > Expression > I entered
    =IIF(Fields!PD.Value >= 50,"Green","Black")
    When I go to Preview mode I get the error "The Color expression for the text box 'Textbox24' refers to the field 'PD'. Report item expression can only refer to fields within the current dataset scope or, if inside an aggregate, the specified
    data set."
    I have tried a couple of other forms of the sytax for Fields!PD.Value but it doesn't work. Is my problem a syntax problem or a scope problem, and how do I solve it?
    Thank you

    From your description, PD is not a field so you cannot reference it as a field. You can do what you want by referring to the textbox:
    =IIf(ReportItems!Textbox24.Value >= 50."Green","Black")
    "You will find a fortune, though it will not be the one you seek." -
    Blind Seer, O Brother Where Art Thou
    Please Mark posts as answers or helpful so that others may find the fortune they seek.

  • Is there any object in labview that contains a list of data for the user to select (selection one at a time) or add a new data?

    Is there any object in labview that contains a list of data for the user to select (selection one at a time) or add a new data?

    List and table controls -> listbox..is that what you are thinking of?
    The listbox presents the user with a list of options, and you can set it to only accept one selection at a time...Adding new data to the list can not be done directly by the user but if you make e.g. a text control and a button you can programatically insert new objects described in the text box when the button is pressed...(see example).
    If you need more than one column you have the multicolumn listbox. If you want the users to write new entries directly yu can use a table and read selected cells using it's selection start property to read what cell has been selected.
    MTO
    Attachments:
    Listbox_example.vi ‏34 KB

  • What are the T-codes that contain the master data for material and vendor?

    what are the T-codes that contain the master data for material and vendor?

    hi ,
    - Display Material  tcodes...
    MM01 - Create Material
    MM02 - Change Material
    MM03 - Display Material
    MM50 - List Extendable Materials
    MMBE - Stock Overview
    MMI1 - Create Operating Supplies
    MMN1 - Create Non-Stock Material
    MMS1 - Create Service
    MMU1 - Create Non-Valuated Material
    ME51N - Create Purchase Requisition
    ME52N - Change Purchase Requisition
    ME53N - Display Purchase Requisition
    ME5A - Purchase Requisitions: List Display
    ME5J - Purchase Requisitions for Project
    ME5K - Requisitions by Account Assignment
    MELB - Purch. Transactions by Tracking No.
    ME56 - Assign Source to Purch. Requisition
    ME57 - Assign and Process Requisitions
    ME58 - Ordering: Assigned Requisitions
    ME59 - Automatic Generation of POs
    ME54 - Release Purchase Requisition
    ME55 - Collective Release of Purchase Reqs.
    ME5F - Release Reminder: Purch. Requisition
    MB21 - Create Reservation
    MB22 - Change Reservation
    MB23 - Display Reservation
    MB24 - Reservations by Material
    MB25 - Reservations by Account Assignment
    MB1C - Other Goods Receipts
    MB90 - Output Processing for Mat. Documents
    MB21 - Create Reservation
    MB22 - Change Reservation
    MB23 - Display Reservation
    MB24 - Reservations by Material
    MB25 - Reservations by Account Assignment
    MBRL - Return Delivery per Mat. Document
    MB1C - Other Goods Receipts
    MB90 - Output Processing for Mat. Documents
    MB1B - Transfer Posting
    MIBC - ABC Analysis for Cycle Counting
    MI01 - Create Physical Inventory Document
    MI02 - Change Physical Inventory Document
    MI03 - Display Physical Inventory Document
    MI31 - Batch Input: Create Phys. Inv. Doc.
    MI32 - Batch Input: Block Material
    MI33 - Batch Input: Freeze Book Inv.Balance
    MICN - Btch Inpt:Ph.Inv.Docs.for Cycle Ctng
    MIK1 - Batch Input: Ph.Inv.Doc.Vendor Cons.
    MIQ1 - Batch Input: PhInvDoc. Project Stock
    MI01 - Create Physical Inventory Document
    MI02 - Change Physical Inventory Document
    MI03 - Display Physical Inventory Document
    MI31 - Batch Input: Create Phys. Inv. Doc.
    MI32 - Batch Input: Block Material
    MI33 - Batch Input: Freeze Book Inv.Balance
    MICN - Btch Inpt:Ph.Inv.Docs.for Cycle Ctng
    MIK1 - Batch Input: Ph.Inv.Doc.Vendor Cons.
    MIQ1 - Batch Input: PhInvDoc. Project Stock
    MI01 - Create Physical Inventory Document
    MI02 - Change Physical Inventory Document
    MI03 - Display Physical Inventory Document
    MI31 - Batch Input: Create Phys. Inv. Doc.
    MI32 - Batch Input: Block Material
    MI33 - Batch Input: Freeze Book Inv.Balance
    MICN - Btch Inpt:Ph.Inv.Docs.for Cycle Ctng
    MIK1 - Batch Input: Ph.Inv.Doc.Vendor Cons.
    MIQ1 - Batch Input: PhInvDoc. Project Stock
    MI21 - Print physical inventory document
    MI04 - Enter Inventory Count with Document
    MI05 - Change Inventory Count
    MI06 - Display Inventory Count
    MI09 - Enter Inventory Count w/o Document
    MI34 - Batch Input: Enter Count
    MI35 - Batch Input: Post Zero Stock Balance
    MI38 - Batch Input: Count and Differences
    MI39 - Batch Input: Document and Count
    MI40 - Batch Input: Doc., Count and Diff.
    MI08 - Create List of Differences with Doc.
    MI10 - Create List of Differences w/o Doc.
    MI20 - Print List of Differences
    MI11 - Physical Inventory Document Recount
    MI07 - Process List of Differences
    MI37 - Batch Input: Post Differences
    for vendor..
    XKN1  Display Number Ranges (Vendor)
    XK01  Create vendor (centrally)
    XK02  Change vendor (centrally)
    XK03  Display vendor (centrally)
    XK04  Vendor Changes (Centrally)
    XK05  Block Vendor (Centrally)
    XK06 Mark vendor for deletion (centrally
    XK07  Change vendor account group
    XK11  Create Condition
    XK12  Change Condition
    XK13  Display Condition
    XK14  Create with cond. ref. (cond. list)
    XK15  Create Conditions (background job)
    reward points if useful,
    venkat.

  • The hard drive on my laptop that contained Elements just died.  Can I get a second copy for installation on my new PC?

    The hard drive on my laptop that contained Elements just died.  Can I get a second copy for installation on my new PC?

    The iPhone is not a backup device.
    Restore the iTunes library from the backup that should be kept of your media and other important files.
    Syncing the iPhone to a new library (in this case, it will be a new library unless you have a complete backup of the iTunes folder pre-crash) will result in the media on the device being removed and replaced with content from the new library.
    As for iOS5, we really do not know until Apple officially releases it.

  • I have created a form that contains fields with default text for a user to update/personalize.  Is there a way to style the text so I can quickly identify changes to default text in a field?

    I have created a form that contains fields with default text for a user to update/personalize.  Is there a way to style the text so I can quickly identify changes to default text in a field?

    George - Thanks you so much!  Actually, i'd love for the text color to be red font color.  Could you send me the script for that? And I assume I just copy and paste the script into the field properties (see screenshot)?
    thanks again!
    Seth

Maybe you are looking for

  • CP6 Powerpoint animations NOT workin in HTML5

    I have imported my powerpoint in to cp6.  I have embedded animations in the ppt file. WHen I publish to PDF or flash, the animations play nicely. When I publish to HTML5, they don't play at all. If I import without hi fidelity, then the screens are b

  • Does the iMac have the ability to view a second video input?

    Basically can a VGA input show on an iMac? I have a desktop that I'd still need for certain work related software packages. I'd rather not have a a second monitor on my desk. Thanks.

  • Is anyone else suffering dropped calls in zip code 85260?

    Dropping multiple calls daily and cell bars have decreased from 3-4 to 1-2 in the past 30 days. Cell towers must be down or Verizon is losing it. I have two iPhone 5 and an IPAD, they all have weak coverage.

  • Open specific tab in an accordion

    I have an accordion with 5 tabs. I want to open a specific tab depending on which link is clicked on the first tab. I have the following, which opens tab 2: <a href="javascript:acc1.openNextPanel();">{@atitle}</a> and I could use openLastPanel() for

  • Collecting Notifications from multiple servers and applications

    Hi, I'm researching JMX technology for our Enterprise-wide monitoring needs. I've got a good understanding of how to create jmx connections and instrument resources for monitoring in a 1-to-1 jmx client to application scenario. However, I need to man