Enhancement Request : Subscriptions where IR uses Page Items.

I'd like to request an Enhancement.
I'd like report subscriptions to keep track of the current values of any page items in the sql statement when the subscription is stored.
Currently any Interactive Reports that use page items run fine interactively, but subscriptions fail due to the page items having no values.

Oh ok I see what you're trying to do but that's not what I meant.
1. If your IR filters based on a page item and is a subscribable report, you have no choice but to work a NVL (or some other means) in there in order to make a true condition when the page item is null or nonexistent in order for the report to work at all during subscription.
2. If you never want the user to be able to query all rows in the application (that is, force them to enter something in the page item), you'll need a not-null validation on the page so when they submit their page item change that it validates not-null.
3. Use the filter in the IR (but NOT referencing a page item) such that the user can save/subscribe to an IR with the desired filter such that they get the properly-filtered named IR.
Does that make sense?

Similar Messages

  • Using page items in a report region

    Hi all,
    I am attempting to query a database table using values from two page items.
    SEARCH_FIELD is the field in which a query constraint is being applied
    SEARCH_CONDITION is the the query constraint condition being applied
    So, for example, I tried setting SEARCH_FIELD to AMOUNT and SEARCH_CONDITION to %22%.
    When I put the line 'AMOUNT LIKE :SEARCH_CONDITION' at the end of the query it returns the rows that do match the constraint.
    When I put the line ':SEARCH_FIELD LIKE :SEARCH_CONDITION' it displays "no data found."
    The debug shows it parse query, bind SEARCH_FIELD, bind SEARCH_CONDITION, determine column headings, then parse and bind again, and print column headings, and row loop: 15 row(s). Then the message "no data found." It should return a single row, but it does not.
    Any reason why apex doesn't like this?
    Thanks in advance,
    T.

    Sorry for the reply delay...
    The region is an SQL Query. The source is:
    Select NUMBER, DATE_LOGIN, DATE_LOGOUT, FORM.FORM_NAME as "Form", Person.L_Name||', '||Person.F_Name as "REQUESTER", DEPARTMENT.DEPARTMENT_NAME, ACCOUNT#, SUBCODE.SUBCODE as "Subcode", AMOUNT, DESCRIPTION, SENTTO.LOCATION as "Sent To", (Select Person.L_Name||', '||Person.F_Name from PERSON WHERE AUTHORIZED_BY=PERSON.ID) as "Authorized By" from SIGNATURETBL, PERSON, DEPARTMENT, FORM, SENTTO, SUBCODE WHERE REQUESTER=PERSON.ID AND DEPARTMENT=DEPARTMENT.ID AND FORM=FORM.ID AND SENT_TO=SENTTO.ID AND SIGNATURETBL.SUBCODE=SUBCODE.ID AND :SEARCH_FIELD LIKE :SEARCH_CONDITION
    If :SEARCH_FIELD has the value of 'AMOUNT' and :SEARCH_CONDITION has the value of '%22%' the regions says that no data was found. If :SEARCH_FIELD, in the query, is replaced by AMOUNT then the query does return the proper rows.
    Can you not reference an item to determine a column constraint?
    Thanks for any input

  • List of Values using page item variable

    I know there has to be a simple solution to my problem but I cannot figure it out. Any assistance would be greatly appreciated.
    I have a Shared list of values that I want to reuse on several of my pages. I have tried (I thought) all the variable possibilities but cannot figure out how to reference the page item in my list of values.
    Original code:
    select app_name d, app_sys_id f
    from ops_application
    where :P32_RADIO2 = 'Application'
    union
    select db_name d, db_id f
    from ops_database
    where :P32_RADIO2 = 'Database'
    Doesn't work:
    select app_name d, app_sys_id f
    from ops_application
    where 'P'||:APP_PAGE_ID||'_RADIO' = 'Application'
    union
    select db_name d, db_id f
    from ops_database
    where 'P'||:APP_PAGE_ID||'_RADIO' = 'Database'
    I also have tried 'P'||v('APP_PAGE_ID')||'_RADIO'
    'P'||&APP_PAGE_ID.||'_RADIO'
    'P&APP_PAGE_ID._RADIO'
    'P'||:APP_PAGE_ID||'_RADIO'
    Thanks,
    Gayle
    Edited by: user8116955 on Sep 27, 2010 12:25 PM

    Gayle,
    I haven't tried this, but what about
    where v('P'||:APP_PAGE_ID||'_RADIO') = 'Application'That should allow you to build up the name of the page item dynamically, and then test the value...
    A lower-quality solution would be to use an application item rather than a page item, as then you'd know the name ahead of time.
    Let me know if this works,
    -David

  • Error using Page Items in PL/SQL Triggers

    Hello all,
    I am trying to use a page item value in my PL/SQl trigger statement.Following is my trigger
    create or replace TRIGGER "cts_apps_temp_insert"
    BEFORE INSERT ON CTS_APPS_TEMP
    FOR EACH ROW
    DECLARE
    vComputer_ID NUMBER;
    vTemp varchar(200);
    BEGIN
    select computer_id into vComputer_ID from cts_hardware_info where computer_name = v('P105_DEVICE_NAME');
    INSERT INTO CTS_SERVER_APP_CUSTOMER(SERVER_ID,DEPT_APP_REL_ID,TECHNICAL_MANAGER,FUNCTIONAL,APPLICATION_COORDINATOR,MODIFYUSERID,DATEOFMODIFICATION)
    VALUES (vComputer_ID,:NEW.DEP_APP_REL_ID,:NEW.TECHNICAL_MANAGER,:NEW.FUCNTIONAL_MANAGER,:NEW.APPLICATION_COORDINATOR,v('APP_USER'),sysdate);
    END;
    But am getting an error when I try to insert the data from the form
    ORA-01403: no data found ORA-01403: no data found ORA-06512: at "ESDBA.cts_apps_temp_insert", line 5 ORA-04088: error during execution of trigger 'ESDBA.cts_apps_temp_insert'
    Error Unable to process row of table CTS_APPS_TEMP.
    OK
    I tried printing the value of v('P105_DEVICE_NAME'); from a pl/sql block...It doesnt print anything..
    Can anyone please tell mw why the page item value is becoming null?
    Is there any other way I can use the Page item value in the trigger?
    Thanks in Advance,
    Nehal
    Edited by: user11122439 on Jun 23, 2009 11:27 AM

    Thanks for helping me out Tony.
    It is a single row form. But the same form is used many time to add records for that particular server..
    In the first form the user enters the server details. In the second form they need to associate applications with the server name they entered in the first form.
    They can add any number of such applications.
    The contenst in my form are
    Server_name: ( read only field populated by the name they entered in the first form)
    application_name:
    Manger1:
    Manager2:
    When the user clicks on add button the applcaition should be associated to the server he added in the first form.For this I need the Id of the Server_name he added in the first form.
    I also need to store this info in a temporary table apart from the original Server-App relationt able. Thats the reason I had database trigger which was also adding stuff to a temporary table apart from adding the relationships to the main table.
    But even if we frget about hte temporary table can you please tell me how I can use the Page item value in form 1 and get its id from database and use it to insert server-app relation in second form?

  • Problem using Page items in trigger

    Hello all,
    I have a requirement in my application in which I need to use a page item in my trigger..
    My basic requiremtn is I have 2 forms to enter data..I need the name entered int he first form to be displayed in the second form, since am associating the data entered in the 2nd form to the name entered in the 1st form..
    In my 2nd form where I need this, am setting the Source of Server_Name to P105_DEVICE_NAME. But I need this info to enter the details to the table..So I ve created the folowwing trigger.
    create or replace TRIGGER "cts_apps_temp_insert"
    BEFORE INSERT ON CTS_APPS_TEMP
    FOR EACH ROW
    DECLARE
    vComputer_ID NUMBER;
    vTemp varchar(200);
    BEGIN
    vTemp := :P105_DEVICE_NAME;
    select computer_id into vComputer_ID from cts_hardware_info where computer_name = vtemp;
    INSERT INTO CTS_SERVER_APP_CUSTOMER(SERVER_ID,DEPT_APP_REL_ID,TECHNICAL_MANAGER,FUNCTIONAL,APPLICATION_COORDINATOR,MODIFYUSERID,DATEOFMODIFICATION)
    VALUES (vComputer_ID,:NEW.DEP_APP_REL_ID,:NEW.TECHNICAL_MANAGER,:NEW.FUCNTIONAL_MANAGER,:NEW.APPLICATION_COORDINATOR,v('APP_USER'),sysdate);
    END;
    But am getting an error executing this
    Compilation failed, line 5 (10:44:08) The line numbers associated with compilation errors are relative to the first BEGIN statement. This only affects the compilation of database triggers.
    PLS-00049: bad bind variable 'P105_DEVICE_NAME'
    Is there any other way to access the Page Items from the trigger?
    Thanks,
    Nehal

    Thanks Tyson. I have changed it but I still get the same error.
    For some reason, The value of P105_DEVICE_NAME is becoming null.
    I tried executing the following in SQL workshop.
    begin
    dbms_output.put_line('skdjaldjakdjalkdj');
    dbms_output.put_line(v('P105_DEVICE_NAME'));
    end;
    and got the following output
    skdjaldjakdjalkdj
    Statement processed.
    0.00 seconds
    It doesnt print anything for v('P105_DEVICE_NAME').
    Any idea why this is happening?
    Thanks,
    Nehal

  • Progressbar color setting using page item value

    Hey guys! I hope this is not the wrong forum to ask for your help, but since I need to accomplish it in Apex I though I'd just give it a try here.
    Have been reading, working many hours on this issue without finding the proper solution.
    I have a progressbar, which and a page_item. The progressbar's status is set according to my page_item. It works all fine so far.
    Now the problem is that I want to change the colouring of the progressbar depending on the percentage achieved. In order to do this however, I would have to know how to change or override the default ui-theme colouring for this jQuery progressbar.
    My code right now is:
    <script type="text/javascript">
    $(function(){
       var pValue=$v('P1110_COUNTSTAT') ;
       $("#progressbar").progressbar({ value: pValue });
    </script>I tried to add progressbar.style.background = "red"; which colours the background and not the "overlay element". I read the entire source code but couldn't figure out how to address this part of the progressbar.
    If anybody here has some experience with this, please let me know!
    Many thanks,
    Seb

    Hi,
    If you define class like
    <style type="text/css">
    .bar_red { background:red!important; }
    .bar_blue { background:blue!important; }
    </style>And then with jQuery add and remove class e.g.
    $('.ui-progressbar-value').removeClass('bar_blue');
    $('.ui-progressbar-value').removeClass('bar_red');
    if(something){
      $('.ui-progressbar-value').addClass('bar_blue');
    }else if(something){
      $('.ui-progressbar-value').addClass('bar_red');
    }br, Jari

  • [JS CS3] disappearing page items

    Now this is strange: I've written a script that does some imposition of a an image on a single sheet (page) and puts some special printers marks along the side. Now there's (as far as i am aware of) one instance where all the page items get placed on the page, but when you save, close and reopen the document, half of them are gone!
    When you drag the page items before saving they disappear right from under your cursor! I've tried putting a lot of save commands during the script, hoping that that would nail those items down, but with no luck.
    Has anybody had a similar experience and found a solution?
    Thanks,
    james

    Hi,
    You should send your script then we could have a try on our side.
    Loic

  • 'All' Page Items

    I have a discover report that uses 'Page Items' and summarizes the results. I would like to include an All on my Page Items which would allow me to display all of the page items summarized together. Is this possible in Discover or do I need to use Oracle Reports or Forms?
    John
    null

    in 4i, All is supported for Crosstabs. Pierre
    null

  • Default Value for Page Items

    Hi,
    I use page items quite heavily in my workbooks to allow the user to filter the recordsets as they require.
    Some of these page items are based on dates - i.e. Extract Date (my underlying tables are updated on a daily basis, so the Extract Date soon contains several values).
    Is there any way I can set the Page Item to show the latest (MAX) Extract Date when the work book is opened?
    Many thanks
    Mark

    Hi all
    Also, when alternate sorts are in use these will generally trigger Discoverer to add the NOREWRITE hint to the SQL, which can cause horribly slow performance.
    I used to use alternate sorts a lot but these days I use them very sparingly. When I want a list of values to come up in a certain order I now use a custom folder and add the ORDER BY in there. This allows the list to come up right when my users are picking and stops the NOREWRITE hint, but it also removes the alternate sorting from the display.
    There are other causes for the inclusion of NOREWRITE hint but this is the main one.
    Best wishes
    Michael

  • Disco Plus 10g Performance Issue When Moving Table Headings to Page Items

    Hello,
    We are experiencing an performance anomaly in Discoverer Plus (the latest release: 10.1.2.48.18), and are wondering if anyone else out there has noticed similar behavior. We're having trouble identifying the cause, and have a TAR openned with Oracle support but they are not able to reproduce our issue, and have been slow to offer suggestions or help.
    The issue happens when a user drags a table heading up into the page items area in a worksheet. When we move a heading up to the page items it works quickly one time, but then, every time after that, it takes anywhere from a few minutes up to HOURS to move any additional headings up to the page items area.
    The problem occurrs on approximately 3 out of every 5 of our workbooks. We've tried different sizes of workbooks, with large (several million records) and small (a few thousand records) datasets, and none of this seems to affect the issue at hand. The problem only occurs in Discoverer Plus, not Desktop. We've also spent some time researching caching and memory configuration, and believe that we have setup all of the recommended options for maximum performance on our systems.
    I would just like to know if anyone else out there in the community has experienced the same issue, and if anyone has any advice for us.
    Thank you,
    -Scott

    Hi,
    I found the following on Best Practices of Orcle Discoverer 10g by
    Mike Donohue - Product Management - Oracle Business Intelligence
    Performance – Parameters and Page Items
    Page Items provide very responsive, interactive manipulation of data
    At a cost:
    Forces retrieval of all Detail values
    Incremental increases of memory as indices are built
    Parameters reduce result set, improve performance
    Use Page Items only when needed – 2 to 3 with < 12 values each
    Performance – Parameters and Page Items - example
    Loc(3), Dept(10), ProdType(50), Prod(1,000), Date(365)
    547,500,000 potential rows/combinations (3*10*50*1000*365)
    Use parameters for Loc, Dept, ProdType, and 90 day date range
    90,000 potential rows/combinations (1000*90)
    Reduce data retrieved by ~ 6000 X
    Improve performance by several orders of magnitude
    I hope this will help you!

  • Using Page Text Item in an Authorization Scheme

    Hello,
    I will be having a text item is every page say, Px_RESP_ID (hidden and its value set in an earlier page), and want to use its value in an authorization scheme to verify if the user has an access to the page.
    I'm using the following SQL in the authorization scheme -
    Apex Version: Apex 3.2
    Scheme Type: Exists SQL Query
    SQL:
    SELECT 1
    FROM zs_users zu
    , zs_responsibilities zr
    , zs_user_resp_groups zur
    WHERE
    zu.user_name = :APP_USER
    AND zr.resp_id = '&P'||:APP_PAGE_ID||'_RESP_ID.'
    AND zu.user_id = zur.user_id
    AND zr.resp_id = zur.resp_id
    For some reason this approach is not working. Any ideas to help me move forward will be greatly appreciated.
    Regards,
    Seshu

    AFAIK an application item, or maybe a page 0 item, is the only way to do this (as those items effectively exist across all pages of an application). Unfortunately since authorization schemes are application-level, you can't really effectively reference page items at runtime since you aren't necessarily on that page.
    The other option is an ugly one. Instead of creating one auth scheme (e.g.: "user_has_whatever_authority"), create one for every page (e.g.: "user_has_whatever_authority_1", "user_has_whatever_authority_2", etc.) and attach each auth scheme to each page by matching up the number in the name with the page. But this is a maintenance nightmare and terrible style IMHO, but it'll work. Your colleagues will hate you for it when you're gone though.

  • Trouble with using javascript $s function to populate a page item

    Hello Oracle APEX Community,
    I'm working on a drilldown dashboard page and have been encountering a problem when i try to populate a Text Page Item (hidden or not) using the javascript built in $s function.
    The function works great when the data is a number such as dept_id (even if the field type is varchar). However, trying to pass anything which is a text the process fails, except when a value is hard-coded as a parameter for the function. So for example, I have a chart with counts of constituents by state. I would like to populate (filter) a table based on when you click on a bar for a state without having to submit the page. I'm using dynamic actions and a built in javascript function in the SQL for the chart to accomplish this; but again, it works great when I use a varchar field like the FIPS code (i.e. the FIPS for Texas is '48'), but when I try to populate the page item using the state abbreviation 'TX' (again varchar) it fails.
    Here's an example of code that works:
    SELECT 'javascript:$s("P1_DEPTNO",'||d.deptno||')' LINK,
    d.dname LABEL,
    sum(e.SAL) sal
    FROM emp e, dept d
    where e.deptno = d.deptno
    group by 'javascript:$s("P1_DEPTNO",'||d.deptno||')', d.dname And here's an example of code that does not work:
    SELECT 'javascript:$s("P1_DEPTNO",'||d.loc||')' LINK,
    d.dname LABEL,
    sum(e.SAL) sal
    FROM emp e, dept d
    where e.deptno = d.deptno
    group by 'javascript:$s("P1_DEPTNO",'||d.loc||')', d.dname However, when I hard code a text value the script works:
    SELECT 'javascript:$s("P1_DEPTNO","BOSTON")' LINK,
    d.dname LABEL,
    sum(e.SAL) sal
    FROM emp e, dept d
    where e.deptno = d.deptno
    group by 'javascript:$s("P1_DEPTNO","BOSTON")', d.dname
    ORDER BY d.dname I'm encountering this problem on several versions of APEX: (4.0.2.00.07-local installation) and (4.1.0.00.28-apex.oracle.com)
    Does anybody know of this problem and how to solve it? I've looked for settings on the page item itself, and can't figure it out.
    I've re-written my sql to utilize the value fields of my tables instead but I have some objects on the page which are really going to depend on the character based data instead.
    Thanks,
    Wayne

    In your javascript you are generating, surround your value with double-quotes and it'll should then always work with both numbers and strings (your strings are probably being interpreted as variable names and they don't exist at runtime, hence erroring out).
    Example:
    SELECT 'javascript:$s("P1_DEPTNO","'||d.loc||'")' LINK,Edited by: gti_matt on Aug 16, 2011 9:50 AM

  • Submit page item using AJAX

    Hi All,
    Thanks for any help in advance.
    I am trying to submit an item into the session by using AJAX iin version 4.1
    I have a application process which is an on demand: run this application process when requested by a page process.
    begin
      :P4_FISCAL_YEAR2 := :AJAX_4_FISCAL_YEAR2;
    end;then in the item :P4_FISCAL_YEAR2 have the html form element attributes set to:
    (also the page item is set to None(Default) on page action when value changed.
    onchange="selectChanged6(this)"and a page process
    <script type="text/javascript">
    function selectChanged6(filter)
    var get = new htmldb_Get(null,$v('pFlowId'), 'APPLICATION_PROCESS=SET_4_FISCAL_YEAR2',0);
    get.add('AJAX_4_FISCAL_YEAR2', filter.value);
    var ret = get.get();
    </script>The item doesnt seem to be submitting into the session and I cant figure out why, Thanks

    Marie,
    I think I have acomplished what you are looking for but if your goal is quick response time then this can fluctuate since there is 1 ajax call made to set your item value and another ajax call for every chart you want to refresh.
    This solution assumes the following:
    1. all reports are in the same language and in english.
    2. all reports are flash charts.
    here is a demo: http://apex.oracle.com/pls/apex/f?p=43401:23:0
    Go into your chart template and add the class refreshable_chart
    <div class="rounded-corner-region refreshable_chart" id="#REGION_STATIC_ID#" #REGION_ATTRIBUTES#>
    ...Create the following dynamic action on your chart page:
    Name: refresh_chart
    Event: Change
    Selection Type: Item(s)
    Item(s): P4_FISCAL_YEAR2
    True actions:
    Sequence: 10
    Action: execute pl/sql code
    Code:
    NULL;
    {code}
    Page Items to Submit: P4_FISCAL_YEAR2
    Sequence: 20
    Action: Execute JavaScript code
    Affected Elements:
    -- Type: jQuery Selector
    -- jQuery Selector: .refreshable_chart
    Code:
    {code:javascript}
    this.affectedElements.each(function(){
      apex_RefreshFlashChart(&APP_PAGE_ID., this.id.substr(1), 'en');
    {code}
    Good Luck,
    Tyson Jouglet
    Edited by: Tyson Jouglet on Dec 14, 2011 10:33 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How To Use a Hidden Page Item within an SQL Report Query without Submitting

    Hi,
    Using: Oracle ApEx 3.0.1
    I have an sql report region that contains a hidden page item as part of the "where clause". My problem is, based on a value entered by the user, I need to assign this value enetered to my hidden item, so that it can be used within the where condition of my sql but this would need to be done without actually submitting the form.
    At the moment, I can set the value via an on-demand process but my SQL is still not returing any values as the hidden page item within the query is not set (as page has not been submitted).
    Can anybody please assist as I am not sure how to do this and whether in actual fact, this is possible to do, without having submitted the page.
    Thanks.
    Tony.
    Edited by: Tony F. on Nov 12, 2011 1:39 AM

    You can set a session value using a dummy ajax call e.g:
    Add the following to the 'Function and Global Variable Declaration' region
    function f_set_item(pThis){
      var get = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=dummy',1);
      get.add('P1_ID',pThis.value)
      gReturn = get.get();
      get = null;
    }Where P1_ID is the session value to be set. Then call the function in the usual way e.g.
    javascript:f_set_item(this);
    I hope that helps
    Shunt

  • Page item default value using PL/SQL

    Hello,
    I'm trying to set a default value for a text field page item in a form.
    I'm using this PL/SQL Function Body in the Default section:
    begin
    select ("DEPT_CODE"|| ' ' || DEPT_NAME) from MyView where UserID = :G_USER_ID;
    end;
    I get the following error:
    PLS-00428: an INTO clause is expected in this SELECT statement
    Any help is appreciated!
    thanks,
    Matt

    Matt
    I'm using this PL/SQL Function Body in the Default section:
    begin
    select ("DEPT_CODE"|| ' ' || DEPT_NAME) from MyView where UserID = :G_USER_ID;
    end;Well, that's not a PL/SQL function body. This is:
    declare
      x varchar2(4000);
    begin
      select ("DEPT_CODE"|| ' ' || DEPT_NAME) into x from MyView where UserID = :G_USER_ID;
      return x;
    exception others then
      return null;
    end;Scott

Maybe you are looking for