HTML Tags in sql

Hi guys
Im executing the below sql with the html tags, as it gone mess and returning error like invalid table name.
SELECT '<p style="font-family: Script MT Bold;color: #800080;font-size:35px;text-align: center;">' || 'Welcome' || PAPF.FULL_NAME|| '</p>
<p style="font-family: Times New Roman;color: #000000;font-size:15px;text-align: center;"> The Employees Information of</p>
<p style="font-family: Times New Roman;color: #000000;font-size:20px;text-align: center;"> <strong>Central Bank of Kuwait</strong>'
FROM FROM PER_ALL_PEOPLE_f PAPF, FND_USER FU
WHERE PAPF.PERSON_ID = FU.EMPLOYEE_ID AND
TRUNC(SYSDATE) BETWEEN PAPF.EFFECTIVE_START_DATE AND
PAPF.EFFECTIVE_END_DATE
Im not sure whether i missed any || or quotes in html tags while using with the column name in the select statement
Thanks in advance.
Regards,
Vel

Don't do this via the SQL selection as hardcoded HTML??
I think the following 2 approaches far superior.
If you need the actual SQL projection to contain HTML, implement user functions for data transformation. E.g.
SQL> create or replace function MakeDiv(
  2          divBody varchar2,
  3          fontColor varchar2 default 'black',
  4          tooltip varchar2 default null )
  5  return varchar2 is
  6          DIV_TEMPLATE constant varchar2(4000) :=
  7          '<div style="color:$COLOR" title="$TOOLTIP"> $BODY </div>';
  8 
  9          htmlDiv varchar2(4000);
10  begin
11          htmlDiv := replace( DIV_TEMPLATE, '$BODY', divBody );
12          htmlDiv := replace( htmlDiv, '$COLOR', fontColor );
13          htmlDiv := replace( htmlDiv, '$TOOLTIP', tooltip );
14          return( htmlDiv );
15  end;
16  /
Function created.
SQL>
SQL> select MakeDiv( ename, 'blue', 'Employee '||empno ) from emp;
MAKEDIV(ENAME,'BLUE','EMPLOYEE'||EMPNO)
<div style="color:blue" title="Employee 7369"> SMITH </div>
<div style="color:blue" title="Employee 7499"> ALLEN </div>
<div style="color:blue" title="Employee 7521"> WARD </div>
<div style="color:blue" title="Employee 7566"> JONES </div>
<div style="color:blue" title="Employee 7654"> MARTIN </div>
<div style="color:blue" title="Employee 7698"> BLAKE </div>
<div style="color:blue" title="Employee 7782"> CLARK </div>
<div style="color:blue" title="Employee 7788"> SCOTT </div>
<div style="color:blue" title="Employee 7839"> KING </div>
<div style="color:blue" title="Employee 7844"> TURNER </div>
<div style="color:blue" title="Employee 7876"> ADAMS </div>
<div style="color:blue" title="Employee 7900"> JAMES </div>
<div style="color:blue" title="Employee 7902"> FORD </div>
<div style="color:blue" title="Employee 7934"> MILLER </div>
14 rows selected.
SQL> An even better approach is not to do this in the SQL projection - but instead have a PL/SQL framework that accepts a SQL, and turns the SQL projection of that SQL into a HTML report. Where this framework can use different templates to generate different types of HTML reports.
This approach is very successfully used by Oracle Apex.

