Replace Label Text

Hello,
I have a label in my report called txtSortDescription and I would like to replace it with another Text when a field is equal to 1
So this is what I mean:
If {field.status} =1 then
txtSortDescription="Incoming Serial numbers"
ElseIf {field.status} = 2 then
txtSortDescription = "New Serial numbers made"
How  would I do this and where would I put this in my report?  I have this txtSortDescription in my detail of my report.
Thank you,
Gerald

Hi Gerald,
Create a formula using your code -- go in Report Explorer--Formulas--new
If {field.status} =1 then
"Incoming Serial numbers"
ElseIf {field.status} = 2 then
"New Serial numbers made"
Else
"txtSortDescription"
Now drag and drop this formula in your detail section.
Thanks,
Sastry

Similar Messages

  • How Can I replace newScale Text Strings with Custom Values?

    How Can I replace newScale Text Strings with Custom Values?
    How can I replace newScale text strings with custom values?
    All  newScale text is customizable. Follow the procedure below to change the  value of any text string that appears in RequestCenter online pages.
    Procedure
    1. Find out the String ID of the text string you would like to overwrite by turning on the String ID display:
    a) Navigate to the RequestCenter.ear/config directory.
    b) Open the newscale.properties file and add the following name-value pair at the end of the file:res.format=2
    c) Save the file.
    d) Repeat steps b and c for the RmiConfig.prop and RequestCenter.prop files.
    e) Stop and restart the RequestCenter service.
    f) Log  in to RequestCenter and browse to the page that has the text you want  to overwrite. In front of the text you will now see the String ID.
    g) Note down the String ID's you want to change.
    2. Navigate to the directory: /RequestCenter.ear/RequestCenter.war/WEB-INF/classes/com/newscale/bfw.
    3. Create the following sub-directory: res/resources
    4. Create the following empty text files in the directory you just created:
    RequestCenter_0.properties
    RequestCenter_1.properties
    RequestCenter_2.properties
    RequestCenter_3.properties
    RequestCenter_4.properties
    RequestCenter_5.properties
    RequestCenter_6.properties
    RequestCenter_7.properties
    5. Add the custom text strings to the appropriate  RequestCenter_<Number>.properties file in the following manner  (name-value pair) StringID=YourCustomTextString
    Example: The StringID for "Available Work" in ServiceManager is 699.
    If you wanted to change "Available Work" to "General Inbox", you  would add the following line to the RequestCenter_0.properties file
         699=General Inbox
    Strings are divided into the following files, based on their numeric ID:
    Strings are divided into the following files, based on their numeric ID:
    String ID  File Name
    0 to 999 -> RequestCenter_0.properties
    1000 to 1999 -> RequestCenter_1.properties
    2000 to 2999 -> RequestCenter_2.properties
    3000 to 3999 -> RequestCenter_3.properties
    4000 to 4999 -> RequestCenter_4.properties
    5000 to 5999 -> RequestCenter_5.properties
    6000 to 6999 -> RequestCenter_6.properties
    7000 to 7999 -> RequestCenter_7.properties
    6. Turn off the String ID display by removing (or commenting out) the line "res.format=2" from the newscale.properties, RequestCenter.prop and RmiConfig.prop files
    7. Restart RequestCenter.
    Your customized text should be displayed.

    I've recently come across this information and it was very helpful in changing some of the inline text.
    However, one place that seemed out of reach with this method was the three main buttons on an "Order" page.  Specifically the "Add & Review Order" button was confusing some of our users.
    Through the use of JavaScript we were able to modify the label of this button.  We placed JS in the footer.html file that changes the value of the butt

  • Overwrite Label Text

    Hi,
    I want to overwrite a Label Text.
    The Text I want to overwrite comes from a bound Context Node.
    Before I want to overwrite it I need the current Text, because I want to change Labels dynamically - however to get the actual Text I use Method GET_TEXT of Class CL_WD_LABEL but this Method sets some Attributes (which seems to be an error for my understanding of OO Concepts) anyway it seems not possible to overwrite the Text with Method SET_TEXT after calling GET_TEXT method (GET_TEXT will call the Bound Attribute after 1st call).
    Any ideas?
    TIA,
    Sebastian

    Hi,
    I want to change n-Lables
    And I want to do it like that: Loop at every Labels of a View and Replace every Occurance of "Oracle" with "SAP" (for example)
    But if the Label I want to change the text for is bound to a Context Element with an DDIC-Type the GET_TEXT Method (which I need for dynamic text changes) will set Parameters in the Label class which will always will get the old text (on next GET_TEXT call) never mind what text I assigned with SET_TEXT.
    But without a GET_TEXT I will not get all "Oracle" lables and so I can't replace the Texts I want to.
    Hope I could explain my Prob
    Regards,
    Sebastian

  • How can i  change the column label text in a alv table display

    how can i change the column label text in a alv table display??
    A similar kinda of question was posted previuosly where the requirement was the label text was needed and following below code was given as solution :
    <i>*  declare column, settings, header object
    DATA: lr_column TYPE REF TO cl_salv_wd_column.
    DATA: lr_column_settings TYPE REF TO if_salv_wd_column_settings.
    DATA: lr_column_header type ref to CL_SALV_WD_COLUMN_HEADER.
    get column by specifying column name.
    lr_column = lr_column_settings->get_column( 'COLUMN_NAME1' ).
    set Header Text as null
    lr_column_header = lr_column->get_header( ).
    lr_column_header->set_text( ' ' ).</i>
    My specific requirement is i have an input field on the screen and i want reflect that value as the column label for one of the column in the alv table. I have used he above code with slight modification in the MODIFYVIEW method of the view since it is a process after input. The component gets activated without any errors but while run time i get an error stating
    <i>"The following error text was processed in the system CDV : Access via 'NULL' object reference not possible."</i>
    i have checked in debugging and the error occured at the statement :
    <i>lr_column = lr_column_settings->get_column( 'CURRENT_YEAR' ).</i>Please can you provide me an alternative for my requirement or correct me if i have done it wrong.
    Thanks,
    Suri

    I found it myself how to do it. The error says that it is not able to find the reference object i.e  it is asking us to refer to the table. The following piece of code will solve this problem. Have to implement this in WDDOMODIFYVIEW method of the view. This thing works comrades enjoy...
      DATA : lr_cmp_usage TYPE REF TO if_wd_component_usage,
             lr_if_controller  TYPE REF TO iwci_salv_wd_table,
             lr_cmdl   TYPE REF TO cl_salv_wd_config_table,
             lr_col    TYPE REF TO cl_salv_wd_column.
      DATA : node_year  TYPE REF TO if_wd_context_node,
             elem_year  TYPE REF TO if_wd_context_element,
             stru_year  TYPE if_alv_layout=>element_importing,
             item_year  LIKE stru_year-i_current_year,
             lf_string    TYPE char(x),
      DATA: lr_column TYPE REF TO cl_salv_wd_column.
      DATA: lr_column_header TYPE REF TO cl_salv_wd_column_header.
      DATA: lr_column_settings TYPE REF TO if_salv_wd_column_settings.
    Get the entered value from the input field of the screen
    node_year  = wd_context->get_child_node( name = 'IMPORTING_NODE' ).
    elem_year  = node_year->get_element( ).
      elem_year->get_attribute(
       EXPORTING
        name = 'IMPORT_NODE-PARAMETER'
       IMPORTING
        value = L_IMPORT_PARAM ).
      WRITE L_IMPORT_PARAM TO lf_string.
    Get the reference of the table
      lr_cmp_usage  =  wd_this->wd_cpuse_alv( ).
      IF lr_cmp_usage->has_active_component( ) IS INITIAL.
        lr_cmp_usage->create_component( ).
      ENDIF.
      lr_if_controller  = wd_this->wd_cpifc_alv( ).
      lr_column_settings = lr_if_controller->get_model( ).
    get column by specifying column name.
      IF lr_column_settings IS BOUND.
        lr_column = lr_column_settings->get_column( 'COLUMN_NAME').
    set Header Text as null
        lr_column_header = lr_column->get_header( ).
        lr_column_header->set_text( lf_string ).
    endif.

  • How to change a labels text which created at runtime?

    hi,
    i am creating label controls in runtime dynamically and adding them to a group component. this group component is in another custom component and i have lots of custom comp. in my app.
    my question is how can access (via id) and change a labels text whict created at runtime?
    i can change like this but i am setting id's and want to reach via id.
    var lbl:mx.controls.Label = mx.controls.Label(subMenu5.group_subMenu5.getElementAt(1));
    lbl.text = "good job";
    thank you, have a good day.

    First off, if you are already using a Spark Group, I would suggest you use a Spark Label instead of an MX Label. If you want to reference the Labels from the group, loop through the group's elements and check the if the element id matches the Label you want to assign text to.
    var lbl:Label;
    var n:int = myGroup.numElements;
    for (var i:int = 0; i < n; i++)
         lbl = myGroup.getElementAt(i) as Label;
         if (lbl && lbl.id == "myLabel")
              lbl.text = "newText";

  • How to create label & text items in a page dynamicly(TOP URGENT)

    Dear all;
    did any1 tried before to create a PLSQL which can create labels or text items?!! i have a page which i want to create labels according to the count of rows in the Database table?
    Regards;

    I would first try creating an 'On Load - Before Header' PL/SQL Computation to count the rows, and store the result in a hidden page/application item, e.g. P120_ROW_COUNT.
    Then in the label of the item, put &P120_ROW_COUNT. as the Label Text.
    I haven't tested it - but it should work.

  • Replacing some text in a text file using TEXT_IO built-in package

    Hi everybody...
    I have written a form procedure in order to replace some text in a text document using the TEXT_IO built-in package. Although the text to be replaced is found , eventually the text is not replaced....
    Obviously , the new file - after the replacement - is not saved(?)..
    So , what should i do?
    The procedure is as follows...
    BEGIN
    in_file := Text_IO.Fopen(filename, 'a');
    LOOP
    Text_IO.Get_Line(in_file, linebuf);
    IF INSTR(linebuf,'C:\LIBS\')<>0
    THEN
    I:=INSTR(linebuf,'C:\LIBS\')-1;
    SUB_STR_BEFORE_VAR:=SUBSTR(linebuf,1,I);
    SUB_STR_AFTER_VAR:=SUBSTR(linebuf,I+9);
    Text_IO.PUT(in_file,SUB_STR_BEFORE_VAR||'D:/SIM/'||SUB_STR_AFTER_VAR);
    END IF;     
    END LOOP;
    EXCEPTION
    WHEN no_data_found THEN
    Text_IO.Fclose(in_file);
    END;
    WHERE :linebuf : is the variable in which the line contents are saved...
    SUB_STR_BEFORE_VAR : is the variable which keeps the substring before the first character of the search string
    SUB_STR_AFTER_VAR : is the variable which keeps the substring after the last character of the search string
    I : variable which keeps the number of character in line (variable linebuf) in which the first character of the search string is found
    Thanks , a lot
    Simon

    Hello,
    The A (Append) mode is used to add data at the end of the file. It will not replace existing data.
    Open the source file in R mode, open the target file in W mode, then rename it with the source name when finished.
    Francois

  • Replace Filename text by start/end position?

    I could do this in php, but I know nothing of applescript. The main function I need is PHP's substr_replace, to rename files in a passed array, by start/end string positions, with passed text.
    Basically I'm looking for an applescript function to add to an Automator workflow, that will replace filenames with text, by character position. The applescript function would have 4 parameters, (files:Array, startPosition:int, endPosition:int, replaceWith:String). The first is an array of the files passed by Automator's "Get Selected Files" func, then the starting and ending positions for what is to be replaced, finally followed by the string to replace with.
    So something like,
    function renameFilenamesByPosition(files, startPos, endPos, replaceWith)
    for(i=0;i<count(files);i++)
    file = files;
    oldName = basename(file);
    newName = substr_replace(oldName, replaceWith, startPos, endPos);
    rename(oldFilename, newName);
    Any help in coming up with an applescript that I can do this, and be inserted into an Automator workflow, is MUCH APPRECIATED!! I often have files with number tags, that I'd like to have removed.

    I had a substring handler that converted fairly readily, but I was looking for something more general-purpose to put into an Automator action. Using an action is good for making the interface not quite so ugly, but there is a bit more to do to make sure it is robust enough to take whatever the other actions can throw at it. I finally decided on an action that trimmed an adjustable number of characters from the beginning or end, with an option to add a text variable - something that the existing rename doesn't do.
    As for my replacement handler, the main difference is that it uses the normal AppleScript index ranges, and the index items can also be text strings. There is also a bit more code to take care of stuff like negative or swapped indexes (yours definitely doesn't like that). It does work differently than the PHP function, which is probably not what you were looking for.
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px; height: 340px;
    color: #000000;
    background-color: #FFEE80;
    overflow: auto;"
    title="this text can be pasted into the Script Editor">
    on run -- examples
    set TheText to "00012-myfile.jpeg"
    ReplaceTheText of TheText between 1 thru 6 by ""
    -- ReplaceTheText of TheText between "000" thru "-" by ""
    -- ReplaceTheText of TheText between 1 thru "-" by "xxxx"
    display dialog "\"" & the result & "\""
    end run
    to ReplaceTheText of SomeText between StartItem thru EndItem by ReplacingText
    replaces the text between the specified items with ReplacingText
    item searches are from left to right (beginning to end)
    if an item is not found, the replacement is from the beginning or end
    parameters - SomeText [text]: the text to modify
    StartItem [mixed]: the starting item or index (negative number is from the end)
    EndItem [mixed]: the ending item or index (negative number is from the end)
    ReplacingText [Text]: the replacement text
    returns [text]: the modified text, or the original text if error (index out of range, etc)
    set SomeText to SomeText as text
    set TextCount to (count SomeText)
    if class of StartItem is in {integer, real} then
    if StartItem is less than 0 then set StartItem to ((TextCount + 1) + StartItem) -- make positive index
    if (StartItem is greater than TextCount) or (StartItem is less than 1) then return SomeText -- out of range
    else
    set StartItem to offset of (StartItem as text) in SomeText
    if result is 0 then set StartItem to 1 -- the beginning
    end if
    if class of EndItem is in {integer, real} then
    if EndItem is less than 0 then set EndItem to ((TextCount + 1) + EndItem) -- make positive index
    if (EndItem is greater than TextCount) or (EndItem is less than 1) then return SomeText -- out of range
    else
    get (offset of (EndItem as text) in (text StartItem thru -1 of SomeText))
    if result is 0 then
    set EndItem to TextCount -- the end
    else
    set EndItem to StartItem + result + (count EndItem) - 2
    end if
    end if
    if StartItem is greater than EndItem then set {StartItem, EndItem} to {EndItem, StartItem} -- swap
    if StartItem is not 1 then
    set StartItem to text 1 thru (StartItem - 1) of SomeText
    else
    set StartItem to ""
    end if
    if EndItem is not TextCount then
    set EndItem to text (EndItem + 1) thru TextCount of SomeText
    else
    set EndItem to ""
    end if
    return StartItem & ReplacingText & EndItem
    end ReplaceTheText
    </pre>

  • [AS] CS3- Find any text with style, then replace that text with a new applied fill color.

    I am trying to find the simplest way in cs3 to find any text with style, then replace that text with a new fill color. I can find text and change text. I can find a style and change it to a new style. I can't seem to find a style and change the applied fill color. I do not want to change the properties of the style, just the applied color. Yes, I want the + sign, for now. I know, why not update the style, I am not allowed to. Any help would be great. Since the search is not available, I need a new response.
    Thanks.

    You can work around the bug by just doing a find, then looping through the<br />results, changing the color one at a time. It'll be a fraction slower, but<br />should do the trick:<br /><br />tell application "Adobe InDesign CS3"<br />    set find text preferences to nothing<br />    set properties of find text preferences to {applied paragraph style:"The<br />name"}<br />    set theFinds to find text document 1<br />    repeat with i from 1 to count of theFinds<br />        set properties of item i of theFinds to {fill color:"Replace color"}<br />    end repeat<br />end tell<br /><br />The bug is fixed in CS4, BTW.<br /><br />-- <br />Shane Stanley <[email protected]><br />AppleScript Pro Florida, April 2009 <a href=http://scriptingmatters.com/aspro>

  • Can't replace a text in InCopy

    I am trying to replace a text with another text in an InCopy story using:
    iTextModelCmds->ReplaceCmd
    The parameters seem to be OK, as it works with the same parameters in InDesign, but I always get NULL for ReplaceCmd (I have no problem getting the ITextModelCmds interface).
    I should be able to replace a text in InCopy. Any ideas why I can't do this? Might it be locked somehow?

    You have to use the text touchup tool (there is a new name like text edit tool in AA X) to edit such text. It sounds like you are using the typewriter tool or something like it. Text editing in Acrobat is not for the weak at heart. It can be very frustrating and is not recommended except for very minor changes. If at all possible, you should edit the original and just recreate the PDF.

  • How to change the field label text in standard WD application

    Hello All,
    I have a requirement to change the filed label text in standard WebDynpro  application.
    Application Name: /SAPSRM/WDC_UI_DO_BIDDER
    View: V_DO_BIDDER_SEARCH_C
    I want to change the label text from "Last Name" to "Vendor Name".
    Can anyone please provide me the possible options to change label text?
    Thanks in Advance.
    Regards,
    Shyam

    Thread closed...Found the solution ... 

  • Can't replace old text with new text in a text box

    Hello everyone. This is my first time posting in the forum, so I'm hoping this works out well. We recently purchased a few copies of Adobe Acrobt X for the office, and one of the users is having an issue with editing text in a field. She can type new text into a box, but when she goes back to replace that text with something else, the old text stays. New text appears on top of the old text, and you can see both. Is there a way to simply highlight the old text, delete it, and then replace it with new text? Thanks in advanace for your assistance. I understand this might be confusing, so let me know if you have questions.
    Thanks,
    Dan

    You have to use the text touchup tool (there is a new name like text edit tool in AA X) to edit such text. It sounds like you are using the typewriter tool or something like it. Text editing in Acrobat is not for the weak at heart. It can be very frustrating and is not recommended except for very minor changes. If at all possible, you should edit the original and just recreate the PDF.

  • Replace the text numbers string in a txt file using C++.. Help Me..

    Read a Document and replace the text numbers in a txt file using c++..
    For ex: 
    Before Document: 
    hai hello my daily salary is two thousand and five and your salary is five billion. my age is 
    twenty-five. 
    After Document: 
    hai hello my daily salary is # and your salary is #. my age is #. 
    All the text numbers and i put the # symbol.. 
    I am trying this code: 
    #include <iostream>
    #include <fstream>
    #include <string>
    using namespace std;
    ifstream myfile_in ("input.txt");
    ofstream myfile_out ("output.txt");
    string line;
    void find_and_replace( string &source, string find, string replace ) {
    size_t j;
    for ( ; (j = source.find( find )) != string::npos ; ) {
    source.replace( j, find.length(), replace );
    myfile_out << source <<endl;
    cout << source << endl;
    int main () {
    if (myfile_in.is_open())
    int i = 0,j;
    //string strcomma ;
    // string strspace ;
    while (! myfile_in.eof() )
    getline (myfile_in,line);
    string strcomma= "two";
    string strspace = "#";
    find_and_replace( line , strcomma , strspace );
    i++;
    myfile_in.close();
    else cout << "Unable to open file(s) ";
    system("PAUSE");
    return 0;
    Please help me.. Give me the correct code..

    Open the file as a RandomAccessFile. Check its length. Declare a byte array as big as its length and do a single read to get the file into RAM.
    Is this a simple text file (bytes)? No problem. If it's really 16-bit chars, use java.nio to first wrap the byte array as a ByteBuffer and then view the ByteBuffer as a CharBuffer.
    Then you're ready for search/replace. Do it as you would in any other language. Be sure to use System.arraycopy() to shove your bytes right (replace bigger than search) or left (replace smaller than search).
    When done, a single write() to the RandomAccessFile will put it all back. As you search/replace, keep track of size. If the final file is smaller than the original, use a setLength() to the new size to avoid extraneous data at the end.

  • Can't change the label text for the first time of  loading

    I have some problem to change the label text in the prerender method.
    I put a label on the form and set the text value to "Customer" on the text properities , and I would like to change the lable text to "Supplier" in the prerender method, I found some strange behaviour.
    If I type nothing on the label text of the properties , I can change the lable text on the prerender method on the first time of the form load .
    If I put something on the label text of the properties , the text label can't be changed on the first time of form loaded, the lable can be changed if I refresh the form or reload the form.
    Could anyone help me to solve this kinds of problem ?
    Thanks

    This is a tough one to explain. Here is one explanation from the Delving Into Components tutorial:
    As with the JavaServer Pages implementation, when the server constructs a page from JSP source, the tag attribute settings in the JSP source take precedence over runtime settings. For example, if you set the text property for a Static Text component to "moon," the IDE adds text="moon" to the Static Text component's tag in the JSP file. Even if the page's prerender method has a staticText1.setText("sun") statement, the Static Text component shows "moon" when the application renders the page. If the page is rerendered, the staticText1.setText("sun") statement takes affect and the Static Text component shows "sun." If you visit another page and come back, the server once again constructs the page from the JSP source, the values set in the JSP tag attributes take precedence, and the page displays "moon."

  • How to show mandatory icon after the Label text?

    Hi ,
    I am using JDeveloper 11.1.1.4.
    My Scenario is I have  <af:inputtext>  with Property required="true".
    Label look like ,
    "*Name but I want to show like Name* .I want to show the * icon after the label text .
    How to achieve this in ADF ? ..
    Thanks ...

    Hi rfh,
    Thanks for the updates ,
    I tried with ,
    .AFRequiredIconStyle
      float:right;
    this CSS moving the * icon to right side but not after the label ,It's moveing infront of the InputText Value the output looks like,
    Label   *Value
    I tried with ,
    AFRequiredIcon:alias
        content:inhibit;
    It's diabled * icon entire application .This solution is ok ...But I want to diable * icon for only particular places.
    How to hide * icon for particular fields ? ......
    Thanks......

Maybe you are looking for

  • Error Message- 'The application was unable to start correctly (0xc000007b).

    'The application was unable to start correctly (0xc000007b). Click OK to close the application.' I receive the error whenever turning on my laptop, and have ever since installing Lightroom4. Please help!

  • Import Procurement Process.

    Dear Gurus, Is there any error message or some setting, so that at the time of GRN system will show the message that Custom invoice not prepared. At the time of GR against Imported PO, systems prompts for Customs Invoice No & Year , if user cancelled

  • Windows 7 sees iMac but iMac can't see Win7 in Finder

    I'm a brand new convert from the PC world to the Mac world and I'm trying my darndest to get this PC off my desk. I figured I would just get rid of the monitor and use remote desktop or CORD or something to control my PC through my new iMac. However,

  • Workflow Notify  Step

    Hi , I am using the Notify  step. The problem is the mails are not sent to corresponding users I hav done the settings in mds .ini file server name =mail.xyz.com SMTP timeout=1 minute the SMTP access is set up. Can anyone suggest what else has to be

  • Message displayed each time I open a report (IE10)

    Hello, Each time I open an Analysis for OLAP, I face the message Critical rendering error. It appears since we desployed the 10th version of internet explorer. Exact version of IE is 10.0.14. Our BO platform is BO 4.1 SP2 patch 4 (very recent version