Legend in report region

What is the best way to display a report "legend" in a report region? A (optionally) color coded list of codes and their values like "M - Male", "F - Female", etc.
Thanks

Don't forget that shortcuts can be used in some places, like HTML Regions with Shortcuts or in item labels and in templates. To use a shortcut, create it as a shared component, e.g., MYSHORTCUT, and reference it in the HTML as "MYSHORTCUT" with the double-quotes. When you create the shortcut, you can choose from several types, including a PL/SQL Function Body that can return whatever text (HTML) you need.
Scott

Similar Messages

  • 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

  • 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

  • Report Region show all rows?

    Hi,
    I have a report region in which I want to show all rows. Setting the pagination scheme to No Pagination doesn't
    seem to do the trick. I have set Number of Rows and Maximum Row Count both to NULL. Nothing seems to work.
    Is there some trick to get all rows to be displayed?
    Thanks in advance!

    Hi,
    I have two report regions on different pages. On both I have set 'Number of Rows' and 'Maximum Row Count' to null. One report will return all the records in a query (~800), the other report will only return 500. I can't see any other differences in the reports that would cause this behaviour.
    I didn't really want to restrict my reports to a set number of rows, is this really the only option?
    Thanks,
    Rochelle.
    Edited by: Rochelle K on Nov 5, 2009 10:13 AM

  • Performance issue for Report Regions

    We have an app which has as it's "Home Page" a portal-style page. The "portlets" are separate regions. Some of these regions are HTML forms, but most are report regions, invariably with PL/SQL returning the SQL query.
    On our dev box this portal renders fine, in no more than 5 seconds (acceptable). On the production box a couple of the portlets go crazy, usually taking between 1-2 minutes each. I know this because I added the #TIMING# string to each region footer. The portal page has a META tag to refresh every 120 seconds.
    The first thing I did to debug was to take the PL/SQL function body returning the SQL query, replace all the variables (which are just local vars, app items and page items) with hardcoded values, strip all quotes and run the "cleaned up" SQL query in SQLPlus. It executes very fast.
    So my conclusion is that the problem lies with the application server (which is Oracle iAS). Is this a logical conclusion? What should my next move be to get to the bottom of this?
    Even without the problem portlets the portal refresh speed varies widely, between <1 sec and >10 sec.
    The application also has other pages displaying the portal regions individually. These pages (including those with the "problem portlet" queries) render ok (ie, order of 5 seconds or less). This tells me that there is an issue with having a bunch of query-based regions on the same page.
    My guess is that I might need to examine the logs and/or httpd/modplsql settings of the app server. Number of simultaneous connections?
    What would happen if hundreds of users used this app concurrently, navigated to the portal page and left it like that to auto-refresh every 2 minutes? Are such pages a no-no in HTMLDB?

    Some more information:
    When I run the page in debug mode, I see the following timings for one of the problem portlets:
    11.53: show report
    11.54: determine column headings
    11.54: parse query
    60.95: binding: ":F118_BUNDLE"="F118_BUNDLE" value="1"
    60.95: binding: ":P52_STMETRICS_PRODBRANCH"="P52_STMETRICS_PRODBRANCH" value="RDBMS_MAIN"
    60.95: binding: ":P52_STMETRICS_PLATFORM"="P52_STMETRICS_PLATFORM" value="LINUX"
    61.35: print column headings
    61.35: rows loop: 15 row(s)
    [report is printed here]
    61.49: FORMITEM: P52_STMETRICS_PLATFORM HIDDEN
    61.54: FORMITEM: P52_STMETRICS_PRODBRANCH HIDDEN
    This tells me that the bulk of the time (50 seconds in this case) is eaten up in parsing the query. What is this symptomatic of?
    Another problem I've just noticed. It takes about 5 seconds to open up a region for editing (Region Definition) in HTMLDB. When I click "Apply Changes" (even without editing anything) it is taking on the order of minutes for the changes to be applied to the page. Our app server was bounced just before I noticed this.
    These are the params in our DAD:
    <Location /pls/toolsdb>
    SetHandler pls_handler
    Order deny,allow
    PlsqlDatabaseConnectString ...
    PlsqlDatabasePassword ...
    PlsqlDatabaseUsername ...
    PlsqlDefaultPage ...
    PlsqlDocumentPath docs
    </Location>

  • User Interface Template for Interactive Report Region

    In 3.2, where do we set the user interface template for Interactive Reports region?
    No matter what out of the box theme I switch to, the Interactive Reports region shows the same. What and where do I change the template so that alternating rows use two different colors?

    There is no template for Interactive Reports like for a "normal" report. You need to modify the CSS and supply your own for this to happen.
    I believe most things are tagged with #apexir - firebug with Firebox is invaluable. This thread may help:
    Re: changing the look and feel of interactive report.

  • How can i define the width of report column in report region ?

    Hi,
    I have report region and i want to have a static width for each column ( not based on column name of column data ), how can i do it ?
    Thanks in advance ,
    Yoel

    Can you provide more details pls? I am also trying to change widht of report columns and I do not see anywhere in reports atrributes where it allows me to do that...Thanks so much!

  • Link in report region

    Hi,
    I have report region(type=sql query). In that report region i want to add a hyperlink(View all). When user clicks on the hyperlink it should bring them to another page. Can anyone help me in this issue. i am using apex4.0.

    Where can i find button classIn the button template
    Usually(depend's on the theme) redirect buttons template are link tags with some class that styles them like a button. Else you can create such a button template(by copying it from another theme) without any styling
    For example a button template like
    &lt;a #BUTTON_ATTRIBUTES# class=&quot;&quot; href=&quot;#LINK#&quot;&gt;#LABEL#&lt;/a&gt;would render the button like a plain link

  • Change the 'No data found.' message in a report region

    I've got a report region (PL/SQL source) which sometimes returns no data, giving a 'No Data Found.' message.
    I couild have sworn there was an option to choose a custom message in the region definition when no data is returned - but I can't see that option. I guess it must have been in another region type.
    Is there some other way of setting the No Data Returned message?

    Hi,
    Check out this post:
    Hide the 'no data found' message
    I hope that helps.
    -Marc

  • Hide 'No data found' msg in report region  when you 1st click search page

    Hi,
    (sorry if it's confusing but my APEX is in FRENCH and I tried to translate)
    I created a search page in my application.
    1- I have an HTML region, with a search box and I search button
    2- I've got a report region (PL/SQL source) which sometimes returns no data, giving a 'No Data Found.' message.
    When I click on the search page for the 1st time (on my navigation bar), I would like to HIDE the report region so I don't have the " No Data Found" message.
    Only Once we click on the search button and there is no result, I want to have the message "No Data FOund"
    How can I achieve this?
    thanks
    Roseline

    1. create a hidden element on your page (P1_HIDDEN_ELEMENT)
    2. put your No Data Found message in a span tag
    <span id="no_data_found">No Data Found</span>3. create an on load computation to set your P1_HIDDEN_ELEMENT to 'no_data_found' if it is NULL and to set it to ' ' if it is NOT NULL - type PL/SQL Function Body
    BEGIN
       IF :p1_hidden_element IS NULL
       THEN
          RETURN '<script>html_HideElement(''no_data_found'');</script>';
       ELSIF :p1_hidden_element IS NOT NULL
       THEN
          RETURN ' ';
       END IF;
    END;4. Put this into the page footer:
    &P1_HIDDEN_ELEMENT.The other solution would be to create a display region - pure HTML and to display that first. Once the search is started that region would remain hidden and only the report would show up.
    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
    -------------------------------------------------------------------

  • "Between NVL" - Works in SQL Command, not in APEX report region

    First, I realize I could use dynamic SQL (model 4), but I don't want to (too hard just yet).
    I have a select statement with a series of Where conditions that employ values, in bind variables, supplied by the user.
    I want the choice of parameters to be optional, so I am checking for and replacing nulls.
    Select emp_name from employee_table where
    emp_rating between nvl(:p7_rating_choice, 0) and nvl(:p7_rating_choice, 99)
    and
    emp_language_no between nvl(:p7_lang_choice, 0) and nvl(:p7_lang_choice, 99);
    (the binds should be numeric).
    The actual statement is quite a bit longer, but the point is that the BETWEEN NVL(:x, min) AND NVL(:x, max) piece does not seem to work when used in a report region.
    It works fine if ALL parameters are provided, but returns an error if one or more are null.
    In the SQL command window it works (with a pop-up) just fine.
    By the way, the :p7_lang_choice bind variable is chosen from a LOV list which works in all other cases.
    Also, if I disable nulls (choosing "no" in ITEM page), everything works fine. It seems that the substitution of the min and max values via the NVL returns the wrong data type.
    Any ideas what I have done wrong?

    Thanks Scott.
    Every day brings a little more understanding!
    I also noticed a simplified method in the APEX documentation (although there was no explanation of the code) as follows:
    Where
    (column = :p1_user_input_1 OR :p1_user_input_1 = [null substitution value])
    AND
    (column = :p1_user_input_2 OR :p1_user_input_2 = [null substitution value])
    AND
    etc...
    Using the value you provide in the LOV section for the null, the second part of the OR handles the null situation.
    For some reason I was so tied up with comparing to the column that I never thought to have an OR with a compare to something else.
    Oh well.
    Thanks,
    Norm

  • How to get the SQL Statement of a report region?

    For example: The SQL of report region such as "SELECT A,B,C FROM T1 WHERE A = :P10_A".
    I hope to get the converted statement (the variable has been replaced), like this:
    :P10_A = 'TOM', SQL: "SELECT A,B,C FROM T1 WHERE A = 'TOM'".
    THX.

    I agree with John with the usual caveat about using bind variables.
    In other words, you should use
    SELECT A,B,C FROM T1 WHERE A = :P10_Ainstead of SELECT A,B,C FROM T1 WHERE A = 'foo'so that the shared pool doesn't get clutterred with copies of the same (sharable) SQL.
    Even if you use the "PL/SQL function returning a SQL query", be sure to use bind variables in your SQL and not "glue in" session state by concatenating it into the query.
    Thanks.

  • 2 Report -Regions combine in 1 Report-Region but 2 different SQL-Querys

    Hallo,
    I have a question.
    I have a page and within this page 2 different report-regions. Each of this regions has its own sql-query.
    Now I would like to concentrate them in 1 report with one title. But there are still 2 differnet sql-query
    that I can't combine. My issue is that I only want to show the result in one report.
    Does this work or is there a workaround I could do?
    Thanks, Jade

    Hi,
    As the report region's title is just whatever text you've entered, you can just put the title on the second report onto the first report and set the second report to use "No Template". You would probably need to remove the pagination settings for both reports - select No Pagination and set the row count to a high number.
    The final bit would probably require a new report template - you can create a copy of the existing report template that you're using - and remove the Column Heading Template setting. This is only necessary if you need to remove the column headings from the second report. There would be a gap between the two reports - not sure if you need to remove this as well? If so, you would have to adjust both templates to remove the this from the bottom of the first report and the top of the second report.
    I think that how you go about this will depend on exactly what you need to see between the two reports - if they need to look as though they are just a single report then you may have to complete all of the above steps.
    Andy

  • PL/SQL Table use in report region query

    Hello,
    I have a package function which return pl/sql table. I want to create a report region based on this pl/sql table. Is it possible to do this kind of report in HTMLDB?
    Please guide me in this area.
    Thanks
    HA

    The htmldb_collections API (apec_collections in 2.2) is a very useful method for rendering reports and one I have used extensivly in the past.
    Once created and populated you can reference your collection as if it were a SQL table i.e.
    Select c001, c002, c003
    from htmldb_collections
    where collection_name = 'MY_COLLECTION';
    You can absolutly base an Apex Report region on collections. Just treat them as another table that you can select from, join to others etc.
    In order to utilise this you must do the following:
    1) Create your collection:
    note that collections only persist for the duration of your session and you can only see the data you inserted into the collection. Also I would create this collection as the Database user who owns the Apex Workspace
    htmldb_collection.create_or_truncate_collection ('MY_COLLECTION');
    2) Populate your collection:
    In your case I would set a loop construct that parses through your pl/sql table and assign all values as described below. I assumed that my_plsql_tab has 3 columns called Val1, Val2, Val3
    FOR x IN 1..my_plsql_tab.count
    LOOP
    htmldb_collection.add_member (p_collection_name => 'MY_COLLECTION',
    p_c001 => my_plsql_tab(x).val1,
    p_c002 => my_plsql_tab(x).val2,
    p_c003 => my_plsql_tab(x).val3
    END LOOP;
    Note that you can have upto 60 elements in your collection.
    3) Access your collection:
    Select c001, c002, c003
    from htmldb_collections
    where collection_name = 'MY_COLLECTION';
    This quesry can then form the source of your sql report region.
    Hope all that helps
    Duncan

  • Connecting a report region and a PL/SQL region

    Hi,
    I have created a report region whith pagination that only show 1 row at a time. I can then navigate backwards and forwards through this recordset. The first reportcolum in this recordset contains a number.
    I have also, on the same page, created a PL/SQL procedure region. What I want is to use the number from the SQL region as an input to the PL/SQL region. So when I navigate through the report (Using the pagination arrows), the PL/SQL region is in sync with the record I'm currently seeing in the report.
    Is this possible or do I have to try something different?
    Regards
    Trond

    Hi Trond,
    If you only want to show one record in your first region, it might be best to work with page items, retrieve one record at a time and use that data as the source for your page items. It's easier to implement and easier to reference those values in your second region. Reports are great if you have more then one record.
    Having said that, there are ways to implement it the way you outlined it in your posting. Granted it's not very elegant but it serves its purpose. You could write your own PL/SQL package, use this to set a global to the current row's primary key value and reference that global in your second region.
    Create your package as follows:
    create or replace package md_sample as
    g_pk_value number;
    function set_value(p_value number) return number;
    end;
    create or replace package body md_sample as
    function set_value(p_value in number) return number is
    begin
    g_pk_value := p_value;
    return 1;
    end;
    end;
    Now you need to make sure that your report calls this package appropriately. Calling this as part of your SQL statement won't work properly as it would also be called for records not currently shown on your page. A better way would be to use it for a PL/SQL expression within your report template definition. Pick a custom report template for your report and edit that template. Scroll down to the condition for the first column template and pick “Use Based on PL/SQL Expression”. Then type in the following expression (this is based on a select deptno, dname, loc from dept report):
    md_sample.set_value(#DEPTNO#)=1
    After that you'll be able to reference the global md_sample.g_pk_value. You could e.g. use this as the source for page items shown in your second region.
    Hope this helps,
    Marc

Maybe you are looking for