Displaying AJAX refreshed report regions

Hi,
Following on from my GetAsync help yesterday I have another question. The next part of the puzzle is I have a tree on the left hand side of the page which, when a node is clicked, causes two reports on the right hand side of the page to refresh. If I use the method described in John's Pro Apex book that works fine.
However what I would ideally like to be able to do is use the GetAsync method again to allow the browser to remain responsive when a node in the tree is clicked. So far I can either insert the whole page into the div - it works, but isn't exactly elegant, or get an XML document from an application process - but this only displays something like "object: [XML document]" (not exact, I don't have it to hand).
I have a feeling I've been looking at this too long, I've looked at trying to insert XML with XSL for formatting but haven't yet got that working (again a complete newbie to XML/XSL pretty much which is probably why...), other options I can think of are traverse the XML document and, with javascript, create a table in the DIV (doesn't feel right), or somehow an adaptation of John's method whereby I somehow traverse the DOM grabbing the content between the BOX_BODY tags.
Any suggestions/ideas gratefully received!
Many thanks,
Gareth.

Ben,
Haven't tried implementing this either but how about:
- you have 5 regions on a page, 1 for each report
- these regions each contain nothing but a div in each case
- each div initially contains nothing but a "Loading..." animation/images/whatever
- You have 5 other pages, each of which are based on a blank page template
- each page contains one report region
- when your original page loads, you kick off 5 asynchronous ajax requests to these other 5 pages
- when the the asynch request completes (i.e. when each page has loaded) you replace the contents of the relevant div (the "loading..." animation) with the contents of the other apex page you have just retrieved with ajax.
I think that should work.
Or, for more flexibility, you could make Application Processes which generate the HTML for each of your required reports. You could then call these via the Ajax requests instead of calling the 5 new Apex pages. (This would mean that the reports are far less easily changeable, however.)
Andy

