Standart report sorting with HTML expression in it

hi,
got a query with report links like +'<_a href="f?p=&APP_ID.:26:&APP_SESSION.:::26:P26_YEAR,P26_MONTH,P26_BACK,P26_STATUS,P26_PROJECT:&P22_YEAR.,&P22_MONTH.,22,0,'||id||'">'||saved||'</_a>'+
with 'saved' being a numeric value, report column sorting does not work. any suggestions?
simon

Hi Simon,
As you are outputting the entire HTML using SQL, you need include something at the beginning of the HTML that allows sorting to work on the correct values. I tend to use the "title" (tooltip) attribute and ensure that numbers are of equal length by padding them with zeros:
'&lt; title="' || TO_CHAR(saved,'000000') || '" href = "' ..... etc
{code}
Andy                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Similar Messages

  • 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

  • Financial Reporting Sorting with page dimensions

    I had a report that was sorting account by description, in ascending order.
    However, then I changed it and added the Entity Dimension into the Hierarchy and it removed the Sorting. I cant get it to sort again.
    Is this a function of FR that if there are page dimensions you cant custom sort, or is there something that I am missing.
    Any help would be great
    Thanks
    Edited by: user12262404 on Sep 15, 2011 6:18 AM

    Hi,
    Have you tried the following link?
    http://download.oracle.com/docs/cd/E12825_01/epm.111/fr_user/7000011.html
    Cheers,
    Mehmet

  • Report Sorting with PL/SQL Headings

    Hi,
    I have PL/SQL Headings for my reports. Is there a way to use the sorting feature nevertheless?
    I tried to put the sorting syntax in my PL/SQL Headings, but it breaks at the first colon.
    BTW: How can I get the region_id? Is there a "hidden" substitution string like &APP_ID.?
    return 'Projekt' || ':' || to_char(sysdate,'WW/RR') || ':' || to_char(sysdate,'WW/RR') || ':' || 'Bericht'
    Regards, Juergen

    Hi Juergen,
    Column heading sorting does not work when using a PL/SQL function to determine the column headings in the current version. This issue has been resolved and it will be working in the next release. There is no substitution string to determine the region ID and I would not recommend hard-coding URLs in your headings PL/SQL function because the URL sort syntax used might change in future versions.
    Regards,
    Marc

  • Formatting a report column with "%"

    I must format a field of a column report with the symbol %
    like this
    50%
    whet i must put in the Number / Date Format of the field ???
    Thak's

    GcG-Italia wrote:
    I must format a field of a column report with the symbol %
    like this
    50%
    whet i must put in the Number / Date Format of the field ???Nothing. Oracle number format models don't support "%".
    In a standard report or APEX 4.2 interactive report use an HTML Expression in the column attributes:
    #PERCENT_COL#%In an interactive report prior to 4.2 it has to be done in the query as shown above, which adversely impacts sorting, exporting etc as the column value is no longer a number.
    Help us to help you. When you have a problem you should provide as much relevant information as possible upfront. This should include:
    <li>Full APEX version
    <li>Full DB/version/edition/host OS
    <li>Web server architecture (EPG, OHS or APEX listener/host OS)
    <li>Browser(s) and version(s) used
    <li>Theme
    <li>Template(s)
    <li>Region/item type(s) (making particular distinction as to whether a "report" is a standard report, an interactive report, or in fact an "updateable report" (i.e. a tabular form)
    And always post code wrapped in <tt>\...\</tt> tags, as described in the FAQ.

  • SSRS reports integration with sharepoint 2010

    Hi Friends,
    Any one can u pls tell me what are the  prerequisites for integrating SSRS Reports with Sharepoint.
    This is the first time im going to integrate SSRS reports with Sharepoint. Any one pls help me on this.
    Thanks in advance.
    Regards,
    LuckyAbdul

    Hi LuckyAbdul,
    We can integrate Microsoft SQL Server Reporting Services with SharePoint Foundation 2010 or SharePoint Server 2010 by configuring a report server to run in SharePoint integrated mode. There are some prerequisites for integrating SSRS Reports with SharePoint,
    including Report server requirement, SharePoint Products and Technology requirements and Database server requirements in SQL 2008 R2.
    The Reporting Services Configuration Manager is no longer required or supported to configure and administer Reporting Services SharePoint mode in SQL 2012. Use SharePoint Central Administration to configure a report server in SharePoint mode.
    The configuration steps for this version you need to do in Reporting Services Configuration Manager and In Central Administration, please see the following articles:
    2008 R2:
    http://technet.microsoft.com/en-us/library/bb283190(v=sql.105).aspx
    http://sharepointtaskmaster.blogspot.in/2010/11/intergration-reporting-service-with.html
    2012:
    http://technet.microsoft.com/en-us/library/47efa72e-1735-4387-8485-f8994fb08c8c
    Hope this helps.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Display PDF file in the Apex query report using HTML Expression

    Hi Folks,
    I have PDFs stored in BLOB columns along with FILE_ID column in the database.
    I want to display these to the APEX user on the page at runtime.
    I have created a SQL Query report page to display FILE_ID column.
    I am using HTML Expression property of the FILE_ID column to pull the image from the table using PROC_DISPLAY_DOCUMENT procedure.
    I typed folowing code int the HTML Expression text area of the FILE_ID column of the report page :
    <img src="#OWNER#.proc_display_document?p_id=#file_id#"/>
    I am using following Procedure code:
    create or replace procedure "PROC_DISPLAY_DOCUMENT"(p_id number) as
    s_mime_type varchar2(48);
    n_length number;
    s_filename varchar2(400);
    lob_image blob;
    Begin
    select MIME_TYPE,dbms_lob.getlength(blob_content),file_name,blob_content
    into s_mime_type,n_length,s_filename,lob_image
    from tbl_upload_file
    where file_id = p_id;
    owa_util.mime_header(nvl(s_mime_type, 'application/octet' ),false);
    --set the size so the browser knows how much it will be downloading
    htp.p( 'content-length: '|| n_length );
    --The file name will be used by the browser if the users does a "save as" 
    htp.p( 'content-Disposition: filename="' || s_filename ||'"');
    owa_util.http_header_close;
    --Download the BLOB
    wpg_docload.download_file( lob_image );
    exception
    WHEN NO_DATA_FOUND THEN
    RAISE_APPLICATION_ERROR(-202121,'Record matching screenfield filename not found, PROC_DISPLAY_DOCUMENT.');      
    end;
    --This is very Important
    --grant execute on PROC_DISPLAY_DOCUMENT to public;
    This code does not work and report does not display PDF image.
    Any help to troubleshoot this code will be appreciated.
    Thank you in advance.
    Jaya

    Hi Dimitri,
    I hope you can see HTML Expression code now. Thank You for responding.
    I have PDFs stored in BLOB columns along with FILE_ID column in the database.
    I want to display these to the APEX user on the page at runtime.
    I have created a SQL Query report page to display FILE_ID column.
    I am using HTML Expression property of the FILE_ID column to pull the image from the table using PROC_DISPLAY_DOCUMENT procedure.
    I typed folowing code int the HTML Expression text area of the FILE_ID column of the report page :
    [!--  img src="#OWNER#.proc_display_document?p_id=#file_id#" ]
    I am using following Procedure code:
    create or replace procedure "PROC_DISPLAY_DOCUMENT"(p_id number) **
    mimetype varchar2(48);
    n_length number;
    s_filename varchar2(400);
    lob_image blob;
    Begin
    select MIME_TYPE,dbms_lob.getlength(blob_content),file_name,blob_content
    into s_mime_type,n_length,s_filename,lob_image
    from tbl_upload_file
    where file_id = p_id;
    owa_util.mime_header(nvl(s_mime_type, 'application/octet' ),false);
    --set the size so the browser knows how much it will be downloading
    htp.p( 'content-length: '|| n_length );
    --The file name will be used by the browser if the users does a "save as"
    htp.p( 'content-Disposition: filename="' || s_filename ||'"');
    owa_util.http_header_close;
    --Download the BLOB
    wpg_docload.download_file( lob_image );
    exception
    WHEN NO_DATA_FOUND THEN
    RAISE_APPLICATION_ERROR(-202121,'Record matching screenfield filename not found, PROC_DISPLAY_DOCUMENT.');
    end;
    --This is very Important
    --grant execute on PROC_DISPLAY_DOCUMENT to public;
    This code does not work and report does not display PDF image.
    Any help to troubleshoot this code will be appreciated.
    Thank you in advance.
    Jaya

  • How to call stored procedure with multiple parameters in an HTML expression

    Hi, Guys:
    Can you show me an example to call stored procedure with multiple parameters in an HTML expression? I need to rewrite a procedure to display multiple pictures of one person stored in database by clicking button.
    The orginal HTML expression is :
    <img src="#OWNER#.dl_sor_image?p_offender_id=#OFFENDER_ID#" width="75" height="75">which calls a procedure as:
    procedure dl_sor_image (p_offender_id IN NUMBER)now I rewrite it as:
    PROCEDURE Sor_Display_Current_Image(p_n_Offender_id IN NUMBER, p_n_image_Count in number)could anyone tell me the format for the html expression to pass multiple parameters?
    Thanks a lot.
    Sam

    Hi:
    Thanks for your help! Your question is what I am trying hard now. Current procedure can only display one picture per person, however, I am supposed to write a new procedure which displays multiple pictures for one person. When user click a button on report, APEX should call this procedure and returns next picture of the same person. The table is SOR_image. However, I rewrite the HTML expression as follows to test to display the second image.
    <img src="#OWNER#.Sor_Display_Current_Image?p_n_Offender_id=#OFFENDER_ID#&p_n_image_Count=2" width="75" height="75"> The procedure code is complied OK as follows:
    create or replace
    PROCEDURE Sor_Display_Current_Image(p_n_Offender_id IN NUMBER, p_n_image_Count in number) AS
        v_mime_type VARCHAR2(48);
        v_length NUMBER;
        v_name VARCHAR2(2000);
        v_image BLOB;
        v_counter number:=0;
        cursor cur_All_Images_of_Offender is
          SELECT 'IMAGE/JPEG' mime_type, dbms_lob.getlength(image) as image_length, image
          FROM sor_image
          WHERE offender_id = p_n_Offender_id;
        rec_Image_of_Offender cur_All_Images_of_Offender%ROWTYPE;
    BEGIN
        open cur_All_Images_of_Offender;
        loop
          fetch cur_All_Images_of_Offender into rec_Image_of_Offender;
          v_counter:=v_counter+1;
          if (v_counter=p_n_image_Count) then
            owa_util.mime_header(nvl(rec_Image_of_Offender.mime_type, 'application/octet'), FALSE);
            htp.p('Content-length: '||rec_Image_of_Offender.image_length);
            owa_util.http_header_close;
            wpg_docload.download_file (rec_Image_of_Offender.image);
          end if;
          exit when ((cur_All_Images_of_Offender%NOTFOUND) or (v_counter>=p_n_image_Count));
        end loop;
        close cur_All_Images_of_Offender;
    END Sor_Display_Current_Image; The procedure just open a cursor to fetch the images belong to the same person, and use wpg_docload.download_file function to display the image specified. But it never works. It is strange because even I use exactly same code as before but change procedure name, Oracle APEX cannot display an image. Is this due to anything such as make file configuration in APEX?
    Thanks
    Sam

  • Report on Leave request (with HTML ) using ITS version

    we are using ITS version of ESS and MSS version EP 6.0 and SAP R/3 5.0.
    Our client wants a report on Leave Request(with HTML). the worflow used is WS20000081. my question is there any standard report to check the Leave Request which are approved or rejected. In SAP there is one standard report
    RPTARQDBVIEW where in when we execute no output exists.
    Please help me whether is there any report to view the leave requests.
    Regards
    Santosh Ghanwar

    Dear Claude;
    Thanks for your kind assistance... I was out for sometime & got up in some other urgent tasks...
    Sorry for delay...
    I had created the loop Payroll? with following conditions
    &Employee.ControlRecordState&     =          1     or
    &Employee.ControlRecordState&     =           2     or
    &Employee.ControlRecordState&   =          3     or
    &Employee.ControlRecordDate&     <           %Current Date%         
    but result is always "True"
    Please help me out...
    Best Regards,

  • Custom Rowtype Template with apex.widget.report.sort() - does this work?

    Hi Folks!
    I have a report with a custom rowtype template (3 rows for each dataset) and I have fiddeled around with the build-in javascript sorting-function. (Cause as it seems you can't use the standard sorting functionality on custom rowtemplates.) I came up with a short solution, but I would like to know how safe this is.
    Setup very simple:
    The Header-Template [before rows]
    <table id="myDomId">
        <thead><tr>
            <th><a href="javascript:sortCol(1)">Col1</a></th>
            <th><a href="javascript:sortCol(2)">Details</a></th>
            <th><a href="javascript:sortCol(3)">Col3</a></th>
        </tr></thead>
    Then the javascript handling runs like that:
    var qmmSorter = {};
    $(function(){
       setupSorters();
    function setupSorters(){
        qmmSorter.DomCatch = /\d+/.exec($('#myDomId>div').attr('id'))[0];
        qmmSorter.lastCol = 1;
        qmmSorter.asc = true;
    function sortCol(colnum){
    //console.log(colnum);
        if (qmmSorter.DomCatch) {
            qmmSorter.lastCol = colnum;
            qmmSorter.asc = !qmmSorter.asc;
            javascript:apex.widget.report.sort( qmmDomCatch,'fsp_sort_'+colnum + ( qmmSorter.asc ? '' : '_desc') );
    Maybe I'll also add some arrows to indicate what sorting took place. Tested so far in IE9 and Moz - all we really use in our internal network.
    But this seems all a bit just too easy. so I'd be really thankful for your comments.
    Tanks and greetings,
    Tobi

    TobiP wrote:
    But this seems all a bit just too easy. so I'd be really thankful for your comments.
    It would be even easier to use column header substitution and retain the built-in sort functionality (although this includes the sort direction image bug).
    <table id="myDomId"> 
      <thead><tr>
        <th>#1#</th>
        <th>#2#</th> 
        <th>#3#</th> 
      </tr></thead>

  • Display issue with HTML formatted text in report builder

    I am using the FCKeditor in my application to allow endusers
    the ability to create formated text on reports. We curently are
    experiencing 2 issues: 1. If you copy and paste from MS Word
    2003/2007 it will not display the text correclty in the report; 2.
    If you use the FCKeditor toolbar to insert bullets or a numeric
    list it will not align the text correctly on the report. We are
    using Coldfusion 8 with Hotfix 1 and Coldfusion Report Builder's
    lastest build release.
    Has one experiences this same issue with HTML fields not
    printing correctly using the Report Builder? What other HTML
    editors besides FCKeditor might we use?
    Thanks,
    Dan VanWieren

    Can you tell me how to use </td> for each values
    Give me your example report - using before or after report
    Thanks
    MT
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by fdenis:
    Hi Gavin,
    If I understand well, your HTML tags are coded directly in your fields in the database, right? Because if it was not the case, you could have use a format trigger checking for which destination you're generating your report...
    if UPPER(:DESFORMAT) = 'HTML' or
    UPPER(:DESFORMAT) = 'HTMLCSS'
    then
    -- insert your HTML code in the value
    -- of your field. something like...
    newValue := '<B>' | | :YOUR_FIELD | | '</B>
    srw.set_field_char( 0, newValue );
    else
    -- when generating to other format,
    -- you'd have to add the formatting as
    -- you want.
    end if
    return( true );
    Of course, if it's not acceptable to remove the HTML tag from your database fields, you could develop a procedure that would translate your HTML tags to the good formatting (eurk... ;-)
    Good luck... :-)
    Frederic
    <HR></BLOCKQUOTE>
    null

  • Interactive report and HTML Expressions

    Currently I am using standard reports showing some icons using expression like:
    <img src="f?p=&APP_ID.:&APP_PAGE_ID.:&SESSION.:APPLICATION_PROCESS=ShowIcon:::F105_BILD_ID:#GUI_ID#">
    I would like to recreate my page using the interactive report capabilities from APEX 3.1. I couldn't find the column formatting section in the interactive report however.
    How can I reproduce the current icons showing behaviour using an interactive report ?
    Thanks for help
    Valéry

    Hello Valery,
    You don't have the HTML Expressions section in an Interactive Report.
    However what you can do is include your img tag in your select statement directly. So you would have something like
    SELECT '<img src="f?p='||:APP_ID||':'||:APP_PAGE_ID||':'||:SESSION||':APPLICATION_PROCESS=ShowIcon:::F105_BILD_ID:'|| gui_id || '">' as col1
    FROM your_table
    Make sure your IR column is set to standard column and not Text.
    That should do it.
    Regards,
    Dimitri
    http://dgielis.blogspot.com/
    http://www.apex-evangelists.com/
    http://www.apexblogs.info/

  • Report sort by column header question

    the column sort in a standard report (RP or Q) does sort the lower case values at the end of the alphabet; how can I integrate the lower case values in to the regular sequence of the alpha letters ?
    Example of desc order: it starts with lower case :
    ülog Company
    swa Company
    mobiler AG
    freezer.net
    dpa Company (*)
    ZKL Company
    Warner Music
    Victors
    United Internet
    Echo
    Dora Co.
    Charly
    Berta Co.
    ABC company
    - as I cannot influence the Sorting of the inbuilt sort mechanism - how can I manage to integrate e.g. dpa (*) between Echo and Dora Co. ?
    TIA
    Bernhard

    Bernhard,
    use the INITCAP() function for that column (a). Fetch the same column once again without
    using the INITCAP function and hide it (b). In the properties of the column a ==> HTML
    Expression enter #b# in order to display column b. This way the column will display the text
    as is (b) but sort on capital initial letters (a).
    However, using a standard report doesn't allow any modification of the columns within the
    query. There, you would need a view to query upon. Or you just use a "normal" report.
    Denes Kubicek

  • HTML Expression - condition

    I have a search page with a report region showing top 10 departments.
    The query I have used is :
    select deptno, count(empno) countv
    from emp
    WHERE rownum < 11
    GROUP BY deptno
    order by deptno desc
    If the count = 1, then clicking on the column(link), I would want to goto the details page, If the count >1 then I want to display the search list in the same page. The user would then click appropriate row to go to details page.
    I tried creating using HTML expression, but URL can point to only one page - how do I specify the condition in html expression?
    Is there any other way I can achieve this?
    Thanks,

    Apart from your link - problem : This query will not guarantee to deliver the top 10 departments...beceause the where is evaluated before the group and order by. You should use a in line view to solve this.
    Roel

  • Bug? - Submitting page with html name attribute in content

    Hello,
    I use a modified version of Task Manager to track tasks in my group at work. I wanted a "non-standard" report to show the users the history of their task at the bottom of a page. Basically I created a PL/SQL function that returns preformatted HTML as I would like it to be displayed in a row of the report. The end result is great - a highly customized report layout with little effort.
    The problem is that recently a user copied and pasted some HTML from another web application into the body of a task and saved it. The next time the task was opened my report at the bottom displayed what they had entered previously. However, this time when the user clicked save and submitted the page, he got a page can not be displayed error. After a little digging, I found that the HTML the user had pasted previously contained an HTML element that had a name attribute. When I removed the name attribute, the page submitted fine which leads me to believe that the ApEx engine tried to bind the value of that item with an application item and it choked when no match was found - similar to the way it chokes if you submit a valid item that contains more than 32767 bytes of information.
    The fix for my situation is simple. I'll use regular expressions to find these name attributes when saving the page and strip them out. I only bring it up because it could possibly effect other users that might not be able to figure out what the problem is.
    Regards,
    Dan
    http://danielmcghan.us
    http://sourceforge.net/projects/tapigen

    Dan,
    Part of the data stream being emitted to the page is:
    < input type="hidden" name="_ctl0:_ctl34:_ctl0:dgCriteria" value="_ctl0:_ctl34:_ctl0:dgCriteria" ...
    Since your report does not escape the data, it gets interpreted by the browser as HTML -- a form input item in this case. And yes, modplsql complains because that name cannot be bound to a PL/SQL input parameter in the form-handling procedure.
    The correct way to handle this generic problem (second-order cross-site scripting) is to always escape output to the browser unless you control the content from origin to the time it is emitted.
    Scott

Maybe you are looking for

  • Strange problem in XI 3.0 cluster mode

    Hi    We are running two instances of XI 3.0  SP 23 ( one central and an additional instance ) and in one of our file receiver - adapter type scenarios, we write an xml file, and invoke a post processing shell script that adds a statis header line to

  • How to read multiple files in the same folder?

    Suppose I have 100 txt files in the same folder, and I want to read them one by one. (order is not important). File name is also part of the information I want. How to do that? Thanks

  • Flash Training Videos ?

    I just would like to know why training videos like the ones on Lynda.Com for Adobe Products are in Apple Quicktime format and not In Adobe Flash format ? Thank for any infomation you can give me. Scott

  • Export DataGrid to Excel

    Hello, I populated a datagrid using a query. Now I want to export the content of the datagrid to Excel. Is this possible? I don't want to use the query to Export to Excel. I want to Export from the datagrid itself. Anyone has an idea how to export my

  • Am i able to get a credit for an error purchase?

    I bought the clean version of Nicki's new album the Prink Print.  I would like to know if I am able to switch it for the other version?