Customizing "Disabled" color for specific components only

Hello,
when uncommenting the "UIManager.put(...)" line in the following code all combos display their text ungreyed when disabled. But how to proceed, if you want to give this feature only to specific combos? Setting the foreground colour, even when done in an own renderer, doesn't work.
There has been a discussion of the same problem in
http://forum.java.sun.com/thread.jspa?forumID=57&threadID=276411
but it always comes back to the overall solution with the UIManager.
If the solution should be to write an own ComboUI, does anybody have an example, for my own attempt badly failed.
import java.awt.*;
import javax.swing.*;
import javax.swing.plaf.*;
public class TextColor extends javax.swing.JFrame {
  public TextColor() {
    setSize(350,300);
    setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
    Container cp= getContentPane();
    cp.setLayout(null);
    JComboBox cmb1 = new JComboBox();
    cmb1.addItem("Normal");
    cmb1.setBounds(100,50,100,20);
    JComboBox cmb2 = new JComboBox();
    cmb2.addItem("Disabled");
    cmb2.setBounds(100,100,100,20);
    cmb2.setEnabled(false);
    cmb2.setForeground(Color.BLACK);
    JTextField tf = (JTextField)cmb2.getEditor().getEditorComponent();
    tf.setForeground(Color.BLACK);
    cp.add(cmb1);
    cp.add(cmb2);
    setVisible(true);
    cp.requestFocusInWindow();
  public static void main(String arg[]) {
    java.awt.EventQueue.invokeLater(new Runnable() {
      public void run() {
//     UIManager.put("ComboBox.disabledForeground", new ColorUIResource(0,0,0));
     new TextColor();
}

Thanks from me too, camickr, it's always a good feeling to learn and understand something new.
When I extended MetalComboBoxUI, the borders and the button were back to normal, but the JComboBox background remained dark. After some trial and error, this is the solution I've come up with:
MyComboBoxUI.javapackage joerg22;
import java.awt.Color;
import java.awt.Component;
import java.awt.Graphics;
import java.awt.Rectangle;
import javax.swing.JComboBox;
import javax.swing.ListCellRenderer;
import javax.swing.plaf.metal.MetalComboBoxUI;
public class MyComboBoxUI extends MetalComboBoxUI {
    public void paintCurrentValue (Graphics g,
            Rectangle bounds,boolean hasFocus) {
        super.paintCurrentValue (g, bounds, hasFocus);
        ListCellRenderer renderer = comboBox.getRenderer ();
        Component c;
        c = renderer.getListCellRendererComponent ( listBox,
                comboBox.getSelectedItem (),
                -1,
                true,
                false );
        c.setForeground (Color.BLACK);
        // Uncomment the next line for dark b/g when disabled
        //if (comboBox.isEnabled ())
            c.setBackground (comboBox.getBackground ());
        currentValuePane.paintComponent (g, c,
                comboBox, bounds.x, bounds.y,
                bounds.width, bounds.height); //, shouldValidate);
    public void paintCurrentValueBackground (Graphics g,
            Rectangle bounds,boolean hasFocus) {
        super.paintCurrentValueBackground (g, bounds, hasFocus);
        Color t = g.getColor ();
        // Uncomment the next line for dark b/g when disabled
        //if ( comboBox.isEnabled () )
            g.setColor (comboBox.getBackground ());
            g.fillRect (bounds.x + 1, bounds.y + 1,
                    bounds.width - 2, bounds.height - 2);
        g.setColor (t);
}TestUI.javapackage joerg22;
import java.awt.Container;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.WindowConstants;
public class TestUI extends javax.swing.JFrame {
    public TestUI () {
        setSize (200,150);
        setDefaultCloseOperation (WindowConstants.EXIT_ON_CLOSE);
        Container cp= getContentPane ();
        cp.setLayout (null);
        final JComboBox cmb1 = new JComboBox ();
        cmb1.addItem ("Normal");
        cmb1.setBounds (50,25,100,20);
        final JComboBox cmb2 = new JComboBox ();
        cmb2.addItem ("Custom");
        cmb2.setBounds (50,50,100,20);
        cmb2.setEnabled (false);
        cmb2.setUI (new MyComboBoxUI ());
        final JButton btn1 = new JButton ("Toggle");
        btn1.addActionListener (new ActionListener () {
            public void actionPerformed (ActionEvent e) {
                cmb1.setEnabled (!cmb1.isEnabled ());
                cmb2.setEnabled (!cmb1.isEnabled ());
        btn1.setBounds (50, 75, 100, 20);
        cp.add (cmb1);
        cp.add (cmb2);
        cp.add (btn1);
        setVisible (true);
        cp.requestFocusInWindow ();
    public static void main (String arg[]) {
        java.awt.EventQueue.invokeLater (new Runnable () {
            public void run () {
                new TestUI ();
}This can probably be improved further, but I'm outta here... shall check back later.
Darryl
Edited by: Darryl.Burke -- to remove some really stupid redundancies in the code I'd just posted.

Similar Messages

  • Disable upload for specific users only

    Hi,
    I'm wondering if anyone else has found a need or solution to my problem.
    I have a lot of users connecting to a FCS instance, many who should not be able to upload any content, just manipulate or otherwise interact with existing content. I've found that I can simply forbid access to all devices for a particular permission set, but that still allows users to "try" to upload, and is confusing. Further, it seems to hinder the duplicate functionality, which is desired in this use case.
    Any thoughts? I'm running clean out of ideas here!
    Thanks,
    - James Heliker
    [email protected]

    John explained through an email to use the "browser" group - which essentially sets a trait permission (upload = forbid) for a specific user/set of users. However, this does not seem to change anything, as far as being able to upload a file.
    I can't use the actual browser group as I have many other requirements also, but setting this trait permission on my existing groups does absolutely nothing as far as I can tell. Has anyone else dealt with this issue directly?
    Thanks!
    - James Heliker
    [email protected]

  • How to display the rows in a color for specific dynamic condition.

    Hi,
    I am new to OAF. I created a custom Search Page.My requirement is we need to display a color for specific dynamic condition. Could any one help me how to do this?
    Thanks in Advance
    Sruthi.

    Hi,
    Sruthi wrote:
    I am new to OAF. I created a custom Search Page.My requirement is we need to display a color for specific dynamic condition. Could any one help me how to do this?------I think we can display colours at coloumns level only,nt at row levevl.
    ------use CSSStyle to set the colour, via webBean.
    Co-ProcessRequest:*
    import oracle.cabo.style.CSSStyle;
    CSSStyle oraaniltext = new CSSStyle();
    oraaniltext.setProperty("color", "#F6358A");
    oraaniltext.setProperty("background-color", "#000000");
    OAMessageTextInputBean comCode = (OAMessageTextInputBean)webBean.findChildRecursive("InvoiceIdTI");
    comCode.setInlineStyle(oraaniltext);
    http://www.computerhope.com/htmcolor.htm
    Regards
    Meher Irk
    Edited by: Meher Irk on Oct 25, 2010 9:46 PM

  • Disable Print for specific situations

    I Use Adobe Pro X.
    Is there a way to make a form not print if certain information is entered?  For instance, some forms in our list are for specific clients only. If a user pulls up a form with the incorrect client, I want to add a script that disables the form from being printed or faxed. I already added script to display a warning message, but that won't prevent anyone from printing it - and then the recipient will receive the letter with the warning message - which is potentially worse than just receiving the wrong letter.
    Any assistance is greatly appreciated.
    Thanks!

    Tto detect a specific client, each system the client has would need a spacial file installed on it and the Organization filled in for the Identity object.  This will be a real challenge.
    Then once the print process is started there is no way to cancel it. You could unhide a hidden form filed and cover the content of the PDF. But then this could easily be defeated.
    So in the end, it could be done, but you most likely will not be able to implement it outside of a given organization.

  • Disable DSN for specific messages

    Hi,
    i have a problem, where i wish to disable DSN for specific internal users.
    Scenario :
    Interal User a sends a mail to special address c,
    if mail host of special address c is not available or anything else i wish that internal user a is never informed that c didnt recieve his mail.
    Can this be done ?
    i thought about doing this with sieve.. but i dont know if DSNs generated by the IMS Master itself are also checked by sieve mechanism....

    Please do notice that your bits do not support many of the features you want. And that later bits do. If you offer that to your company, perhaps you could update more often, or at least this time. We're not talking about a new package, here, but just an update to the one you have, that's not doing the job properly.
    Also, if you had asked for what you needed at the beginning, I could have helped you better.
    What you want is the sieve command, save-copy, or, perhaps monitor. Please see whitepaper, quoted below:
    Saving Messages for Document Retention
    If the reason you want to capture a copy of the message is for document retention, then you will want to take advantage of the new "capture" sieve action. You have to have iMS v5.2 or better to use this facility. The capture action can only be specified in a system or channel sieve; it is not available in user sieves. The general syntax is
    capture "monitoraddress"
    The monitor action is the same as the capture action. Users are encouraged to use the 'capture' instead of monitor as it best reflects the function being performed.
    This action sends a DSN containing the original message in its entirety to the specified capture address. Since this is a DSN it is effectively a completely separate message so there's little chance of it causing side effects that will alert anyone to the monitoring. In particular, no addresses from the original message appear in the DSN header so there's very little chance of the capture copy getting forwarded to the wrong person by mistake. And even though the original message is encapsulated, it is a MIME encapsulation which means the content is easily accessible in any MIME-compliant user agent.
    The capture action is nonstandard and undocumented. It was originally intended to be part of the habanero release, but the backporting of direct LDAP support to 5.2 means it is available in 5.2 as well. We certainly intend to support it in the future.
    Saving Messages for Replay
    There is an undocumented functionality in iMS for making a copy of messages for archival purposes. It's intended for saving sent messages in the event that they need to be replayed. We did this for folks who send mail via bad links to places where the mail may be received OK by an intermediate host but then subsequently lost on its way to the final destination.
    This is done with the MESSAGE-SAVE-COPY mapping table. Entries in that table have the form
    MESSAGE-SAVE-COPY
    out-channel|from-address|D|msg-filename result
    where
    out-channel -- name of the channel the message is flowing out
    from-address -- originator's address (envelope From: address)
    D -- the letter "D" (stands for "dequeue" )
    msg-filename -- name of the message file being dequeued.
    result -- where to rename the file
    Outbound Traffic
    To save only messages out to the Internet, do
    MESSAGE-SAVE-COPY
    tcp_local|*|D|/instance-root/queue/tcp_local/*/* (tab-or-space)$Y/msg_save/$1/$2
    Be aware that the archive isn't made until the message is actually dequeued from iMS (i.e., sent successfully or bounced). A rename operation is done (as opposed to a copy operation). As such, the message file has to remain on the same disk that the IMTA_QUEUE lives on.
    Inbound Traffic
    To capture inbound mail will want to have good control of what machines/pathways a message will take on its way into your systems. If your setup is such that mail always enters the site via an INBOUND relay and leaves the site via know outbound gateways, then inbound message flow is from INBOUND-MTA --> MsgStore machine.
    Since you can have multiple MsgStore machines behind any one INBOUND-MTA, you will want to make configuration on the INBOUND-MTA machine such that it will use a dedicated queue to talk to the MsgStore machines. For instance, on the INBOUND-MTA machine, you could setup a rewrite rule in your imta.cnf file for MsgStore-A, MsgStore-B, ... MsgStore-Z like:
    Node-A.store.domain.com.au $U%$D@tcp_to_store-daemon
    Node-Z.store.domain.com.au $U%$D@tcp_to_store-daemon
    and a corresponding 'tcp_to_store' channel which looks like:
    ! tcp_to_store
    tcp_to_store smtp mx single_sys subdirs 20 noreverse maxjobs 7 \
    pool SMTP_POOL maytlsserver allowswitchchannel \
    saslswitchchannel tcp_auth
    tcp_to_store-daemon
    This has the effect of routing all mail to any of your MsgStore machines through tcp_to_store channel. Transactions to other machines in your setup will take the tcp_intranet channel.
    With this in place you can then throw in a MSG-SAVE-COPY mapping table which reads:
    MESSAGE-SAVE-COPY
    *|*|D|/instance-root/imta/queue/tcp_to_store/*/* $Y/msg_save/tcp_to_store/$2/$3
    the net effect will be a number of queue files in the /msg_save/tcp_to_store directory which are ready for replay. Note the $2 in the sample represents the subdir that the message was already in. As such if you have 'subdirs 20' on your tcp_to_store channel, you will want to precreate the /msg_save/tcp_to_save/000 thru 019 subdirectories with the appropriate ownership and permissions.
    To initiate the replay, you want to simply move the /msg_save/tcp_to_store/### directories to the /instance-root/imta/queue/reprocess and issue the command 'imsimta cache -synch'. The MTA will start pushing out those messages to the store(s).
    If you want to have multiple replays happening you can kick off parallel runs of the reprocess channel by doing 'imsimta run reprocess &' a number of times.
    And, If you want to segregate the storage for each MsgStore machine, you can make new channel in addition to the one suggested 'tcp_to_store' channel. You would then have groups of rewrite rules directing traffic over those channels or you could have one rewrite rule per channel block that you setup. That way you can have distinct entries in your MSG-SAVE-COPY mapping table.
    Finally, since there is a rename operation taking place when you use the MSG-SAVE-COPY mapping table, you will want to make sure that at the first pass that /msg_save is on the same device that your queues live on.
    Short Term Arvchival
    You could setup a process in cron to move those files to a new device on a periodic basis. Better yet, schedule this via the job_controller. For instance, these lines at the top of your job_controller.cnf file:
    [PERIODIC_JOB=archive_mover]
    command=/usr/iplanet/sitescripts/arc_mover.sh
    time=/00:10
    will run the arc_mover.sh script for you every 10 minutes. Your arc_mover.sh could look something like:
    #!/bin/ksh
    # ***Script is untested - should generate some ideas though****
    DUMMY=`test -d /var/tmp/timestamp.dir || mkdir -p /var/tmp/timestamp.dir`
    cd /msg_save
    # First pass
    for dir in `find ./ -type d`
    do
    DUMMY=`test -d /real/storage/area/$dir || mkdir -p /real/storage/area/$dir`
    cd $dir
    for msgfile in `find ./ -type f -newer /var/tmp/timestamp.dir -name "*.00"`
    do
    mv $msgfile /real/storage/area/$dir/
    done
    cd /msg_save
    done
    touch /var/tmp/timestamp.dir
    # Second pass cause we do not know how long we took.
    for dir in `find ./ -type d`
    do
    DUMMY=`test -d /real/storage/area/$dir || mkdir -p /real/storage/area/$dir`
    cd $dir
    for msgfile in `find ./ -type f -newer /var/tmp/timestamp.dir -name "00"`
    do
    mv $msgfile /real/storage/area/$dir/
    done
    cd /msg_save
    done
    exit

  • Disable Statistics for specific Tables

    Is it possible to disable statistics for specific tables???

    If you want to stop gathering statistics for certain tables, you would simply not call DBMS_STATS.GATHER_TABLE_STATS on those particular tables (I'm assuming that is how you are gathering statistics at the moment). The old statistics will remain around for the CBO, but they won't be updated. Is that really what you want?
    If you are currently using GATHER_SCHEMA_STATS to gather statistics, you would have to convert to calling GATHER_TABLE_STATS on each table. You'll probably want to have a table set up that lists what tables to exclude and use that in the procedure that calls GATHER_TABLE_STATS.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • How to define specific color for specific data in WebI?

    Hi everybody,
    I wonder how I could connect data shown in e.g. a vertical stacked bar chart to a specific color. The assignment of color in a chart is done by Webi automatically after pulling a a variable to a chart. Later on it is possible to change to color via the color palette. But how can I define a specific color for specific values of an attribute? (E.g. calue is Chicago -> color is blue; value is NY -> color is red.. etc ) Is it possible?
    Does anybody know the trick?
    Thanks in advance!

    Please refer the below links along similar lines .
    [http://www.dagira.com/2007/07/22/alerters-on-charts/]
    [http://www.dagira.com/2007/07/31/alerters-on-charts-part-ii/]
    Regards,
    Bilahari M

  • Disable sound for specific users

    How do I disable sound for specific users?

    Theoretically if the user's not in the audio group, he shouldn't have access to sound devices.
    $ ll /dev/snd/
    total 0
    drwxr-xr-x 2 root root 80 Oct 2 19:30 by-path
    crw-rw----+ 1 root audio 116, 2 Oct 2 19:30 controlC0
    crw-rw----+ 1 root audio 116, 8 Oct 2 19:30 controlC1
    crw-rw----+ 1 root audio 116, 7 Oct 2 19:30 hwC0D0
    crw-rw----+ 1 root audio 116, 13 Oct 2 19:30 hwC1D0
    crw-rw----+ 1 root audio 116, 14 Oct 2 19:30 hwC1D1
    crw-rw----+ 1 root audio 116, 15 Oct 2 19:30 hwC1D2
    crw-rw----+ 1 root audio 116, 16 Oct 2 19:30 hwC1D3
    crw-rw----+ 1 root audio 116, 4 Oct 4 09:12 pcmC0D0c
    crw-rw----+ 1 root audio 116, 3 Oct 4 10:13 pcmC0D0p
    crw-rw----+ 1 root audio 116, 5 Oct 2 19:30 pcmC0D1p
    crw-rw----+ 1 root audio 116, 6 Oct 2 19:30 pcmC0D2c
    crw-rw----+ 1 root audio 116, 9 Oct 2 19:30 pcmC1D3p
    crw-rw----+ 1 root audio 116, 10 Oct 2 19:30 pcmC1D7p
    crw-rw----+ 1 root audio 116, 11 Oct 2 19:30 pcmC1D8p
    crw-rw----+ 1 root audio 116, 12 Oct 2 19:30 pcmC1D9p
    crw-rw----+ 1 root audio 116, 1 Oct 2 19:30 seq
    crw-rw----+ 1 root audio 116, 33 Oct 2 19:30 timer

  • Customer Name Range for Specifications of Evaluation Class

    Dear Friends,
    Is there any SAP recommended Customer Name Range for Specifications of Evaluation Class ....
    As suggested by SAP to check in the Customer name range table  V_T52DN....there is nothing mentioned about the customer name range for table V_T52D4.
    That means we can give use any naming conventions , make the necessary changes and document it
    I am concerned about ...whether it can give any issue while upgrade or any further development by SAP
    Would appreciate your valuable inputs and suggestions regarding the same
    Thanks & Regards
    Srijit R Menon

    Hi Vk.
    Thanks for the reply
    Yes the SAP has mentioned  that
    The evaluation classes that are provided with the standard system are
    stored in the SAP name range from 01 to 17. Evaluation classes 18 to 20
    are available for customer entries.
    But i am concerned about Specifications for Evaluation Class ....for which SAP has not suggested any Customer name range

  • Can I disable adblock for specific web pages?

    I would like to disable adblock for two websites, can this be done, or is the only option to have it enabled or disabled for all web pages? If I can disable it for two websites, how do I do it?

    Yes, you can tell disable adblock on sites you choose. Go to each
    web site one at a time. After the page has loaded, go to
    the adblock icon and right click on it. One of the options
    is to disable adblock on that site. Be very careful as there
    is also an option to disable on '''''ALL SITES'''''.

  • Disable swapping for specific process?

    Hi!
    Is there some way to disable swapping for a specific process? I wanted to disable it for my web servers, so their responsivness would be better.
    Cheers!

    Theoretically if the user's not in the audio group, he shouldn't have access to sound devices.
    $ ll /dev/snd/
    total 0
    drwxr-xr-x 2 root root 80 Oct 2 19:30 by-path
    crw-rw----+ 1 root audio 116, 2 Oct 2 19:30 controlC0
    crw-rw----+ 1 root audio 116, 8 Oct 2 19:30 controlC1
    crw-rw----+ 1 root audio 116, 7 Oct 2 19:30 hwC0D0
    crw-rw----+ 1 root audio 116, 13 Oct 2 19:30 hwC1D0
    crw-rw----+ 1 root audio 116, 14 Oct 2 19:30 hwC1D1
    crw-rw----+ 1 root audio 116, 15 Oct 2 19:30 hwC1D2
    crw-rw----+ 1 root audio 116, 16 Oct 2 19:30 hwC1D3
    crw-rw----+ 1 root audio 116, 4 Oct 4 09:12 pcmC0D0c
    crw-rw----+ 1 root audio 116, 3 Oct 4 10:13 pcmC0D0p
    crw-rw----+ 1 root audio 116, 5 Oct 2 19:30 pcmC0D1p
    crw-rw----+ 1 root audio 116, 6 Oct 2 19:30 pcmC0D2c
    crw-rw----+ 1 root audio 116, 9 Oct 2 19:30 pcmC1D3p
    crw-rw----+ 1 root audio 116, 10 Oct 2 19:30 pcmC1D7p
    crw-rw----+ 1 root audio 116, 11 Oct 2 19:30 pcmC1D8p
    crw-rw----+ 1 root audio 116, 12 Oct 2 19:30 pcmC1D9p
    crw-rw----+ 1 root audio 116, 1 Oct 2 19:30 seq
    crw-rw----+ 1 root audio 116, 33 Oct 2 19:30 timer

  • Changing commandLink color for perticular user only

    Hi,
    I want to change color of commandLink , in perticular user session for that user only , if user has cliked on that link.
    say, I have two users A and B.
    My commandLink default color is Blue.
    Both users are accessing the application.
    And User A has cliked the commandLink, then his commandLink color should change to Red from Blue.
    While user B should see his commandLink[b] color as Blue(as he not yet clicked the commandLink)
    Can anybody tell me how to do this ?
    Thanks
    Sandip

    You can use EL in the styleClass attribute.
    Basic example with a boolean value:<h:commandLink styleClass="#{myBean.booleanValue ? 'someClass' : 'anotherClass'}" />The logic behind can just be written in MyBean#isBooleanValue(). The applicationMap might be useful to get/set values in.

  • Why with the last update does the stupid GAMES CENTER always pop up when I want to open a locally stored game?  It is really annoying. I click on 'disable' and it just 'disables' it for that session only.

    Why is the stupid GAME CENTER a popup every single time I try to access a locally stored (and paid for) game application?  It is really annoying! I click on 'disable' and it only disables it for that session. When I come back a while later, the stupid GAME CENTER pops up again....
    this just started with the upgrade to iOS6...

    I share your frustration. Maybe there are more people that really hate what game center has become. Here's my problem: Ok, so when I open the Game Center app it asks me for my password to log in. But when (while "signed out" of Game Center) I open an app (game app) it automatically signs me in without me even putting in a password. So, if I go directly to the Game Center app, I have to use my password to sign in. If I open a game app, I don't need to use my password...I'm signed in without any verification. I now can close the game app, open the Game Center app and BAM!!! I'm signed in, password free. I have searched for a solution to this nonsense of two days. I have tried changing my Game Center ID four times and every time it says, "Welcome back '&amp;&amp;@&amp;!'!" Apple has every freaking app of theirs listed in the support communities but the Game Center app. Why? I am an adult that likes to relax and spend 30 minutes or so playing a game. I could give two flying $&amp;@&amp;s what I the other guy or a 4 year old did yesterday. I want a solution to delete completely or disable this tracking crapware. And the whole signing me in without me giving a password smells really fishy. I bet we will see a lawsuit really soon even if this is fixed. Definitely a security issue at the minimum. 

  • IN OBIEE, how to disable drilldown for specific users

    How to disable drilldown action in a hierarchy as manager,lead,reporter.
    in this scenario i need to disable hierarchy for the specified reporter and the upper two peoples will have that functionality
    Awaiting ur reply
    Bala

    The RPD hierarchies themselves have no security attributes on them. So your left with a workaround or two. First one that springs to mind :
    Create the report in question save this as 'Manager' report.
    Create the report in question, disable drilling on the column in question, save this as 'Reporter' report.
    Deploy both reports to the dashboard in seperate sections and use the section permissions (against the Webgroups those users exist in) to determine which section is displayed to which user.
    Maybe more options will come up from other users, but this one is a start.
    Hope this helps,
    Alastair

  • Show N/A for for particular combination and show value for specific combination only

    I have following cube Structure:
    Measure
         Value
    DimTime
        Fiscal Month
    DimTable
       Table Name
       Row Name
       Column Name
    DimGeography
       GeographyLevelName
       GeographyName
    Questions:
    1) I want to show N/A when only measure value is selected
    2) I want to show N/A when I slice measure value w.r.t to GeographyLevelName, GeographyName, FiscalMonth, TableName, Row Name
    3) I want to show measure value for this combination only FiscalMonth, GeographyLevelName, GeographyName, FiscalMonth, TableName, Row Name, Column Name and Value (measure)
    Option tried:
    I used Scope to achieve this but not able to do for all scenarios:
    SCOPE(Measure.[Value]);
         SCOPE(Root());
               SCOPE(Measure.[Value], DimTime.[Fiscal Month].MEMBERS, DimTable.[Table Name].MEMBERS,
                      DimTable.[Row Name].MEMBERS, DimTable.[Column Name].MEMBERS,
                      DimGeography.[GeographyLevelName].MEMBERS,   
                      DimGeography.[GeographyName].MEMBERS);
                      THIS = 'N/A';
            END SCOPE;
         END SCOPE;
    END SCOPE;
    Any suggestion is appreciated :) :D

    SCOPE(
              [Measures].[Metric Value]
            , [Dim Time].[Fiscal Month Name].MEMBERS        
            , [Dim Geography].[Geography Name].MEMBERS
            , [Dim Metric].[Row Name].MEMBERS
            , [Dim Metric].[Column Name].MEMBERS
        THIS = IIF (
                    [Dim Metric].[Row Name].CurrentMember 
    IS [Dim Metric].[Row Name].[All]
    OR [Dim Metric].[Column Name].CurrentMember 
    IS [Dim Metric].[Column Name].[All]
    OR [Dim Time].[Fiscal Month Name].CurrentMember 
    IS [Dim Time].[Fiscal Month Name].[All]
    OR [Dim Geography].[Geography Name].CurrentMember 
    IS [Dim Geography].[Geography Name].[All] 
            , "Error: Check the Dimension selected"  
            , IIF (
                          //Enter your combination                        
    [Dim Metric].[Row Name].CurrentMember IS 
    [Dim Metric].[Row Name].&[MPS]  
    AND  [Dim Metric].[Column Name].CurrentMember 
    IS [Dim Metric].[Column Name].&[YoYASP]
    OR 
                     [Dim Metric].[Row Name].CurrentMember 
    IS [Dim Metric].[Row Name].&[ASP] 
                     AND  [Dim Metric].[Column Name].CurrentMember 
    IS [Dim Metric].[Column Name].&[% PTR]
                  , "N/A"
                  , IIF (
                            ISEMPTY([Measures].[Metric Value])
                           , "No Data"
                           ,[Measures].[Metric Value] 
    END SCOPE;

Maybe you are looking for

  • JDBC Sender Adapter Error

    HI Friends, I have configured the JDBC Sender Adapter with parameters as Driver : oracle.jdbc.driver.OracleDriver Connection : jdbc:oracle:thin:system:netweaver:@172.25.4.221:1521 But Iam getting an error in Componenet Monitoring: <b>History: - 2006-

  • HANA, Aggregations and calculating percentages

    I have a table containing user-role assignments, e.g. the table contains tuples of the form (userA, roleA), (userA, roleB). Now, I would like to get an overview on how the distribution of users across roles. I would like to get the following overview

  • Inserting images into TitleWindows

    Hi all, I'm doing a proof of concept here and trying to illustrate a point but I'm having a little difficulty as its beyond my Flex skills at the moment. That or I can't see the wood from the trees. If you go to http://www.tookiebunten.com/takethestr

  • My devices no longer give me an option to use AppleTv

    I recently purchased an Apple IPAD and An AppleTV transmitter.  Once Installed my Ipod touch and IPAD worked with the AppleTv, but 1 or 2 trys and now neither work or even give me an Icon to chooose the AppleTv device. What can I do?

  • My phone X6 Cannot update software

    I live in Thailand.  My phone is X6, software version is 20.0.005. I checked from Nokia website  last version is 32.0.002.  But I cannot update new version.  I Updated by phone or by Nokia Ovi Suite with correct step.  I could see the other software