Similar Messages

  • Error when refreshing report region: ORA-20876: Stop APEX Engine

    I'm using Apex 4.2. On click of a button, I refresh 2 Standard Region Reports with a Dynamic Action. This dynamic action has been working without problems for WEEKS and all of a sudden i'm getting the ORA-20876: Stop APEX Engine error when I click the button.
    In the dynamic action, I removed the refresh of the second report and now the error does not occur. If I add the second refresh action back in, it throws the above error. I've even tried making the second report identical to the first and the refresh action fails. I don't understand why this is failing on the second refresh action since the second report & region is IDENTICAL to the first report now.
    Please help!
    Thanks,
    John

    I would use something like firebug to see how the AJAX call for the refresh is working. I would want to see what is begin posted and what's being returned from the call.
    That should shed some light on the issue.
    THanks
    -Jorge

  • How to find orientation of  image displayed in a report region

    Hello,
    I have Apex 3.1 application showing an image in a report.
    The images are held as files on the web server and filename and description held in a database table
    I can use SQL to retrieve the data into report columns and then HTML expression to display the image as a fixed size as shown below. This works fine for landscape pictures but obviously distorts portrait ones.
    I wanted to check the orientation of the image and adjust width and height if portrait. I was considering using javascript to get image.height and image.width but am not sure how to reference the column and feed back into the HTML expression.
    Is this this the best approach and any help how to reference the column would be appreciated
    Many thanks
    Colin
    The Report Region Source is -
    select      "PHOTOFILE"."FNAME" as "FNAME" ,
    "PHOTOFILE"."ID" as "ID",
    "PHOTOFILE"."DESCRIPTION" as "DESCRIPTION",
    "PHOTOFILE"."FNAME" as "IMG2"
    from      "PHOTOFILE" "PHOTOFILE"
    where id=:P4_IMAGE_IDColumn Attributes IMG2
    Column Formatting
    HTML Expression
    <B><I><U><font face="verdana size="16"><center> #DESCRIPTION# </I></U>
    <font face="verdana size="20">&P4_DESCRIPTION.
    </B></center></font>
    <br/>
    <img src="#IMG2#" width=600 height=400  >

    This example may help you, although a bit different from what you want to achieve:
    http://apex.oracle.com/pls/otn/f?p=31517:212
    The point was:
    1. display image region should be fixed size (300px wide and 300px height)
    2. if the image size is bigger than that, the region should expand automaticaly.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • Problem Refreshing Report Region

    I have a Report Region, based on a SQL Query. It works fine, and returns the records Queried.
    My problem, is that it is not Refreshing, after page Refresh. I even tried Logiing out, and then back in. In my latest attempt, I deleted ALL the records, logged out, and then back in. The prior Report Results were still there. It seems like it is Cached somewhere. The Caching is set to Not Cached.
    I am stumped.
    Please give me advice. Thanks!

    I have seen that only when I thought my query is selecting from a particular table but that wasn't the case. You could create an empty copy of your table and replace the original one in the sql just to see what happens.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • Getting columns alone to be displayed in the report region

    Hi Gurus,
    Is there any way to bring the columns alone in a report??
    Or
    By clicking a button an excel file should open????
    Please any guide in this respect is greatly appreciated
    Thanks in advance
    kavitha

    You can use a PL/SQL region for that. This example is working for the theme 10 and you could adjust it as needed:
    BEGIN
       HTP.prn
          (   '<table cellpadding="0" border="0" cellspacing="0" '
           || '<tr><td><table cellpadding="0" border="0" cellspacing="0" summary="" class="t10Standard">'
       FOR c IN (SELECT column_name
                   FROM user_tab_columns
                  WHERE table_name = 'EMP')
       LOOP
          HTP.prn (   '<th class="t10ReportHeader" id="'
                   || c.column_name
                   || '_NAME">'
                   || c.column_name
                   || '</th>'
       END LOOP;
       HTP.prn ('</table></table>');
    END;Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
    -------------------------------------------------------------------

  • SQL Report Region

    Hi,
    I am using apex 4.0.1 and I have a page with several SQL Report regions. The user can edit the data in the report regions by clicking a column that uses a href link to open a DML page in a modal window. The user can then amend some data in the modal window, press save which closes the modal window and uses the partial page refresh process to refresh the SQL report region. (Using apex.event.trigger('#SOME_REGION'),'apexrefresh')).
    If I navigate through the report to show rows 31-45 and then click on a href to edit a record. On pressing save, the report is refreshed but the rows displayed goes back to 1-15.
    How can I get the report to stay showing the rows 31-45?
    Cheers
    Paul.

    I believe this answers my question
    http://monkeyonoracle.blogspot.com/2010/11/refresh-report-region-and-pagination.html
    Edited by: pjturley on Jan 10, 2012 1:14 PM

  • Print out of Report Region dropping negative values

    I am very new to APEX (< 2 months) and don't have much of a programming background. I have created a report layout using BI publisher and made it available as a shared component in my APEX applicaiton. When I print the the report region, most of the data displays fine on the print out, but any amounts with negative values are suppressed. I can view the negative amounts just fine when they are displayed on the report region itself.
    It took me quite a while to get the style sheets from BI Publisher to work with APEX. I thought the two were supposed to be compatible. Does anyone know how to resolve the issue above or if their are any known compatability issues between BI Publisher and APEX? We are on APEX version 4.2.1.00.08 and BI Publisher version 11.1.1.

    This was indeed a bug. Response from Oracle:
    This issue has been noted by development as a bug and I have file bug 16224878 regarding your issue. The issue explained by development pertains numeric format string which wraps the negative value in angle brackets: < val > , and the report is treating this as a HTML tag and filters it out. It looks like this is happening only for classic report regions, i.e. report queries seems to support this type of numeric format mask.
    A work around would be to turn off printing for the classic report region and to provide a button to a report query for printing, using the same SQL for the report query as is used for the report region. Alternatively you could also use a different format mask.

  • Image size display in a report

    Hi EVERYONE,
    I have a page where user can upload images. I am storing the images in a BLOB field. I can also display images in a report.
    Now my question is, how can i reduce the size of the image when I am displaying them. I dont necessarily want to reduce the file size, I just need to display it in smaller size.
    Is this possible
    Thanks

    Hi user585397,
    resizing an image can be done with styling information. Depends on how you render the images on the screen. But let's have a look at the sample application, page with products shows the images. the query for this is:
    select p.product_id edit_product
    , p.product_id view_product_id
    , p.product_name
    , p.product_description
    , p.category
    , p.product_avail
    , p.list_price
    , '&lt;img src="p?n=' || nvl(i.file_object_id,0) || '" height="50" width="50" /&gt;' img
    from demo_product_info p
    , demo_images i
    where p.image_id = i.image_id (+)
    Here an html-image-tag is created, specifing the heigth and width for displaying the image. This would be one way of doing so.
    another way is like on page 6 of sample application, where the html expression for column formatting is used for displaying an iamge (report region, column image_name)
    &lt;div style="text-align:center;"&gt;
    &lt;img src="p?n=#FILE_OBJECT_ID#" height="50" width="50" /&gt;
    &lt;/div&gt;
    Hope this helps a bit
    Simon

  • Partially refresh the sql report region by clicking the region selector tab

    Hi,
    In my page i have a region display selector tab. This region selector tab contain show all,booking,service,.. etc. when i click the booking tab,sql report region will appear. My intention is when i click the booking tab i want to refresh that region partially to display the record according to sql query in that region source of report region.
    how to do this?
    skud.

    KevinFitz wrote:
    The report region being displayed is conditional on P2_QUERY item being NOT NULL. I assume the region not appearing is because the Action for the Select List Item is set to None and so P2_QUERY is always NULL.
    No, the region is not appearing because it is conditional on P2_QUERY being NOT NULL. This means that the report region never exists on the page shown in the browser, so it can't be dynamically refreshed. (Dynamic refresh doesn't evaluate region conditions, and it only re-renders the report content, not the entire region.)
    Remove the condition on the report region, check the refresh is working, then reconsider exactly what the requirements here are. If you want the region to appear only when P2_QUERY has a value, and you want it to be refreshed without submitting and re-rendering the page, then the region needs to be hidden rather than conditionally rendered, and shown via a dynamic action when P2_QUERY gets a value.
    I tried adding an additional Set Value True Action for the DA event but got an error as listed above,
    All irrelevant if Page Items to Submit on the region is used properly.

  • Refresh PL/SQL Report Region (not Page) using Select List value

    Hi,
    I've got a report region based on a 'PL/SQL function body returning a SQL query'which gets generated on selecting a value from a Select list item, The Select List action is 'Redirect and Set value' but this causes the whole page to refresh rather than just the report region. I've tried to refresh the report only using a dynamic action on the Select List item (Action now reset to  'None') but now the report is not appearing on choosing from the List. Can anyone suggest a solution that will allow me to refresh this report without refreshing the page? I am using APEX 4.2.2 and the report syntax is as follows:
    DECLARE
      v_statement VARCHAR2(500);
    BEGIN
      SELECT query_text
        INTO v_statement
       FROM sql_queries
       WHERE query_id = :P2_QUERY ;
       RETURN v_statement ;
    END ;
    where P2_QUERY is Select List Item,
    regards,
    Kevin.

    KevinFitz wrote:
    The report region being displayed is conditional on P2_QUERY item being NOT NULL. I assume the region not appearing is because the Action for the Select List Item is set to None and so P2_QUERY is always NULL.
    No, the region is not appearing because it is conditional on P2_QUERY being NOT NULL. This means that the report region never exists on the page shown in the browser, so it can't be dynamically refreshed. (Dynamic refresh doesn't evaluate region conditions, and it only re-renders the report content, not the entire region.)
    Remove the condition on the report region, check the refresh is working, then reconsider exactly what the requirements here are. If you want the region to appear only when P2_QUERY has a value, and you want it to be refreshed without submitting and re-rendering the page, then the region needs to be hidden rather than conditionally rendered, and shown via a dynamic action when P2_QUERY gets a value.
    I tried adding an additional Set Value True Action for the DA event but got an error as listed above,
    All irrelevant if Page Items to Submit on the region is used properly.

  • How to show refreshed modal window(2nd report region window) - reposting

    Hi,
    I have a requirement where i scroll thru different rows in grid region.
    Moment I tab out from first row, I pop up 2nd report, where I show related detailed data lines for the tabed out line of first grid.
    So my 2nd window is a report region query, whose 'where' clause contains the primary key from the row of first grid window.
    On tab out of a row of first window, I have a javascript function, which shows 2nd report region using:
    var mywindow =
    window.showModalDialog
    ('http://MY-URL-/ebus/apexQA111/f?p=&APP_ID.:25:&SESSION.',myObject,'dialogWidth=800px;dialogHeight=300px;dialogLeft:50;dialogTop:50');
    Problem:
    On First tab out, I get the correct data display on 2nd window, which is related to current tabbed out row.
    However, If I tab out from next record, modal window pops up and it still shows my detailed data of first tabbed out row.
    Somehow the 2nd window is not getting refreshed/recalculated based on my new tabbed out row. I only have showmodaldialog in my JS function.
    Anyway to refresh the window based on new values of the where clause variable? and then showing the window?
    Please help!!
    Regards,
    Ravi.
    Edited by: Rave on Nov 26, 2009 6:15 AM

    Hi Rave,
    You can refresh any window with the java script below, just make it conditional on the value of an item within your page so that it dose not run every time the page is loaded.
    if ($v('P1_MY_ITEM') === 'foo' ) {
    window.location.href = document.location.href;
    }

  • DA refresh 2 report regions

    Hello All,
    I have a DA that refreshes 2 report regions ( SQL query) . This works perfectly fine in 4.0.1.
    However when I import it to 4.0.2 , just one region refreshed while the other fails.
    Appreciate any guidance in figuring out the issue here
    Details of DA :
    Event : change
    Selection type : Item
    Item : hidden item whose value is used in where clause
    True Actions :
    1) Execute PLSQL to submit the hidden item
    2) Refresh report1
    3) Refresh report2
    APEX version : 4.0.2.00.07
    Thanks,
    RD
    Edited by: RD on Jan 16, 2012 4:45 PM

    Hi RD,
    you could use Firebug for Firefox (on the Console you will see the AJAX calls) or the Developer Toolbar of Google Chrome to check if all 3 AJAX calls are executed and what you get in the response. I think that should help you to track down why it's working on one machine but not on the other. Please also have a look at the actual response in the AJAX calls if it's useful data.
    Regards
    Patrick
    My Blog: http://www.inside-oracle-apex.com
    APEX Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

  • Dynamic action with interactive report region refresh

    Hi!
    I'm using APEX 4.02
    I've got a page with 2 regions.
    Region1 is a (input) form
    Region2 is an interactive report on the same table as region 1
    When entering values on the form I'm trying to dynmically lookup similar records in the table with the interactive report.
    I've made a dynamic action on the change of the form fields which should refresh the interactive report region. I can see this one fires if I add a alert to debug if it fires.
    The dynamic report is based on a query with bind variables pointing to the form fields, for example
    where
    field1 = :P2_FIELD1
    This works great on the page load, so no dynamic action is fired but I can see the rows in the report region are the ones I am looking for.
    But the refresh of the report region is not working, it is never refreshing and/or showing the correct data after a change of the form fields, so it looks like the dynamic action "refresh region" is not working on the interactive report.
    Any ideas why this can go wrong ?
    I would like to solve this using standard dynamic actions and preferrably not via PL/SQL or JS, shoudl be possible if I should believe the documentation... ;)
    Cheers
    Bas
    Edited by: bklerk on 26-apr-2011 3:07

    Hi,
    When you change value to item, I assume you do not set value to session state.
    Use interactive report advanced attributes "Page Items to Submit" , set items session state before report is refreshed.
    http://download.oracle.com/docs/cd/E17556_01/doc/user.40/e15517/app_comp.htm#sthref1235
    Similar post/issue here
    Hide and show region - hides on refresh
    Regards,
    Jari

  • Conditional display in a SQL-Report/Report Region

    Hi,
    here I have an example for "Conditional display in a SQL-Report/Report Region". I figured it out in Firefox 3.6.2 using Firebug as development tool on Apex 3.2.1.00.12.
    First you have to put the following javascript code in the Page HTML-Header:
    <script type="text/javascript">
    <!--
    // SOURCE
    // W:\oracle\PRJ DWLS\javascript.07.js
    // Beispiel Funktion zur bedingten Formatierung einer Tabellenzelle.
    // Help (Substitution Strings):
    // http://htmldb.oracle.com/pls/otn/wwv_flow_help.show_help?p_lang=de&p_session=2412201185523196&p_flow_id=4003&p_step_id=420,4003
    // HTML Expression:
    // <script>ex_conditional_td('R094260001010', #ROWNUM#, #COLNUM#-1);</script>#DFT_COND1#
    function ex_conditional_td
    ( p_id
    , p_rownum
    , p_cellnum
      var l_td;
      l_td = vd_getColumn(p_id, p_rownum, p_cellnum);
      // hier die Bedingung definieren
      if (true) {
        l_td.style.color = '#808080';
    }  // -- eof ex_conditional_td -- //
    // Beispiel Funktion zum Abstellen der onMouse Funktionalität der Tabellenzeile
    // HTML Expression:
    // <script>ex_conditional_tr('R094260001010', #ROWNUM#);</script>#DFT_ID#"
    function ex_conditional_tr
    ( p_id
    , p_rownum
      var l_tr;    // TABLE.TR
      var l_td;    // TABLE.TR.TD
      if (true) {
        l_tr = vd_getRow(p_id, p_rownum);
        l_tr.onmouseover = null;
        l_tr.onmouseout  = null;
        for (var i=0; i<l_tr.cells.length; i++) {
          l_td = l_tr.cells;
    l_td.style.backgroundColor = '#DDDDDD';
    } // -- eof ex_conditional_tr() -- //
    var g_DEBUG = false;
    var g_TBODY = null;
    // Liefert das Body-Element der Tabelle mit der ID <p_id>.
    // Parameter
    // p_id - die Id der HTML-Tabelle
    // Return
    // das Body-Element oder NULL, wenn die Zeile nicht gefunden wurde
    function vd_getBody
    ( p_id
    if (g_TBODY == null) {
    var l_table = null;
    l_table = document.getElementById( p_id );
    if (l_table == null) {
    l_table = document.getElementByName( p_id );
    if (l_table != null) {
    if (vd_debug()) {
    alert("Tabelle gefunden, " + l_table.nodeName);
    g_TBODY = vd_search( l_table, 'TD', 't10data', 'TBODY');
    return g_TBODY;
    } // -- eof vd_getBody() -- //
    // Liefert die Zeile <p_rownum> der HTML-Tabelle mit der Id <p_id>.
    // Parameter
    // p_id - die Id der HTML-Tabelle
    // p_rownum - die Zeilennummer
    // Return
    // die Zeile oder NULL, wenn die Zeile nicht gefunden wurde
    function vd_getRow
    ( p_id
    , p_rownum
    var l_body = vd_getBody(p_id);
    if ( l_body != null
    && l_body.nodeName == 'TBODY'
    && l_body.children[p_rownum].nodeName == 'TR') {
    return l_body.children[p_rownum];
    else {
    return null;
    } // -- eof vd_getRow() -- //
    // Liefert die Spalte <p_column> der Zeile <p_rownum> der HTML-Tabelle mit der
    // Id <p_id>.
    // Parameter
    // p_id - die Id der HTML-Tabelle
    // p_rownum - die Zeilennummer
    // p_column - der Index der Spalte / Zelle
    // Return
    // die Zelle oder NULL, wenn die Zelle nicht gefunden wurde
    function vd_getColumn
    ( p_id
    , p_rownum
    , p_column
    var l_tr = vd_getRow(p_id, p_rownum);
    if ( l_tr != null
    && l_tr.nodeName == 'TR'
    && l_tr.children.length >= p_column
    && l_tr.children[p_column].nodeName == 'TD') {
    return l_tr.children[p_column];
    else {
    return null;
    } // -- eof vd_getColumn() -- //
    // Rekursives Suchen nach einem Node.
    // Zweck: Das bedingte Formatieren einer Tabellenzelle in einem Apex Standard
    // SQL-Report.
    // Diese Funktion durchsucht rekursiv, ab einem Ausgangsknoten <p_node>, alle
    // darunter befindlichen Elemente, ob in dem Element <p_seachIn> sich die
    // Klasse <p_class> befindet.
    // Bei Standard-Reports ist die Reportzelle (TD) mit der Klasse
    // "t10data" formatiert.
    // Zunächst muss dazu die Tabellenzelle (TD) selbst, die übergeordnete
    // Tabellenzeile (TR), der Tabellenbody (TBODY) oder die Tabelle (TABLE)
    // selbst ermittelt werden.
    // Der Beispielaufruf:
    // var l_body;
    // var l_node = document.getElementById( 'R112233' );
    // l_body = search( l_node, 'TD', 't10data', 'TBODY');
    // durchsucht also das mit der Id "R112233" versehene Element [der Report, für
    // den in Apex eine statischen ID vergeben werden musste] rekursiv, bis er
    // die [erste] Tabellenzelle "TD" findet, die als Klasse "t10data"
    // definiert hat. Für diese ermittelt er dann das übergeordnete TBODY-Element.
    // Parameter
    // p_node - das Ausgangselement
    // p_searchIn - der Knotenname, der durchsucht werden soll
    // [node.nodeName == p_searchIn]
    // p_class - der Name der CSS Klasse
    // [node.classList[<index>] == p_class
    // p_parentName - der Name [node.parentNode.nodeName == p_parentName]
    // des Elements, das zurückgeliefert werden soll. Wird als
    // p_parentName der Suchname p_searchIn angegeben, wird
    // das Element selbst zurückgegeben.
    // Return
    // das per p_parentName gesuchte Element (TD, TR, TBODY, TABLE)
    function vd_search
    ( p_node
    , p_searchIn
    , p_class
    , p_parentName
    var LN = "vd_search";
    var l_element = null;
    // DEBUG
    if (vd_debug()) {
    alert(LN + ":" + "Untersuche " + p_node.nodeName + ", id=" + p_node.id);
    // 1) der aktuelle Knoten ist der, der durchsucht werden soll
    if (p_node.nodeName == p_searchIn) {
    if (p_node.classList.length > 0) {
    for(var c=0; c<p_node.classList.length; c++) {
    if (p_node.classList[c] == p_class) {
    // Parent Node dynmisch suchen
    l_node = p_node;
    if (l_node.nodeName == p_parentName) {
    return l_node;
    while(l_node != null && l_node.parentNode != null) {
    if (l_node.parentNode.nodeName == p_parentName) {
    return l_node.parentNode;
    else {
    l_node = l_node.parentNode;
    // 2) wenn nicht 1) oder nicht in 1) gefunden, dann in den Kindelementen
    // weitersuchen
    if (p_node.children.length > 0) {
    var i = 0;
    while (i<p_node.children.length && l_element==null) {
    l_element = vd_search( p_node.children[i], p_searchIn, p_class, p_parentName);
    i++;
    return l_element;
    } // -- eof vd_search() -- //
    // Gibt an, ob Debug ein- (true) oder ausgeschaltet (false) ist.
    // Return
    // true - debug ist eingeschaltet
    // false - debug ist ausgeschaltet
    function vd_debug()
    return g_DEBUG;
    -->
    </script>
    Maybe you have to modify the "vd_getBody" function. I'm searching the table cell with having the class "t10data". When you use another theme, there's maybe another class used.
    Second is, that you set an static id for your report region. I prefer this structure:
    R<app-id><page-id><seq> (Raaaaappppsss) e.g. R094260001010.
    First example is to turn off the onMouse-Effect. Maybe on the first or last column definition you put this code in the "HTML-Expression" area:
    <script>ex_conditional_tr('R094260001010', #ROWNUM#);</script>#ID#This will call the example function ex_conditional_tr with the parameter
    a) the region id
    b) the rownum (as oracle always starts with 1 this is the first data row [rownum=0 is the table header row])
    Second example is the conditional formatting of a table cell. Put this in the HML-Expression area:
    <script>ex_conditional_td('R094260001010', #ROWNUM#, #COLNUM#-1);</script>#ENAME#This will call the example function ex_conditional_tr with the parameter
    a) the region id
    b) the rownum
    c) the cellnum (here we have to subtract 1 to get the "real" cell index)
    The "ex_conditional" functions are just a representation of how to get the row or cell node.
    Hope this help a bit.
    Tom

    I would use a CASE statement in the select....
    each CASE would be an img src tag for a different button if the button is an image.
    does that make sense? I can include an example if you would like...

  • SQL-01403 error reported in a Report Region when there is data to display

    I have a report region populated by a PL/SQL function body returning a SQL Query. When the region is displayed, "ORA-01403: no data found" is output when there should be rows displayed on the report. I see a lot of postings related to ORA-01403, but none seem to describe why this problem occurs or how to solve it.
    Here is the generated SQL query:
    SELECT DISTINCT entry_type, active_time, expire_time, facility, via, output_remarks, p_reports.f_get_to_positions (entry_id, NULL) pos FROM (SELECT 'RSTN' entry_type, active_time, expire_time, facility, via, output_remarks, entry_id FROM v_restriction_daily_all WHERE (entry_type in ('RSTN', 'APREQ', 'GS')) UNION ALL SELECT 'RSTN' entry_type, active_time, expire_time, facility, via, output_remarks, entry_id FROM v_restriction_daily_all WHERE (entry_type in ('RSTN', 'APREQ', 'GS')) UNION ALL SELECT 'RSTN' entry_type, active_time, expire_time, facility, via, output_remarks, entry_id FROM v_restriction_daily_all WHERE (entry_type in ('RSTN', 'APREQ', 'GS')) UNION ALL SELECT 'APERQ' entry_type, active_time, expire_time, facility, via, output_remarks, entry_id FROM v_apreq_daily_all WHERE (entry_type IN ('APREQ', 'RSTN')) UNION ALL SELECT 'GS' entry_type, active_time, expire_time, facility, via, output_remarks, entry_id FROM v_apreq_daily_all WHERE (entry_type IN ('GS', 'RSTN')) UNION ALL SELECT entry_type, active_time, expire_time, facility, via, output_remarks, entry_id FROM v_edct_daily UNION ALL SELECT entry_type, active_time, expire_time, facility, via, output_remarks, entry_id FROM v_runway_daily UNION ALL SELECT entry_type, active_time, expire_time, facility, via, output_remarks, entry_id FROM v_deicing_daily UNION ALL SELECT entry_type, active_time, expire_time, facility, via, output_remarks, entry_id FROM v_delay_daily UNION ALL SELECT entry_type, active_time, expire_time, facility, via, output_remarks, entry_id FROM v_swap_daily UNION ALL SELECT entry_type, active_time, expire_time, facility, via, output_remarks, entry_id FROM v_sua_daily UNION ALL SELECT entry_type, active_time, expire_time, facility, via, output_remarks, entry_id FROM v_information_daily UNION ALL SELECT entry_type, active_time, expire_time, facility, via, output_remarks, entry_id FROM v_outage_daily ) WHERE (active_time BETWEEN TO_DATE (:G7_LOCAL_MIDNIGHT, 'YYYYMMDDHH24MI') AND TO_DATE (:G7_LOCAL_MIDNIGHT, 'YYYYMMDDHH24MI') + 1)
    I am using version 1.6.0.00.87.
    Please advise. Thanks.

    Create a summary column (lets say "CS_TotalRecords") at report level, and set the following properties:
    Function: Count
    Source: column which can not be null (if report displays some data)
    Reset At: Report
    Create a format trigger at most outer frame (the frame you want to hide and all object within that), and write following code:
    BEGIN
    IF NVL(:CS_TotalRecords,0) = 0 THEN
    RETURN (FALSE);
    END IF;
    RETURN (TRUE);
    END;
    Hope this helps.

Maybe you are looking for