Spiting into new line after Comma(,)

Hi,
  I am trying to split line in an IR Report based on ','(Comma)
The scenario is:
I am fetching TEXT from the Column of a table, I want to split it to new line once it encounters  ','.
I tried doing this with 'CHR(10)'  but unfortunately it not working.
I am using  APEX 4.1.
DB Version: 11G.
Regards
Animesh

jrimblas wrote:
Sorry to bud in, yes that works, but you also need to change your column Display Type from "Display as Text (escape special characters)" to "Standard Report Column" otherwise the newly added <BR> tag will be stripped.
Be aware that this could be a security problem if the column contains javascript entered by the user. This may or may not be an issue in your application, but be aware of it.
If it is and issue... maybe you can change the comma to CHR(10) and wrap your column in <pre> tags.  Use this with the HTML Expression field for the column.
<pre>#COLUMN_NAME#</pre>
HTML Expressions for IRs were introduced in 4.2. In 4.1 you need to do this using a combination of SQL string replacement and CSS. Replace or suffix the commas with chr(10), and add the following style sheet to the page HTML Header:
.apexir_WORKSHEET_DATA td[headers*="COLUMN_ALIAS"] {
  white-space: pre-line;
Replacing COLUMN_ALIAS with the alias of the column in the report.
However if the data is actually stored in this column in a comma-separated format (rather than being the result of a aggregation applied across multiple rows) then this indicates a flawed data model that is not properly normalized. If this is the case then reconsider the design of this table.

Similar Messages

  • Inserting a new line after each tag of an xml

    Hi,
    I am having a requirement where i need to insert a newline after each tag<> of an xml. I am sending an xml to target system using JMS adapter and the target system has UNIX as OS.
    In unix system if we see the output xml, it will be in a single string as shown
    <?xml version="1.0" encoding="ISO-8859-1"?><messages><Field1\><Field2\>.........................</messages>
    But the desired output should be in the below format
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <messages>
    <Field1\>
    <Field2\>
    </messages>
    And there should not be any indentation for the xml. It should be in the above format it self.

    Hi,
    I believe this can be achieved through XSLT or JAVA Mapping.
    Please refer to the following link:
    XSLT Mapping:
    Inserting a new line after each tag of an xml
    JAVA Mapping:
    In Java Mapping ,all you have to do is to make a code that does a search and replace.
    Hope this helps,

  • New Line after every 900 lines in internal table

    HI,
    I have an internal table and that is sorted by company code. i.e it is grouped according to company code.
    Now i want to check in particular groups of company code if the lines of internal table is > 900 or not.
    And if it > 900 i have to insert new line.
    How to do that?

    Hi
    Please check  the code..I think it will solve ur problem
    TYPES : BEGIN OF x_data,
             name TYPE char10,
            END OF x_data.
    data: i_data  TYPE STANDARD TABLE OF x_data INITIAL SIZE 0,
          wa_data TYPE x_data,
          counter TYPE n LENGTH 2 .
    DO 5 TIMES.
    CLEAR : wa_data.
      counter = counter + 1.
    CONCATENATE 'subha' counter INTO wa_data-name.
    APPEND wa_data to  i_data.
    ENDDO.
    CLEAR : counter,
            wa_data .
    DESCRIBE TABLE i_data LINES counter.
    IF counter > 4.
      counter = 5.
      wa_data-name = 'TEST'.
    INSERT wa_data INTO i_data INDEX counter.
    ENDIF.
    CLEAR: wa_data.
    LOOP at i_data INTO wa_data .
      WRITE : / wa_data-name.
    ENDLOOP.
    Use 900 instead  4 and 901 instead of 5.

  • Add new line after Signature

    Hi,
    I have idoc to file scenarion. The first record is coming from script. The other data is coming from idoc. After signature have sholud be a new blank line. But the second row is coming near to signature.  As follows:
    <SIGNATURE=GNDPLU.GDF><VERSION=0222000> 01   1000000000000000078      000000000000000078
    02   1000000000000000078      8694016000011           1     1    
    02   1000000000000000078      8697312999973           1     1    
    02   1000000000000000078      2050000004001           1     1
    After signature should be a new line. The correct format should be as follows:
    SIGNATURE=GNDPLU.GDF><VERSION=0222000>
    01   1000000000000000078      000000000000000078
    02   1000000000000000078      8694016000011           1     1    
    02   1000000000000000078      8697312999973           1     1    
    02   1000000000000000078      2050000004001           1     1 
    what should be added in receive file content conversion for this?
    thanks for your help
    Nurhan

    Hi Nuhran,
    Why don't you add a newline parameter in your script only??
    regards
    Ramesh

  • Split Last Word into New Line

    Hello,
    Any pointers to below :-
    When entering data in column of size say 4000 the last word in the line should not be split if it cud not fit,
    if the last word does not fit then it should appear in new line and cursor should be placed at last of the word (if its last word of sentence).
    Note that multiline is set to yes and item is text item with form layout, although i have one solution but its not the best one.
    Thoughts are appreciated if there is any built in property for this or some other way?
    Forms version 10g
    Database 9i
    br
    atul

    Hello,
    This could be the starting point of an algorythme:
    SQL> set serveroutput on
    SQL>
    SQL> DECLARE
      2    LC$c    VARCHAR2(1000);
      3    v       VARCHAR2(1000);
      4    LN$MAX  PLS_INTEGER := 20 ;
      5    i       PLS_INTEGER;
      6  BEGIN
      7    LC$c := 'Here is a text to test the split of a large sentence into multiple sub fields';
      8    LOOP
      9      v := SUBSTR(LC$c, 1, LN$MAX);
    10      i := INSTR(v,' ',-1);
    11     IF i > 0 AND i < LENGTH(v) THEN
    12       v := SUBSTR(v,1,i);
    13       LC$c := SUBSTR(LC$C,i+1,1000);
    14     ELSE
    15       LC$c := SUBSTR(LC$C,LN$MAX+1,1000);
    16     END IF ;
    17     DBMS_OUTPUT.PUT_LINE('[' || v || ']');
    18     EXIT WHEN LENGTH(LC$C) = 0  OR LENGTH(LC$c) <= LN$MAX; 
    19    END LOOP;
    20    IF LENGTH(LC$c) > 0 THEN
    21      DBMS_OUTPUT.PUT_LINE('[' || LC$C || ']');
    22    END IF ;
    23  END;
    24 
    25  /
    [Here is a text to ]
    [test the split of a ]
    [large sentence into ]
    [multiple sub fields]
    Procédure PL/SQL terminée avec succès.Francois

  • Cannot update phone/add a new line after updating plan

    I updated my data plan to a shared family plan and now would like to upgrade one of the phones and also add a new phone but can't - it says 'order still pending".How long do I need to wait?

    If you are trying to do this all online, it won't happen.  The new shared plan probably won't go into effect until your next billing cycle.  And the Verizon website is notorious for only being able to do one thing at a time. To upgrade the plan, add a line, and get new phones all at once is more than it can handle.
    So, what you need to do is call Customer Service (800-922-0204) and complete the changes with a rep on the phone, or go into a store to do the transactions.  Or wait for one change to take effect, then make another - but it could take a long time doing it that way.

  • Character mode report no new line after header.

    I am using Reports 6i. I have a character mode report with a header and body. I am outputing it as a .cvs file. The problem is that there is no live feed after the header. This means when I load the .csv file into excel the first row has the headers and the first data record, after that is it OK. Eatch row in the spreadsheet has a single data record/row.
    any ideas?
    ben

    can anybody help me with this?
    i have read that font size for character mode reports can be set in prt files.
    i am using dflt.prt
    i want to change font size to eg. 8 and to print font condensed, but i was enable to find any online manual how to do this, please advise me or supply url with relevant manual for editing prt files.
    thanks and regards
    rade

  • Exporting string to csv keeping commas and new lines

    Hi there,
    I am exporting string to csv and have been removeing new lines and commas like so
    thing.toString().replace(/\n/g, '').replace(',','') ;
    how can I do this iwthout losing the line breaks and commas? I can't have them in atm because messes up the csv.

    JSON is for 'transfering' information that can be reassembled into number, string, array, object, etc. format afterwards.
    Excel can import CSV but it might not understand the complexity of the information. Tyically what you would do is serialize complex information with JSON, recieve it on the other side (wherever that might be) and then deserialize it. After you deserialize it using JSONs abilities to turn your information back into what is was (numbers, strings, arrays and object) it is up to you how you restructure the data for the format you choose.
    Your original intent of preserving CSV is best for Excel or OpenOffice Calc. You didn't mention your intent. JSON would package those (CRLF) \n's for you.

  • Insert of new lines using BDC

    I am trying to insert/default some values from custom transaction using BDC into standard SAP transaction tab as a  new line .
    it works fine when there are NO previous existing lines.
    need to know how to get index of the current line ..& add logic in BDC FM to add new line after that.
    thanks in advance

    If all of your form fields have the same name then it will
    create a comma
    delimited list, which you can loop through. I have some CF
    code to do
    exactly what you want, but not where I am at present. Send me
    an email to
    [email protected] and I will mail it to you.
    Paul Whitham
    Certified Dreamweaver MX2004 Professional
    Adobe Community Expert - Dreamweaver
    Valleybiz Internet Design
    www.valleybiz.net
    "Simonbullen" <[email protected]> wrote in
    message
    news:e3piv5$9s2$[email protected]..
    > Hi, I have a form with rows of text fields for data
    insertion, is it
    > possible
    > to insert records into my db, but creating a new row for
    each row in my
    > form...?
    > I know I can buy packages to do this, but is there a
    free extension or
    > coding
    > solution please?
    >
    > many thanks in advance, using DMx2004, SQL, CF7
    >

  • FCC For csv WITHOUT new lines

    Hello to everybody,
    I trying to do a file content conversion for the following file :
    a;b;c;d;a;b;c;d;a;b;c;d
    Problem :
    file has 4 fields meaning that there is not a nl after each line . The correct file for instance have to be
    a;b;c;d
    a;b;c;d
    a;b;c;d
    Target structure :
    line
    field a
    field b
    field c
    field d
    line
    field a
    field b
    field c
    field d
    etc...
    is this achievable ?
    just to be more clear :
    The incoming csv file has all it's lines continuoysly : no new line after each record ..
    Edited by: Laurent Fournier on Jan 20, 2011 2:13 PM

    Hi Laurent Fournier,
    As you said, if your given a flat file containing "a;b;c;d;a;b;c;d;a;b;c;d" you will replace every 4th ";" with "new line". Then you want it to be converted into XML.
    Now let's try to achieve the same using SAP PI. As Sender File FCC can not handle this situation, it should be handled in Adapter module or Mapping.
    Let's do it in simple Java Mapping (as Graphical and XSLT can not handle non XML input).
    package com.mapping;
    import java.io.*;
    import com.sap.aii.mapping.api.*;
    public class SimpleJavaMapping_PI71 extends AbstractTransformation
         public void transform(TransformationInput transformationInput, TransformationOutput transformationOutput) throws StreamTransformationException
              try
                   InputStream inputstream = transformationInput.getInputPayload().getInputStream();
                   OutputStream outputstream = transformationOutput.getOutputPayload().getOutputStream();
                   byte[] b = new byte[inputstream.available()];
                   inputstream.read(b);
                   String strContent = new String(b);
                   float fStrContent = strContent.length();
                   int iCountColon = 0;
                   StringBuilder strOutputContent = new StringBuilder();
                   for (int i = 0; i < fStrContent; i++)
                        char cTemp = strContent.charAt(i);
                        if (!";".equals(cTemp))
                             strOutputContent.append(cTemp);
                        } else
                             if (4 != iCountColon)
                                  strOutputContent.append(cTemp);
                                  iCountColon++;
                             } else
                                  strOutputContent.append(System.getProperty("line.separator"));
                                  iCountColon = 0;
                   outputstream.write(strOutputContent.toString().getBytes());
              } catch (Exception exception)
                   exception.printStackTrace();
    You can also implement this logic in adapter module in sender channel and then use FCC to convert it into XML. Or you can implement above Java Mapping, followed by another Java Mapping to convert output of above code into XML using DOM parser.
    Regards,
    Raghu_Vamsee

  • How to add a new Line in Labeltext of Ribbon button added in runtime ?

    HI , i'm adding a new buuton ribbon to an existing Tab (Edit Tab) , i use the AliasTemplate "o1" , and this is my button :
    The text "Mettre a jour la fiche a partir de la concept Note " is very long i want to add a new line after "a partir" so i will have two lines , this is what i tried but it dosent worked :
    private string btnUpdateForm = @"<Button
    Id=""Ribbon.Tab.GRP.ButtonUpdate""
    Sequence=""17""
    Image32by32=""/_layouts/images/Aidimpact.RibbonWorkflkow/export-icon.png""
    Description=""""
    Command=""Ribbon.Tab.GRP.ButtonUpdate.Click""
    LabelText=""ValValUpdateLabel1
    ValValUpdateLabel2""
    TemplateAlias=""o1""/>";
    private void AddBtnUpdate()
    // Get the current instance of the ribbon on the page.
    Microsoft.Web.CommandUI.Ribbon ribbon = SPRibbon.GetCurrent(this.Page);
    // Prepare an XmlDocument object used to load the ribbon extensions.
    XmlDocument ribbonExtensions = new XmlDocument();
    // Load the contextual tab XML and register the ribbon extension.
    int intLCID = System.Threading.Thread.CurrentThread.CurrentUICulture.LCID;
    if (intLCID == 1036)
    btnUpdateForm = btnUpdateForm.Replace("ValValUpdateLabel1", "Mettre à jour la fiche à partir");
    btnUpdateForm = btnUpdateForm.Replace("ValValUpdateLabel2", "\n \r\n de la Concept Note");
    else
    btnUpdateForm = btnUpdateForm.Replace("ValValUpdateLabel", "Update the form from Concept Note");
    ribbonExtensions.LoadXml(this.btnUpdateForm);
    ribbon.RegisterDataExtension(ribbonExtensions.FirstChild, "Ribbon.ListForm.Edit.Actions.Controls._children");
    Thanks for advance

    Hi,
       i replicated issue , and \n is not affective. So i guess what option you can try is to keep text small and use Alt to show full text. 
    Regards,
    Milan Chauhan
    LinkedIn
    |
    Twitter | Blog
    | Email

  • How to add new line to the file?

    Hello,
    I will like to print 2 line of string in the following format to the
    file:- file.txt
    String1
    String2
    How to print a new line after String1 so that String2 can be written after String1?
    - Eugene -

    Do you mean...
    PrintWriter pw=new PrintWriter(new FileOutputStream("file"));
    pw.println(string1);
    pw.println(string2);
    pw.close();
    the println puts a new line after string1.

  • Add new line with sed

    Hello,
    I try to insert a new lines after a model line with a sed command in a script ,like :
    Before :
    ### model line#####
    After :
    ### model line#####
    new line 1
    new line 2
    I try something like this, but the newlinecharacter in not good understand :
    sed -e"s/### model line#####/### model line#####\nnew line 1\nnew line 2/g" my.cnf
    Some know how do that ??
    Thx

    to append newlines using sed, do not do it on cmd-line, because the shell will interprete the script,
    so put in 'sedcmd' something like:
    #-------begin
    /muster/a\
    linea
    lineb
    linec
    #---------end, note the last blanc line, is NEEDED!
    this also works for 'i' insert
    to change/delete blanc lines, you need to know what is a blanc line
    sed 's/^$/:/g'
    will replace blanc lines by ':'
    sed '/^$/d'
    will delete blanc lines
    finally sed has troubles w/ special characters, but it is NOT a bug!
    kind regards, jms

  • New lines with JLabel

    I am having problems getting my strings into new lines with jlabels. I know i can do it with <html>...<br>...</html> but the string in the label changes. What is the best way of getting the strings on to mulitaple lines without spliting up words.

    You can do whatever you want to the text area to make it look like a label:
    setBackground(...);
    setForeground(...);
    setBorder(...);
    setEditable(...);
    Its all there in the API.

  • Need to print new line when "," in string

    Hi,
    I have a string having value 12,221,23,67...
    I need to print a new line after ", "
    i;e 12
    221
    23
    67....
    Please suggest.
    Thanks,
    Ajit

    Hi Team ,
    its done.
    I have used chr 13, chr10 and it print new lines for me
    v_serial_num:=v_serial_num||','||CHR(13) || CHR(10)||rec.SERIAL_NUMBER;
    Thanks,
    Ajit

Maybe you are looking for

  • In IE I keep getting "adobe flash player 10 required" even though I have uninstalled and reinstalled

    in IE I keep getting "adobe flash player 10 required" even though I have uninstalled and reinstalled the latest version. Weirdly, the sound still works

  • Need to replace BBID in my playbook...

    Ok,  I got my BBPB second hand, and need to put my own BBID in it, and replace the one there.... I found directions on here to wipe playbook, clean and start over,   .......    sounds good, but.....  I have backed it up already , and then  when I res

  • Clickable images in jQuery slider web part

    I have created a slider web part using this "SharePoint 2010 Cookbook: Create a Slide Image Web Part Using jQuery". I would like to implement functionality to make the highlighted image clickable, opening the image in an iFrame (modal dialog).  I und

  • Safari Browser Hang

    I have recently upgraded my iOS to 4.3.1, suddenly my safari got hanged. I'm unable to enter anything in the address bar nor am able to close the browser. When I try to launch a link from my Mail I could see the link opening but the browser is not ac

  • How to open damaged word file?

    I m trying to open MS Word Document file, MS word files are showing error message like word 2003  doesn't open file, I have important document file got corrupted, so How to open damaged word file?  If you have any answer please help assist me.