Similar Messages

  • JSP/Servlets functions: clear HTML tags, clear SQL code, validate E-mail

    Hello!
    I am looking for java functions, which:
    - clear HTML tags
    - clear SQL injection code
    - validate an e-mail address
    Probably there are java build-in functions for doing that.
    Maybe anyone could give me their names?
    I would be also grateful for any help, links or something.

    Hi,
    You could try using ,
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    instead of
    DriverManager.registerDriver(new oracle.jdbc.OracleDriver());
    -Amol

  • Query to extract HTML tag with data

    Hi All,
    I have a string.
    '<HTML><HEAD>THIS IS HEAD.</HEAD><BODY>THIS IS BODY.<P>THIS IS P1.</P>NIMISH<P>THIS IS P2.</P></BODY></HTML>'
    I want to extract a html tag including its opening & closing tab with data as
    if i say P1
    then the output should be
    '<P>THIS IS P1.</P>'
    for P2
    then the output should be
    <P>THIS IS P2.</P>
    please help me in writing this query with regular expression
    i have tried it as following but it is not giving desired result:
    WITH T AS
    SELECT
        '<HTML><HEAD>THIS IS HEAD.</HEAD><BODY>THIS IS BODY.<P>THIS IS P1.</P>NIMISH<P>THIS IS P2.</P></BODY></HTML>' STR
    FROM   
        DUAL
    SELECT REGEXP_SUBSTR(STR, '<P>.+P2.+</P>') FROM T
    Thanks & Regards
    Nimish GargEdited by: Nimish Garg on May 7, 2012 5:49 PM

    Nimish Garg wrote:
    My requirement is to extract a <tag>data</tag> from a HTML/XML string
    where data contains any specified value.HTML is not XML.
    And that is a critical distinction to make. HTML parsing is horribly complex. XML is quite easy. For HTML you have to code your own parser in PL/SQL. XML can be parsed using the XMLTYPE class/data type in PL/SQL.
    So if you need to find a single specific tag in HTML - I would not try to treat it as XML. I may not even try to use regular expressions.
    I would do a basic substring search for the start of the tag. Read the data following the tag. Ensure that there are no nested or embedded tags in the data. Until the end tag is read. Because HTML is that much abused - and because that is an accepted norm as parsers used by browsers deals with that abuse without complaining.
    Proper HTML is mostly a myth in my experience of "screen scraping" web servers for data extraction as they do not have web services supplying the data.

  • HTML Tags not moved in PDF

    Hello,
    I would like to print a report as a PDF and use the BI Publisher.
    This functions so far also quite well, only I have the problem
    I pass a HTML formatted text from a field CLob
    and with the PDF output the HTML tags are not moved.
    In the PDF document the HTML tags stands instead of a formatted heading,
    e.g.
    <*h1> This is the heading <*/h1> (without stars)
    What I must set / make with it I also a formatted one
    Heading agrees?
    Somebody an idea?
    Edited by: user10460383 on 14.09.2009 06:16
    Edited by: user10460383 on 14.09.2009 06:17

    True - a PDF isn't going to support HTML encoding. HTML will just be seen as more text, and displayed that way.
    You can strip out HTML tags fairly easily with a regular expression in your query SQL - this simply looks for text between < and > characters, and removes it. That should work for basic HTML formatting tags, but it isn't 100% (it won't handle <script> blocks correctly, for instance).
       select regexp_replace(myHTML, '<[^>]*>', '') as myText
       from myTable... Implementing a method to convert the HTML formatting into RTF formatting is also possible, but not a trivial task - you'd effectively have to replace each HTML tag with an RTF equivalent -- eg, replace <H1> with the RTF code to make a larger font, replace </H1> with RTF code to return the font to normal... etc...

  • Unable to handle html tags in BI publisher trial edition

    Hi,
    I am very new to BI publisher and having issues reading rich text field from database and reading into the report.
    BI Publisher - 11.1.1.6 trial edition
    test case: I have a rich text field that stores html tags in the database. I have created a data model using sql query and am selecting rich text field from the database. When trying to display that field on the report in BI publisher I get the html tags.
    I even tried Tim Dexter solution mentioned in the below blog but now when I run the report nothing shows up for that rich text field in the report. I am not sure if I am missing any steps while using html2fo.
    https://blogs.oracle.com/xmlpublisher/entry/html_in_xml_support
    Please help since I am struggling with this for past few days. Also below is the sample xml data where element "PROJECT_DETAILS" is the rich text field.
    Thanks,
    Saurabh.
    <G_2>
    <EMPLID_1>0001</EMPLID_1>
    <PROJECT_DETAILS><![CDATA[<p class="Resume-JobSum">Managed and led twenty members technical team to successfully complete development on time. Took over management of behind schedule development and provided direction and discipline to complete development cycle on time.</p> <p class="Resume-ExperienceBullets" style="margin-left:43.0pt;text-indent:-.25in;mso-list:l0 level1 lfo1;tab-stops:.5in;"><span style="font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family: Symbol;">·<span style="font-size: 7pt;font-family: 'Times New Roman';">         </span></span>Improved delivery by prioritizing development items.</p> <p class="Resume-ExperienceBullets" style="margin-left:43.0pt;text-indent:-.25in;mso-list:l0 level1 lfo1;tab-stops:.5in;"><span style="font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family: Symbol;">·<span style="font-size: 7pt;font-family: 'Times New Roman';">         </span></span>Improved efficiency by removing dependencies and delegating work.</p> <p class="Resume-ExperienceBullets" style="margin-left:43.0pt;text-indent:-.25in;mso-list:l0 level1 lfo1;tab-stops:.5in;"><span style="font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family: Symbol;">·<span style="font-size: 7pt;font-family: 'Times New Roman';">         </span></span>Improved cost management by controlling over time hours on the team.</p> <p class="Resume-ExperienceBullets" style="margin-left:43.0pt;text-indent:-.25in;mso-list:l0 level1 lfo1;tab-stops:.5in;"><span style="font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family: Symbol;">·<span style="font-size: 7pt;font-family: 'Times New Roman';">         </span></span>Provided infrastructure planning for support and future phases.</p> <p class="Resume-ExperienceBullets" style="margin-left:43.0pt;text-indent:-.25in;mso-list:l0 level1 lfo1;tab-stops:27.0pt;"><span style="font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family: Symbol;">·<span style="font-size: 7pt;font-family: 'Times New Roman';">         </span></span>Planned and Managed change management and migration process.</p><p></p>]]></PROJECT_DETAILS>

    are u using an RTF template?
    u need to use
    <?html2fo: COLUMN_NAME?>
    instead of <?COLUMN_NAME?> in the RTF template
    http://docs.oracle.com/cd/E23943_01/bi.1111/e22254/create_rtf_tmpl.htm#CHDCEEIJ
    Edited by: anupma.s on Feb 21, 2013 11:12 AM

  • I want to display BLOB image in JSP Using  html tags IMG src=

    GoodAfternoon Sir/Madom
    I Have got the image from oracle database but want to display BLOB image using <IMG src="" > Html tags in JSP page . If it is possible than please give some ideas or
    Send me sample codes for display image.
    This code is ok and working no problem here Please send me code How to display using html tag from oracle in JSP page.
    <%@ page import="java.sql.*" %>
    <%@ page import="java.io.*" %>
    <%@ page import="javax.swing.ImageIcon;" %>
          <%
            out.print("hiiiiiii") ;
                // declare a connection by using Connection interface
                Connection connection = null;
                /* Create string of connection url within specified format with machine
                   name, port number and database name. Here machine name id localhost
                   and database name is student. */
                String connectionURL = "jdbc:oracle:thin:@localhost:1521:orcl";
                /*declare a resultSet that works as a table resulted by execute a specified
                   sql query. */
                ResultSet rs = null;
                // Declare statement.
                PreparedStatement psmnt = null;
                  // declare InputStream object to store binary stream of given image.
                   InputStream sImage;
                try {
                    // Load JDBC driver "com.mysql.jdbc.Driver"
                    Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
                        /* Create a connection by using getConnection() method that takes
                        parameters of string type connection url, user name and password to
                        connect to database. */
                    connection = DriverManager.getConnection(connectionURL, "scott", "root");
                        /* prepareStatement() is used for create statement object that is
                    used for sending sql statements to the specified database. */
                    psmnt = connection.prepareStatement("SELECT image FROM img WHERE id = ?");
                    psmnt.setString(1, "10");
                    rs = psmnt.executeQuery();
                    if(rs.next()) {
                          byte[] bytearray = new byte[1048576];
                          int size=0;
                          sImage = rs.getBinaryStream(1);
                        //response.reset();
                          response.setContentType("image/jpeg");
                          while((size=sImage.read(bytearray))!= -1 ){
                response.getOutputStream().write(bytearray,0,size);
                catch(Exception ex){
                        out.println("error :"+ex);
               finally {
                    // close all the connections.
                    rs.close();
                    psmnt.close();
                    connection.close();
         %>
         Thanks

    I have done exactly that in one of my applications.
    I have extracted the image from the database as a byte array, and displayed it using a servlet.
    Here is the method in the servlet which does the displaying:
    (since I'm writing one byte at a time, it's probably not terribly efficient but it works)
         private void sendImage(byte[] bytes, HttpServletRequest request, HttpServletResponse response) throws IOException {
              ServletOutputStream sout = response.getOutputStream();
              for(int n = 0; n < bytes.length; n++) {
                   sout.write(bytes[n]);
              sout.flush();
              sout.close();
         }Then in my JSP, I use this:
    <img src="/path-to-servlet/image.jpg"/>
    The name of the image to display is in the URL as well as the path to the servlet. The servlet will therefore need to extract the image name from the url and call the database.

  • Html tags removed when #COLUMN_HEADER# is used in column template

    Hi all,
    I'm using APEX 4.0.2, theme 2 Builder Blue.
    I am trying to add html tags to dynamically generated column headings of a dynamic SQL Report.
    When using a standard report template, the headings contain the html tags. However when I want to use one of the vertical lay-outs all html tags are removed. After some research I found out that when the substitution string #COLUMN_HEADER# is used within the column headings part of the template, the html tags are being preserved. They are removed however when the #COLUMN_HEADER# substitution string is used in the column templates part of the template.
    This is easily testable by using for instance "return htf.bold ('COL01')" as dynamic column header.
    Is this a bug or am I overlooking something? Is there another solution maybe to preserve html tags in the column heading?
    Cheers, Erik

    webdynpro appears to use XHTML instead of HTML so the syntax is a bit more limitted and more picky.
    this link explains the difference between the two syntaxes:
    http://reference.sitepoint.com/html/html-xhtml-syntax
    you can test your tags in this validator tool
    http://validator.w3.org
    solved?  have a good week, and holidays.

  • Tablespace usage report generated with html tags instead of text

    Hi ,
    We have a unix shell script scheduled to find tablespace usage and sends the report to our mail id.
    For the past few weeks(no changes idone in the script) the report is coming with html tags instead of text as below.
    </head>
    <body>
    <p>
    <table border='1' width='90%' align='center' summary='Script output'>
    <tr>
    <th scope="col">
    TABLESPACE_NAME
    </th>
    <th scope="col">
    CUR_USE_MB
    </th>
    <th scope="col">
    CUR_SZ_MB
    </th>
    <th scope="col">
    CUR_PRCT_FULL
    </th>
    <th scope="col">
    FREE_SPACE_MB
    </th>
    <th scope="col">
    MAX_SZ_MB
    </th>
    <th scope="col">
    OVERALL_PRCT_FULL
    </th>
    </tr>
    <tr>
    <td>
    SYSTEM
    </td>
    <td align="right">
    268
    </td>
    <td align="right">
    500
    </td>
    <td align="right">
    54
    </td>
    Is this any settings issue or anything to be modified in the script.Could you please reply..
    Regards,
    Bharath.
    Edited by: 870384 on Jul 6, 2011 1:17 AM

    Hi Sven W,
    Please find the sql below that is generating the tablespace usage report. In the staring of the script markup is set to ON and at the end it is set to OFF.Do you suggest any changes to this..?
    SET ECHO OFF
    SET PAGES 999
    SET MARKUP HTML ON SPOOL ON
    col tablespace_name format a15 trunc
    col cur_use_mb for 999999999
    col cur_sz_mb for 999999999
    col free_space_mb for 999999999
    col max_sz_mb for 999999999
    compute sum of cur_use_mb on report
    compute sum of cur_sz_mb on report
    compute sum of free_space_mb on report
    compute sum of max_sz_mb on report
    break on report
    spool tablespace.html
    select tablespace_name,
    round(sum(total_mb)-sum(free_mb),2) cur_use_mb,
    round(sum(total_mb),2) cur_sz_mb,
    round((sum(total_mb)-sum(free_mb))/sum(total_mb)*100) cur_prct_full,
    round(sum(max_mb) - (sum(total_mb)-sum(free_mb)),2) free_space_mb,
    round(sum(max_mb),2) max_sz_mb,
    round((sum(total_mb)-sum(free_mb))/sum(max_mb)*100) overall_prct_full
    from (select tablespace_name,sum(bytes)/1024/1024 free_mb,0 total_mb,0 max_mb from DBA_FREE_SPACE group by tablespace_name
    union select tablespace_name,0 current_mb,sum(bytes)/1024/1024 total_mb,sum(decode(maxbytes, 0, bytes, maxbytes))/1024/1024 max_mb
    from DBA_DATA_FILES group by tablespace_name) a group by tablespace_name;
    select owner,segment_name,segment_type,bytes/(1024*1024) size_m
    from dba_segments
    where tablespace_name = 'SYSTEM' and segment_name='FGA_LOG$' order by size_m desc;
    spool off;
    SET MARKUP HTML OFF SPOOL OFF

  • How to avoid HTML tags in CSV output

    Hi,
    I have a Interactive Report, some of the columns are links which are derived from functions as shown below.
    function1 (p1) - this function will return a url something like
              '<a href=f?p=........>'||p1||'</a>';
    select col1, col2, function1(col3) from table1Report Output
    11     22     _33_(link)CSV Download Output
    11     22     <a href=f?p=........>33</a>Report output is perfectly fine and links are also displayed correctly..*no issues*
    BUT when I download this as a CSV output...I am getting all the html tags *< a* along with href=..f?p=... */ a >* in the CSV file
    Is there any way to avoid these html tags in the CSV download file.
    Thanks,
    Deepak
    Edited by: Deepak_J on May 17, 2010 3:44 PM

    Hi,
    I am using following conditions (Interactive Report)..as shown below.. just say columns are DEPT and DEPT_EXPORT.
    IR Report column
       DEPT
         - condition- PL\SQL Expression... :REQUEST != 'CSV'
         (this will display as a normal IR column)
    Export Column
       DEPT_EXPORT
         - condition- PL\SQL Expression... :REQUEST = 'CSV'
         (this will display only in case of export to csv)1. When I run the report and do CSV download..sometime ..I get the DEPT_EXPORT column in the CSV file..sometime not..*No idea why it is happening..it's not consistent.*
    2. Secondly, I need to display DEPT_EXPORT column in CSV export..only when DEPT column has been selected in the Interactive Report.
    If no DEPT column in IR...no DEPT_EXPORT column in CSV. Is it possible??
    Thanks,
    Deepak

  • Html tags in pdf printing

    Hi ,
    I have a pl/sql region which I use to display a report .
    Now I want a Pdf output of this pl/sql region. For this I used the Bi publisher and was able to design the report query and report layout as required.
    However my problem is that some of the columns in my table have html tags (since the input for these column is through an text area with html editor) . When the PDF is generated the html tags are not converted.
    Please advice me on this.
    Thanks,
    Deepa
    Edited by: Deepa J on Sep 25, 2008 6:01 AM

    Hi Deepa.
    You wont get the HTML to be interpreted in the BI Publisher output I'm afraid.
    You'll need to wait for APEX 4.0 for that functionality.
    If you're seeing the HTML tags in your PDF and you use a Classic report region you can try selecting the "Strip HTML" option in the Layout and Pagination settings.
    Regards
    Simon Gadd

  • [RB 6i] Format text in the field using HTML-tags. Or another way...

    If some fields of tables in database contain html tags such as 'H<sub>2</sub>O' (here is html tag 'sub') or 'some<b>text</b>'(here is html tag 'b') how can I to make Report Builder 6i to understand these tags or at least don't show them?
    Or how in another way can I format a part of text inside the field?
    thanx before
    Max

    Hi Maxim,
    If the output is PDF, the only way is to filter the incoming values yourself. You will need to create a PL/SQL column and remove the HTML markup tags. This, of course, leaves you without attributes you wanted in text (ie: the no "Bold" characters). You can still do this in with the same report basing the output from the PL/SQl formula column on the "desformat" input parameter.
    Reports doesn't have any "markup" capability. ie: A field only has one font & one colour. You can have multiple fonts for boilerplate text but, again, only a single colour.
    Robin.

  • HTML Tags in Popup Key LOV Item

    Hi,
    I would like to format the text shown in a PopupKey LOV (Displays description, returns key value) item using HTML tags.
    For example, I have an item with the following query in the LOV definition:
    select '<b>'||dname||'</b>' dept_name, deptno
    from dept
    order by 1
    I had hoped that this would show the department name in bold, however the HTML tags appear to be escaped when the LOV is rendered. See <a href="http://apex.oracle.com/pls/otn/f?p=28003 target="_blank"></a>.
    Can anyone suggest how I would best achieve this.
    Thanks
    Andrew.

    Hi,
    This is weird. I've tried recreating the LOV in a standalone html page and your original "&lt;b&gt;text&lt;/b&gt;" worked just fine there.
    The only possible problem would be that the &lt; and &gt; characters are being ignored when the data is being read in from SQL.
    Put your original stuff back in and when the LOV is displayed have a look at the page source.
    Andy

  • HTML Tags in XML Update

    I have a unique situation (may be not that unique). I want to update or add HTML tags in an XML element I am writing a PL/SQL Stored Procedure to insert, update or delete elements/attributes from an XML Type column based on the input XML (coming from Java application). SP is called from Java app. For example my XML may loook like
    <Description Name="Sales Message">
    <Text>This is a test</Text>
    </Description>
    I can update this in XML by creatinga SP which accepts a value (clob or text) and make a simple update call like
    UPDATE table_name
    SET hotel_xml = UPDATEXML (hotel_xml, Description[@Name=''Sales Message'']/Text/text()', 'This is a Test')
    WHERE id = 123;
    Hopwever when I have HTML tags in my parameter value, my update fails. For example java pp passes me a string
    This is a bold &lt;B&gt;Test&lt;/B&gt;
    (without encoding it is "This is a Bold <B>Test</B>"
    When I run this
    UPDATE table_name
    SET hotel_xml = UPDATEXML (hotel_xml, Description[@Name=''Sales Message'']/Text/text()', 'This is a bold &lt;B&gt;Test&lt;/B&gt;')
    WHERE id = 123;
    It thinks, I am passing a substitution variable (think &lt and &gt as sub variables) and the procedure fails.
    How do I handle HTML encoded charcters in Oarcle Pl/SQL? Many of my SPs has to accept XML as clob that may contain HTML encoding. Java always encodes HTML tags in an XML so I have to pass the CLOB(xml) to a SP as it is

    When this type of encoding is there in my XML or input variable, PL/SQL thinks
    its a substitution variable and tries to replace it by prompting replacement. I think »substitution variables« is the wrong phrase for this. Probably you mean »entity names«, and all that happens is that special characters are converted to »entity names« to ensure valid xml after the update:
    SQL> with table_name as (
    select xmltype('<Description Name="Sales Message">
                       <Text>This is a test</Text>
                     </Description>') hotel_xml from dual)
    select updatexml (hotel_xml,
                      'Description[@Name="Sales Message"]/Text/text()',
                      'This is a bold <B>Test</B>'
                     ) hotel_xml
      from table_name
    HOTEL_XML                                                                                             
    <Description Name="Sales Message"><Text>This is a bold &amp;lt;B&amp;gt;Test&amp;lt;/B&amp;gt;</Text></Description> Do you expect your result to look like
    <Description Name="Sales Message">
      <Text>This is a bold <B>Test</B></Text>
    </Description>??

  • Stripping all HTML tags from a CLOB

    Hi all,
    Running Oracle 9.2.0.8 on AIX...
    We have a table which stores HTML document fragments in a clob. I have a requirement to convert these to plain/text (strip all HTML tags) for sending in a plain/text email body.
    I have read the following solution from Tom Kyte's site:
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:25695084847068
    Basically creating an Oracle text index on the CLOB column and calling ctx_doc.filter with "plaintext" parameter set to true.
    I noticed in Tom's example, he uses the default filter, which based on the docs, is NULL_FILTER, which applies no filtering. I have tried his example in my dev box, creating the text index on the CLOB column with no parameters.
    The call to ctx_doc.filter did not filter the html at all. I re-created the index and specified the INSO_FILTER and the filtering was done. I was under the impression that INSO_FILTER was for filtering binary content to plaintext...
    create table filter ( query_id number, document clob );
    create table demo
      ( id            int primary key,
        theclob       clob
    create index demo_idx on demo(theClob) indextype is ctxsys.context;
    SET DEFINE OFF;
    Insert into DEMO
       (ID, THECLOB)
    Values
       (1, '<html><body><p>This is a test of <strong>ctx_doc.filter</strong> and plaintext filtering.</p></body></html>');
    COMMIT;
    exec ctx_doc.filter('demo_idx',1, 'filter',1, true);The above code does not convert the html to plaintext...
    Now re-create with the index with INSO_FILTER
    drop index demo_idx;
    create index demo_idx on demo(theClob) indextype is ctxsys.context parameters ('filter ctxsys.inso_filter');
    exec ctx_doc.filter('demo_idx',1, 'filter',1, true);Above scenario returns string "This is a test of ctx_doc.filter and plaintext filtering."
    The ORacle documentation doesn't specify any special filter parameter that needs to be set... just wondering if I'm missing soemthing here... or better yet, if there is a better solution to my problem. ;-)
    Thanks
    Stephane

    The difference between what you did and what Tom Kyte did is that you created your index on a clob column and Tom created his index on a blob column. What I don't know is why that makes a difference. I have demonstrated below with one blob column and one clob column, one index on the blob and one index on the clob, using the same code on both, with different results.
    SCOTT@orcl_11gR2> create table filter
      2    (query_id  number,
      3       document  clob)
      4  /
    Table created.
    SCOTT@orcl_11gR2> create table demo
      2    (id       int primary key,
      3       theblob   blob,
      4       theclob   clob)
      5  /
    Table created.
    SCOTT@orcl_11gR2> create index demo_blob_idx
      2  on demo (theblob)
      3  indextype is ctxsys.context
      4  /
    Index created.
    SCOTT@orcl_11gR2> create index demo_clob_idx
      2  on demo (theclob)
      3  indextype is ctxsys.context
      4  /
    Index created.
    SCOTT@orcl_11gR2> insert into demo values
      2    (1,
      3       utl_raw.cast_to_raw (
      4         '<html>
      5            <body>
      6              <p>
      7             This is a test of
      8             <strong> ctx_doc.filter </strong>
      9             and plaintext filtering.
    10              </p>
    11            </body>
    12          </html>'),
    13       '<html>
    14          <body>
    15            <p>
    16              This is a test of
    17              <strong> ctx_doc.filter </strong>
    18              and plaintext filtering.
    19            </p>
    20          </body>
    21        </html>')
    22  /
    1 row created.
    SCOTT@orcl_11gR2> exec ctx_doc.filter ('demo_blob_idx', 1, 'filter', 1, true)
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> exec ctx_doc.filter ('demo_clob_idx', 1, 'filter', 2, true)
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> select id, utl_raw.cast_to_varchar2 (theblob), theclob from demo
      2  /
            ID
    UTL_RAW.CAST_TO_VARCHAR2(THEBLOB)
    THECLOB
             1
    <html>
            <body>
              <p>
                This is a test of
                <strong> ctx_doc.filter </strong>
                and plaintext filtering.
              </p>
            </body>
          </html>
    <html>
          <body>
            <p>
              This is a test of
              <strong> ctx_doc.filter </strong>
              and plaintext filtering.
            </p>
          </body>
        </html>
    1 row selected.
    SCOTT@orcl_11gR2> select query_id, document from filter
      2  /
      QUERY_ID
    DOCUMENT
             1
    This is a test of ctx_doc.filter and plaintext filtering.
             2
    <html>
          <body>
            <p>
              This is a test of
              <strong> ctx_doc.filter </strong>
              and plaintext filtering.
            </p>
          </body>
        </html>
    2 rows selected.
    SCOTT@orcl_11gR2>

  • HTML Tags in Crystal

    Hello All,
    Since my replies were deleted for some unknown reason from the feature requests thread,
    I Thought that i might be missing something and Maybe someone can shed some light on this issue for me...
    We're using Sql Server 2008 to store our data, in some tables we're using varchar(max) as data type and we store huge HTMLs inside them.
    unfortunately, crystal reports support text length only up to 65534, which give's us a big headache because we have to use our own workaround to cut these huge HTMLs in 65k chunks and yet make them look as if they were in one piece.
    What we can't work around, is the lack of support in basic HTML Tags, such as <TABLE>.
    every text that was originaly authored inside a table tag, will be stripped down from the table to a messed text...
    Does anyone have a solution/workaround for this issue? we desperately need the ability to display this HTML element in the report, but for now we're unable to.
    Please help, Thank you.

    hey Muskito,
    there is another method that you can try. there is an option to activate Pass Through HTML which will then allow fields and formulae containing html to show up as html. the activation of Pass Through HTML is a supported feature of businessobjects enterprise since version xi.
    before you waste too much time on this, here are the limitations:
    1) you cannot export the html as html...i.e. if you export a report with pass through html the html will show up as text instead of html
    2) you cannot use the crystal reports viewer print option...sometimes the browser print functionality will suffice
    3) paging can be an issue as the cr print engine doesn't know the sizing of the html being printed
    to see how to activate pass through html, go to the webelements page [here |Crystal Reports webElements]and download the files...in the User Guide there are instructions on how to activate pass through html on your system.
    cheers,
    jamie

Maybe you are looking for

  • Help with emailing a URL instead of attachment

    Hi all: I have this question. We have hundreds of Oracle Reports .rdf's from way back. We now want to run them in Oracle Reports Server 10g (9.0.4.1). What we want to do is set destype=FILE when we run rwservlet. And then when the process/job finishe

  • Hierarchical Queries

    I've a table with these values. ID     Name          Parent_ID      0     Organization1     null 1     Organization2     0 2     Organization3     0 3     Organization4     0 4     Organization5     1 5     Organization6     1 6     Organization7    

  • Database - JSF Intergration Error

    I am creating a simple web application that uses Oracle XPress 10g R2. The application uses the Business Tier Model--ViewController and JSF: The JSF page is called "StudentList.jsp" The database has only one table "STUDENT_TBL" and I'd like to view t

  • Saving a BufferedImage as part of another file

    Hi mates ! I have a program in which the documents it produces are based on images . I want to save the documents in one complete file containing both the image and the other data. the problem is less to store the data then reading it . at first i th

  • Fonts won't preview in browser

    When I preview a page in Dreamweaver (with path file:///Users/ ... ), the web fonts no longer show up properly. They display on live webpages correctly, but I recently removed duplicate fonts from my system using Linotype Font Explorer...and I'm wond