Replace HTML tags within column values

Hi Gurus,
I have a requirement where I have some text which has HTML tags inserted within it and I need to insert either Presentation variable or a GO URL replacing that tag. Problem is that this text is value of a column from table. It is not something which I type( because the text can change dynamically). e.g
Column header:  Main Text
Row1:            <<COMPANY_NAME>>
Row2:           As of <<AF_OF_DATE>>
instead of <<COMPANY_NAME>> and <<AS_OF_DATE>>, I need to insert amounts from another table which have this unique tags and associated amounts. Can this be done?
I have to these columns in different places throughout the report in narrative views. e.g
1st narrative view will have only column 1 and row 1 and row 2.. 2nd narrative view will have only column 3 and row1...
This is really really important part of a report. So please help me out with ideas.
Thanks,
Dan

I tried calling the column in a narrative view and the result looks like :
As of <<AS_OF_DATE>>. how can I replace "<<AS_OF_DATE>>" with a value?

Similar Messages

  • Embedding html tags within a report

    I have an interactive report in which I'd like to indicate new table entries.
    I have a case statement on a column that checks the date that the entry was added and if it was added recently I concatenate a gif to the column value which indicates "New" entry. This works great in a standard report but when I add the code snippet to an interactive report it displays the html img tag rather than the actual image. Can anyone tell what I need to do to cause the report to render the image rather than just display the html tag?
    Thanks.

    Hello,
    In your Report Attributes, make sure that your columns Display Text As is set to Standard Report Column. I expect it's set to display as text?
    Regards,
    Dimitri
    -- http://dgielis.blogspot.com/
    -- http://www.apex-evangelists.com/
    -- http://www.apexblogs.info/

  • Html tags within a report link

    I have data in a table that looks like this:
    This item has a footnote <sup>1</sup>
    I would like to use this item as the link in a report. When I show it, though, htmldb strips out the <sup> and </sup> tags. Why?
    Thanks,
    a-

    For readers:
    A column selected in a report query was to be formatted by the reporting engine as a link and the column value was to be used as the link text. The data fetched from the column contained HTML. But the HTML part of the column value did not appear in the page as part of the link text while the rest of the column value did appear.
    The reason is that the reporting engine explicitly strips HTML from link targets and link text for columns that specify the link formatting option.
    Scott

  • Replacing html tags in a htmldocument

    Hi Java Gurus
    I have a htmldocument which has the bacjground set to black and foreground to white.
    When i print the document i see the text in white color ( rather invisible).
    I thought the foreground color of the document needs to be changed.
    How can i do this ?
    Thanks in advance
    Naveen

    rest_in_peace wrote:
    You'll get a faster, more effective response to your questions by including as much relevant information as possible upfront. This should include:
    <li>Full APEX version
    <li>Full DB version and edition
    <li>Web server architecture (EPG, OHS or APEX listener)
    <li>Browser(s) and version(s) used
    <li>Theme
    <li>Template(s)
    <li>Region/item type(s)
    Read the FAQ and forum sticky threads for more information on using the forum effectively.
    With APEX we're fortunate to have a great resource in apex.oracle.com where we can reproduce and share problems. Reproducing things there is the best way to troubleshoot most issues.
    I have created a form on a table. Now one of the fields in the form is a display only field and its datatype is varchar2.There are a number of different ways of "creating a form on a table" and of making "display only fields". Describe exactly what you mean using actual APEX terminology of regions, items, and their attributes.
    The data in the database column of the field contains html tags which is getting displayed as it is without being parsed. It is not possible for me to edit the data in the table itself since there are thousands of data. So I need a way to display the data with the html tags parsed and not displayed as it is. Please any help would be grealy appreciated. How this is achieved is version-dependent: provide the full APEX version.

  • APEX 3.1 replaces HTML tags in error message automatically

    Hello!
    I have a problem: we use sometimes HTML links or even JavaScript in error messages. In older versions of APEX it works, but now we upgraded to 3.1 and in all those messages HTML tags are replaced so instead of link we get a plain HTML in a message.
    Are there any possibilities to turn this option off or what can we do to solve this problem?
    Regards,
    Maksim

    In a page process we use raise_application_error(-20547, 'Go to GOOGLE') and in a Process Error Message
    we use constuction Error: #SQLERRM#. Then on an standard error page we see instead of Error: Go to Google html source. Thats it. In template in Error Page Template Control section we use substitution #MESSAGE#

  • Replacing HTML tags using HTMLEditorKit etc.

    Hi
    Not sure if this is the best place to ask this. I've searched without finding much.
    Basically I am trying to create a HTML template system for output. User's can change the templates to change the program output.
    The templates are basic HTML with custom tags inserted, that reside in a templates directory. For example, a simple template might be:
    <html><body>
    <table width="100%"><tr><td width="25%">Here is the output:</td>
    <td> <insertOutputHere> </td>
    </tr></table>
    </body></html>
    ^^ Users would be able to edit these template .htm files to affect the output .htm files. For instance, changing where the <insertOutputHere> tag is, or formatting the table it is output to.
    I am using the Swing HTMLDocument, HTMLWriter, HTMLEditorKit classes to load and parse the .htm files, iterate the tags and replace any custom tags (defined in code) with the program output. I have been able to locate these custom tags no problem, but I don't know how to replace this tag entirely with my output (Which will be formatted HTML string). I have been trying to use the insertBefore, insertAfter methods with limited success. In particular I have an 'include' custom tag which includes other files by recursion - it works except the <include> tag is not removed, and depending on which insert method I use, it usually goes into an infinite loop of parsing the <include> tag WITHOUT removing it, then picking it up again when its done.
    Basically I'm looking for any advice as to how to go about COMPLETELY REPLACING these tags with a well structured HTML string. I can post some code if need be but I barely comprehend what I've done, LOL.
    TIA

    I've looked over my mess of comments :)
    setOuterHTML is what I was previously using and it was quite unpredictable at times, as far as I could tell it is very strict with it's requirements for structured HTML (EG no floating line breaks, everything must be "paragraph-ised" which b0rks up the layout) and I can't rely on anyone using/extending these classes to write well structured HTML.
    I remember the problems being quite odd, such as the output for one custom tag being displayed twice for some and not at all for others, and while it isn't critical data, it was still displayed in a way that it could be interpreted as correct - I just knew it wasn't.
    So I dropped setOuterHTML to try insertAfterEnd - this leaves the tags in there and, like roughly explained above, it would pick up tags infinitely because they were not being replaced.
    Here is a relevant method to give a better idea of what I've done:
           public HTMLDocument parseHTMLfile(String filename, Custom_HTML_Tag tags[]) {
          //create a document
             HTMLDocument doc = (HTMLDocument)kit.createDefaultDocument();
             fileDepth++;
             try {
             //read in the file
                BufferedReader rd = new BufferedReader(new FileReader(filename));
                kit.read(rd, doc, 0);
                if (tags != null) {
                //replace tags with page content
                   ElementIterator it = new ElementIterator(doc);
                   Element e;
                   while ((e = it.next()) != null) {
                   //look for includes
                      if (e.getName().equals("include")) {
                         if (fileDepth >= 5){
                         //WARNING:
                            System.out.println("fileDepth has reached 5, include may be recursive. aborting.");
                            continue;
                         String href = (String)e.getAttributes().getAttribute(HTML.Attribute.HREF);
                      //grab parent of current file (IE the folder in which it sits)
                         File f = new File(filename);
                         String include = f.getParent() + sep + href;
                         f = new File(include);
                         if (f.exists()) {
                            HTMLDocument htmld = parseHTMLfile(include, tags);
                            StringWriter sw = new StringWriter();
                            HTMLWriter w = new HTMLWriter(sw, htmld);
                            w.write();
                            doc.setOuterHTML(e, sw.toString());
                         else {
                         //couldnt find include file - warning
                      for (int i=0; i < tags.length; i++) {
                         if (e.getName().equals(tags.getName())) {
    //doc.setOuterHTML(e, tags[i].getText());
    doc.insertAfterEnd(e, tags[i].getText());
    //System.out.println("found tag: " + tags[i].getName() + ": " + tags[i].getText());
    catch (BadLocationException ble) {// cant happen?
    System.err.println("ERROR (" + 999 + "): Could not parse document " + filename + "; BadLocationException");
    System.err.println(ble);
    catch (FileNotFoundException fnf) {
    System.err.println("ERROR (" + 999 + "): Could not parse document " + filename + "; File not found");
    //System.err.println(fnf);
    catch (IOException ioe) {
    System.err.println("ERROR (" + 999 + "): Could not parse document " + filename + "; I/O Error:");
    System.err.println(ioe);
    fileDepth--;
    return doc;
    setInnerHTML kills it with the 'Can not set inner HTML of a leaf' error
    Thanks

  • Replace HTML tags in RTE

    Hi All,
                   I've requirement that I need to replace the html tags in RTE, I checked find and replace plugin, which only replace the text not the tags. The CQ.form.rte.SearchableDocument returns the plain text. Can anybody tell me how to replace the tags?, is there any existing plugin's available ?
    Thanks in advance
        Ganesh

    Hi Ganesh,
        You can configure the rich text editor to use semantic markup, so that the bold=strong and italic=em will be modified in the html out. Not sure it applies for other tags. Give a try.
    http://forums.adobe.com/message/4652639#4652639
    Thanks,
    Sham

  • How to replace namespace tag with new value using -JAVA MAPPING

    Hi Guys,
    I need to replace namespace Tag in Target xml with a new value.
    For Eg: My namespace Tag is - <ns0:TestHeader xmlns:ns0="http://0020.TestHeader.SS.com">
    I want My target xml to have value- <ns0:TestHeader>
    How can i achieve it using JAVA mapping?
    Can you provide me the code to do so.

    Sarjana,
    Not well-formed XML is only possible by Java Mapping. Please use below replace logic in Java map.
    inputContent.replaceAll("<ns0:TestHeader xmlns:ns0=\"http://0020.TestHeader.SS.com\">", "<ns0:TestHeader>");
    Link1, Link2.

  • HTML code for Column value formating.

    Hi All,
    We have a requirement that, in a report we have some column values. For one of the column value we need to show that in bold with boarder like
    Column1| Column2| Column3.....
    Val1 | Val2 | Val3
    Val4   | Val5       | Val6_
    we want to show val4 column as bold and with boarder, because of some other constraints we have to use pivot table view. How can we achieve that
    Thanks in advance.

    Criteria tab->Column Properties->Style
    For Border you can use Style->Border
    You wold have mention entire row instead of vlo4!!
    If you have any condition to identify the row then go with conditional format
    Edited by: Veeravalli on Nov 26, 2012 7:01 AM
    Edited by: Veeravalli on Nov 26, 2012 7:03 AM

  • How to replace the string of column value with other column value in same table

      
    I have a temp table  which contains 
    Id  Name CTC   Address                      Content
    1    Ross  $200   6th block                  Dear #Name your  CTC  is #CTC and your address is  #address
    2   Jhon   $300   1oth cross                 Dear #Name your  CTC  is #CTC and your address is  #address
    Now i want to  select content    so that it should get  replace with  the respective  columns  and final output should come like this 
     Dear Ross your  CTC  is 200 and your address is    6th block  
      Dear Jhon your  CTC  is 300 and your address is   10th cross  
    Kindly suggest

    I think RSingh suggestion is ok ... what do you mean by another way? ...maybe something more generic?
    maybe build a table whith the list of col you need to "replace" and dinamically build the replace query ...
    declare @colList table(colName varchar(100))
    insert into @colList
    select 'name'
    union all select 'ctc'
    union all select 'address'
    declare @cmd varchar(2000)
    select @cmd='select '+ (select 'replace(' from @colList for xml path('') +' content '+
    (select ',''#'+ colName +''', '+ colName +')' from @colList for xml path(''))
    +' from YOURTABLENAME '
    exec (@cmd)
    or your request was different ?

  • HTML Tags within Javascript Errors

    Hi,
    Is there a way to insert html tags (<b>Bold Text Here</b>), inside a javascript string in the <script> tag, without any Validation errors? I read to put a backslash at the beginning of each html tags to prevent the string from being parsed as markup (<\b>Bold Text Here<\/b>). Errors goes away, but bold texts too !
    Anyone can help me on this one ... I'm not a javascript Guru ...
    Thanks !

    All wrong... Correct string notation always requires single or double quotation marks:
    "\b this is a string"
    \b this is garbage
    Additionally, whan you escape characvters, each one must be escvaped separately:
    \b ... \/\b
    Mylenium

  • How to set an attribute of a HTML tag with a value in the Servlet

    I have a HTML page and a Servlet.
    The HTML page sends a request to the Servlet.
    The Servlet has to read the contents of the HTML page. When the Servlet encounters the body tag it should set the bgcolor attribute of the body tag with a string(For eg.a string called color with a value blue) in the servlet.
    After doing this the Servlet has to update the original HTML page with the changes (in the body tag).
    I need a help on this.

    Hi sangee,
    you could get what you want to do by using a Java Server Page instead of both a HTML page and a Servlet.
    I should code something like this:
    <%Strung color="yourColor"%>
    <html><head><title></title></head>
    <body bgcolor="<%=color%>
    </body>
    </html>

  • HTML tags for certain values in a report

    Hi, I have built a report with a list of patient visit to a doctor. This is roughly a custom calendar with the names of the patients at different predefined hours.
    I am now trying to display a canceled visit by adding a strike through line for the patient in question.
    The overall look will be list with patient's names and some of them will be strike through-ed if they canceled it.
    So I changed my select for the report to look like this:
    select '<del>' || patient || '</del>' where canceled = 1 ...
    But the report still looks the same - no lines through the names.
    I also tried with bold tag but it seems that the tags are just dropped off somewhere in the process of rendering.
    Could anyone help?

    For using tags in the calendar see this link:
    http://apex.oracle.com/pls/otn/f?p=31517:116
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://htmldb.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • How to remove html tags from a column

    Hi
    Problem is this: I get a column with a comma separated list of id's and I can successfully parse these id's and use them elsewhere. BUT, occasionally there are html tags within that id list like this:
    1082471,1237423<br xmlns="http://www.w3.org/1999/xhtml" />
    Is there a way to just automatically remove all tags from a column? Could do this with regex, but since there is no support, I don't know what to do.

    Hi,
    If the HTML can be detected by a starting symbol like „<“, then you could use the following:
    Unfortuntely the operation “ReplaceRange” is only available on a Text-level, so you have to invoke a function (at least to my knowledge). You also need an Index-column in your table, so if you don’t have it, you need to create one as well.
    This is your function:
    let
       fnRemoveHTML = (Value, Index) =>
    let
       Source = Excel.CurrentWorkbook(){[Name="Tabelle1"]}[Content],
       IndeNo = Index,
       Value_ = Source{IndeNo-1}[Value],
       length = Text.Length(Text.From(Value_)),
       position = Text.PositionOf(Text.From(Value_), "<"),
       range = length-position,
       new= if Value_ is number then Value_ else Text.ReplaceRange(Value_, position, range, "")
    in
        new
    in
      fnRemoveHTML
    And this is how you invoke it:
    let
        Quelle = Excel.CurrentWorkbook(){[Name="Tabelle1"]}[Content],
        Last = Table.AddColumn(Quelle, "Custom", each fn_RemoveHTML([Value], [Index])),
        ChangedType = Table.TransformColumnTypes(Last,{{"Custom", type number}})
    in
        ChangedType
    Provided your table is called “Tabelle1” & the column with your values to be replaced “Value” & your index-col “Index”
    Imke

  • How to use Microsoft Word's Find and Replace with HTML tags?

    Hello to all!
    I'm trying to figure out how to use the find and replace function in Word to replace html tags. I'd like to be able to change something like this:
    <span class="B01-K-ITAL">random text</span>
    To something like this:
    <em>random text</em>
    I want to replace the open and close tags without changing or interfering with the text between the tags. I'm pretty sure I should use wildcards, but I can't figure out how to use them properly.
    Anyone able to lend a hand?

    Here is my latest regular expression with Perl.   I think it matches the spirit of the request in the original post.
    Note, this isn't as easy as you think.  You need to code up the complete set of html rules in you implementation. You need to allow for a certain amount of mal-formed html.
    perl -0660pe 's^<[sS][pP][aA][nN]\s+class="B01-K-ITAL"\s*>(.*?)</[sS][pP][aA][nN]>^<em>$1</em>^gs' i.html >|o.html
    input text
     <html> <head>...</head> <body>I'd like to be able to change something like this: <span class="B01-K-ITAL">#1 one line</span> I want to replace the open and close tags without changing or interfering with the text between the tags. I'm pretty sure I should use wildcards, but I can't figure out how to use them properly. <p>note, this isn't as easy as you think.  You need to code up the complete set of html rules in you implementation. You need to allow for a certain amount of mal-formed html.</p> <span class="B01-K-ITAL">#2 don't be greedy</span> <span class="B01-K-ITAL">$3 multiline text</span> <span class="B01-K-ITAL">#4 multiline tag. I believe html allow a carriage return in white space of tags</span> <span class="B01-K-ITAL">#5 split after the class tag. optional white space</span> <sPan class="B01-K-ITAL">#6 mixed case tag</Span> <p>no text #7</p><span class="B01-K-ITAL"></span> <!-- Apparently, this is valid     http://www.positioniseverything.net/articles/cc-plus.html --> <!--[if IE]> <div id="IEroot"> <![endif]--> <p id="IE">This browser is IE.</p> <p id="notIE">This browser is not IE.</p><!--[if IE]> </div> <![endif]--></body> </html>
    output text
     <html> <head>...</head> <body>I'd like to be able to change something like this: <em>#1 one line</em> I want to replace the open and close tags without changing or interfering with the text between the tags. I'm pretty sure I should use wildcards, but I can't figure out how to use them properly. <p>note, this isn't as easy as you think.  You need to code up the complete set of html rules in you implementation. You need to allow for a certain amount of mal-formed html.</p> <em>#2 don't be greedy</em> <em>$3 multiline text</em> <em>#4 multiline tag. I believe html allow a carriage return in white space of tags</em> <em>#5 split after the class tag. optional white space</em> <em>#6 mixed case tag</em> <p>no text #7</p><em></em> <!-- Apparently, this is valid     http://www.positioniseverything.net/articles/cc-plus.html --> <!--[if IE]> <div id="IEroot"> <![endif]--> <p id="IE">This browser is IE.</p> <p id="notIE">This browser is not IE.</p><!--[if IE]> </div> <![endif]--></body> </html>

Maybe you are looking for

  • Multiple LDAP Servers in Fusion Middleware (OBIEE 11g)

    Hello, I have a question, regarding integration of multiple LDAP servers with single Weblogic Server of Fusion Middleware (OBIEE 11g). We are currently using OBIEE 10g. We are on verge of migrating to 11g. However, I have a question regarding the LDA

  • Can one put XP image on the second disk with "img"?

    Hi all, We have a requirement to put in two IDE disks in the same machine and image the machines with different XP systems, each hard disk hosting one operating system. I was wondering whether Zen "img" utility allows for putting images on more then

  • One accountant process several company code

    Hi, Previously, our SAP server has only one company code,  so all accountants do not need to switch between company codes. Now, we will have another company code set up, but the accountant is same,  which means whey will do transaction in SAP for two

  • Something is wrong with rss feeds

    I am using Safari 5.0.1 on OSX 10.5.8. Recently Safari stopped deleting old rss feeds. I went to Safari's preferences->RSS and clicked "Remove Now". Now I have a problem where my system.log file is filling up with lines and lines like this: Sep 5 13:

  • How to align Flash web to center using Flash CS3?

    Hi, anyone have the same issue as me? I wanted to align my flash web to center on the IE. I have selected the alignment to center before publish on the web? Why is the command not useful or working? Please advice!