Using Select List value for building report

I have an interactive report form. I have a "After Header" (LOAD) process that run sql commands that will populate a table with the data that the report needs for a given week.
I have a Select List item that is run as a "Before Header" that gets a list of dates from a table. The dates only contain the first day of the week for the past two years. It is called "WEEK_OF" table and the column is called "WEEK_OF_DATE".
The default value for the Select List is the first day of the current week. And then all of the first day of the week from the WEEK_OF table.
I would like the LOAD process to use the value in the Select List. So at start up I would like the List to show the current week and report to begin with data from the current week.
So I have tried to use the variable :WEEK_OF_DATE (Item name) as the beginning date for the report. However :WEEK_OF_DATE is null.
Also, after I have the report displayed, I would like to select a new date from the list and have the report automatically refresh with that new data.
Any Ideas what I am doing wrong?

Hi Lyle,
When setting a default value for a select list that is to be used to filter a report, I have found it best to do that using a computation, conditional on the item being NULL and running Before Header. If other computations rely on this value, then it should have the lowest sequence number to ensure that the value is available for those.
Andy

Similar Messages

  • 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.

  • Need to use Select List value as column name

    I want to have a WHERE ? IS BETWEEN ? AND ? clause.
    I am using the PL/SQL Query returning a SQL Query as a report. This uses bind variables for items I had set on my form..... If I hardcode something like:
    'WHERE STARTDATE IS BETWEEN '||
    'TO_DATE(:P1_START,''dd-MON-YYYY HH24:MI'') AND '||
    'TO_DATE(:P2_END,''dd-MON-YYYY HH24:MI'')';
    I have no problem, but I have 2 date columns, STARTDATE and ENDDATE, and would like to use the value in a select list and not have to hardcode "STARTDATE" in there. I have not been able to do this, does anyone know how to use a bind variable as a column name? From reading some posts I think it might not be possible.

    Heather,
    You're on the right track, just glue in the column name so that it becomes part of the returned query string from the function (...'WHERE '||:COLNAME||' IS BETWEEN '|| ...).
    Note that the bind variable is not part of the returned query string, but the column name obtained from the bind variable when the function executes does become part of the query string.
    Scott

  • Using select list value as column name in SQL

    Folks,
    Thanks in advance for any help with this
    I have a select list with two values (Instance and Username) created by
    STATIC2:Username;USERNAME,Instance;INSTANCE
    I am trying to pass the value of this (:P2_SELECT) and use it as a column name in a SQL query as below
    select USERNAME,
    INSTANCE
    from table_name
    where :P2_SELECT like '%'||:P2_TEXTSEARCH||'%'
    When I substitue the :P2_SELECT for one of the values (either instance or username) this works fine
    I suspect it is due to how Application Express interprets the value of :P2_SELECT
    Any help would be much appreciated!
    Gareth

    Thanks Munky that worked a treat!
    The next hurdle I have now is that because I have changed the region type to "PL/SQL Function(returning SQL Query)" there is no longer the option to add sorting to the columns as I have had to change the Source option to "Use Generic Column Names (parse query at runtime only)"
    I will have a scout around and see how I can get around this
    Gareth

  • Dynamic Action based on Interactive Report Select List Value

    I'd like to perform a Dynamic Action when a user selects one of 3 options from a Select List within an Interactive Report:
    select APEX_ITEM.SELECT_LIST(
    p_idx => 3,
    --p_value         =>   deptno,
    p_list_values => 'Copy;Copy,Delete;Delete,Export to PDF;Export to PDF',
    --p_attributes    =>   'style="color:red;"',
    p_show_null => 'YES',
    p_null_value => NULL,
    p_null_text => '--Select--',
    --p_item_id       =>   'f03_#ROWNUM#',
    p_item_id => 'P6_IR_SELECT_LIST',
    p_item_label => 'Label for f03_#ROWNUM#',
    p_show_extra => 'YES') "Actions"
    from dual;
    When building the Dynamic Action, I chose the following values from the Advanced wizard
    Event: Select
    Selection Type: DOM Object
    DOM Object: P6_IR_SELECT_LIST
    Condition: Equal to
    Value: "Delete"
    True Action: Execute Javascript Code: Alert('Here');
    Doesn't seem to be firing...can anyone help?
    Thanks in advance,
    John

    Hi,
    I am not sure if the "equal to" condition applies to a DOM object... after all, a DOM object can be anything (any HTML element) not only a field.
    Try using a javascript expression instead, like this:
    $v('P6_IR_SELECT_LIST')=='Delete'UPDATE: Sorry, I just tested and "equal to" condition works for DOM objects... should have tested before posting!
    Luis
    Edited by: Luis Cabral on Feb 29, 2012 4:45 PM

  • Refresh classic report based on select list value selected

    hello,
    can anyone please help me out with this issue. I have a parameterized classic report based on a select list and I want to refresh this report whenever the select list value is changed. I am using oracle apex version 3.2. i just want to have a javascript function onchange event for the select list which refreshes my report whenever a value is selected.
    My select list item is p1_datastore
    select distinct datastore d,datastore r from my_table1 order by 1;
    My classic report query is
    select * from my_table2 where datastore = :p1_datastore order by last_updated_dt desc;
    ****************************************************thanks,
    orton

    can anyone please help me out with this issue.
    thanks,
    orton

  • Using select list as default value in tabular form.

    Hi,
    I am using Application Express 4.1.0.00.32. I have two questions that are related.
    I have a Select item *'P1_SELECT'* and a tabular form My Items.
    Question 1. The My Items tabular form col1 Attributes are set Display As Text Field, and the Tabular Form Attributes are set Default Type = item(application or page item name), Default = P1_SELECT. I have checked the session state value is set on P1_SELECT ie. Fred. What I need to know is, why, when adding a row to the tabular form My Items does col1 not display 'Fred' as the default value from the select item P1_SELECT? I can change col1 of the Tabular form to be Display as Text (save state) and this will work. However that leads me on to:
    Question 2. After adding say 3 rows to the form, I then change the select P1_SELECT value to Bob and Bob is now set in session state on the P1_SELECT item, but when I again add row to the form the value Fred is still the value not Bob. It seems that the tabular form keeps the default value as Fred and not Bob. How can I get this to look or work like:
    col1_
    Fred
    Fred
    Fred
    Bob
    Your help is needed.
    Thanks.

    Howard (DBA in Training) wrote:
    Do you submit the page or set the value after changing the selection? If not, the display value seems to be Bob but the working value is still Fred. That's what you are seeing right? In the "Settings" section, what do you have for "Page Action when Value Changed". I've been using "Redirect and Set Value" because I was staying on the same page after the selection.
    Additional info which might be helpful (or NOT). ====================
    NOTE: I am just a novice's novice with APEX and I had much agony with Select Lists. It was challenging to have the Select List value displayed because there seem to be so many different sources of the Select List value, namely:
    1) the current value in the session state
    2) the value you can specify in "Source value or expression" in the "Source" section of the Select List item
    3) the value you can specify in the "Post Calculation Compution" in the "Source" section of the Select List item
    4) the value you can specify in the "Default value" of the "Default" section of the Select List item
    [Now, if I've misdescribed any of these, remember, this is from a novice's perspective.]
    It's like putting a clock (back) together. Get any of the pieces wrong and it will probably not work right.
    I had an addiitonal challenge in that I wanted the same Select List displayed on multiple pages and for the currently selected value (from the former page) to already be set on the new page when it was displayed. What fun!
    To see what I did here: http://apex.oracle.com/pls/apex/f?p=43250:101 login Dever/Ima9Dever
    Remember, I'm doing many things you will likely not need to do. I iniitalized the Select List for the first time it displayed. I copied the Select List value from old page to new page by storing it in an application item F217_SYS_NIC_NM.
    Best wishes,
    HowardHi Howard,
    You don't have submit the page for just setting one item's session state. you can use a Dynamic Action OR use Page Items to Submit property if available (this is available in various places such as sql region,chart region etc)
    In context to this question you don't have to do any of those..just see my example above
    Thanks

  • Prompt used as view selector for multiple reports

    Hi All,
    Can a dashboard prompt be used as View Selector for multiple reports? If yes, please let me know how?
    Thanks
    Sumita

    Hi Sumita,
    You can do this with Dashboard prompts, but it's a little tricky. I'll highlight the process below. Keep In mind I assume you have three reports already created and have three views: View 1, View 2 and View 3.
    Phase I: The Dashboard Prompt
    1. Create a new dashboard prompt.
    2. Add any single column to your prompt. It doesn't really matter which one (just make sure nothing is prompted on it to be safe).
    3. For the sake of this example, I'll assume we added column: "Test Folder"."Test Field"
    4. Make sure your Operator is "is equal to/is in"
    5. Make sure the control is "Drop-down List"
    6. Change the Show to "SQL Results"
    7. Write a SQL statement similar to the following (TEST =<your subject area>, "Test Folder"."Test Field" = <your column>):
    SELECT CASE WHEN 1=2 THEN "Test Folder"."Test Field" ELSE 'View 1' END
    FROM TEST
    UNION
    SELECT CASE WHEN 1=2 THEN "Test Folder"."Test Field" ELSE 'View 2' END
    FROM TEST
    UNION
    SELECT CASE WHEN 1=2 THEN "Test Folder"."Test Field" ELSE 'View 3' END
    FROM TEST
    **Note: The reason why we need to do the CASE statement is because every logical query needs at least 1 presentation column. The case statement is a way to include the presentation column, but since the statement 1=2 is never true, we always use the ELSE condition.
    8. Set a presentation variable. Call it VIEW_PVAR
    9. Have the Prompt default to Specific Value: View 1
    10. Save the Dashboard Prompt and put it into the Dashboard with your reports.
    Phase II: Filter Reports
    1. Create a new Answer request
    2. Bring in your test column twice
    3. Change the formula (fx) on the second column to be: '@{VIEW_PVAR}{View 1}'
    4. Now add a filter to the presentation variable column
    5. Set the operator to "is equal to/is in' and set the value to: View 1
    6. Save the Request as "View 1 Filter"
    7. Change the value in the filter to: View 2
    8. Save the Request as "View 2 Filter"
    9. Change the value in the filter to: View 3
    10. Save the Request as "View 3 Filter"
    Phase III: Guided Navigation
    1. Create three sections in your dashboard
    2. Rename each section to: View 1, View 2 and View 3 respectively
    3. For each of the sections, do the following:
    3a. Click on properties
    3b. Click on Guided navigation
    3c. Set the Guided Navigation to the appropriate Filter report
    4. For each of the three sections, do the following:
    4a. Add in all three requests
    4b. Click on the request properties and select Show and the appropriate view for that section
    5. Save your changes to your Dashboard
    Good luck and if you found this post useful, please award points!
    Best regards,
    -Joe

  • Pass Select list value to URL as a parameter

    I am trying to pass the selected value from a select list via a button to a URL.
    &P_VALUE=&P_VALUE.
    P_VALUE is set to USER SESSION.
    It shows as prevous session value. If I show the the session value is not set to the selected value.
    If I call a PDF report via a button, it displays the correct value and the session values is correct.
    If I select the button for the URL again, is shows the previous value.
    When I go back to the form and call select the button again, the correct parameter is passed to the URL.
    Any Ideas?
    Thanks,
    Jerry

    If you use substitution at the time, the button gets generated, you don't have the new value - the button is generated with the rest of the page, and then later the user changes value of the select list. You have two choices:
    1)Use Select list with submit - and transfer the user to second page using branch (which get's calculated after submit when select list has already the new value)
    2)Use Javascript to catch the onChange/onClick event of SelectList, read the current value and do the redirect from JavaScript.

  • Tranferring on "select list" value to another "select list" value

    We have a drill through feature in our application where the user clicks on a value on page 1 and is taken to page 2. (e.g. the user drills on EUROPE in the REGION column on page 1 and is taken to page 2 where they see a report by countries in EUROPE.)
    We also have identical SELECT LISTS on page 1 and on page 2 for REGION (EUROPE, NORTH AMERICA, ASIA). How do we program our application so that when the user clicks on EUROPE on page 1 and is taken to page 2 the value of EUROPE from the REGION SELECT LIST on page 1 is chosen in the REGION SELECT LIST on page 2?
    We tried embedding this in the url for the drill through but the REGION SELECT LIST value on page 2 didn't change.
    In the below link shouldn't the value of the REGION SELECT LIST named P2_REGION be assigned the current value of the REGION SELECT LIST called P1_REGION? (in this case 'EUROPE')
    Thanks for help on this. John Wisnieff
    f?p=&APP_ID.:102:#APP_SESSION#::::P102_PRG1_LINK:#P1CAMP_NAME#,P2_REGION:&P1_REGION

    It would be great to get quick reply on this as we have a project due soon. I just need an answer to the below question:
    In the below link shouldn't the value of the REGION SELECT LIST named P2_REGION be assigned the current value of the REGION SELECT LIST called P1_REGION? (in this case the value is 'EUROPE')
    f?p=&APP_ID.:102:#APP_SESSION#::::P102_PRG1_LINK:#P1CAMP_NAME#,P2_REGION:&P1_REGION

  • How to make a subscription use the default value for a parameter

    Hi everyone,
    I need to use the CreateSubscription method and have this new subscription use a default value for certain parameter. How can I do this?

    Hi Marianne,
    I have to create the subscription programatically, which is different from what you mention. To further clarify my challenge:
    I have three parameters in a report: date-interval (string), start-date (date), end-date (date). If the user selects for example "last week" as the date-interval, the DEFAULT values for the other two are as follows:
    Code Snippet
    start-date=DateSerial(Year(Today),Month(Today),Day(Today)-Weekday(Today)-6)
    end-date=DateSerial(Year(Today),Month(Today),Day(Today)-Weekday(Today)-1)
    The user can then select intervals like "today", "yestarday", "this month" etc, and the other two parameters are calculated based on that date-interval parameter. Now, If I programatically create a subscription to a report that contains these three parameters and set a value of "last week" for the date-interval parameter, the subscription stores the fixed days (say september 10 to september 16) producing a report of the same week every time the subscription is run and not updating the correct interval to LAST-WEEK!. What should I put as the value for start-date and end-date when I create the subscription to have these two params get the DEFAULT calculated value based on the third param date-interval?
    Hope to have been more clear now.

  • Filtering internal table using select-option values

    Hi,
    I got an internal table with select-option values. for eg.  it_perno with the values  I  BT    000160    000170.
    Now i got another second internal table which is have the person number. Now i need to filter this second internal table based on the values from the select option table. my question is
    i can collect all the values from 160 to 170 in a separate table by looping over the select option table. and then based on the values filter the second internal table person number.
    But what would be the case if the select option contains both intervals and multiple options. For eg.
    I BT 000160      000170.
    I EQ 000185.
    So can you suggest any good solution, that based on this select option table i need to filter the second internal table Person number.
    Thanks in advance.
    Regards,
    anbu.

    Hi,
    Can you not use the select-options in the Select query while populating the internal table.
    SELECT pernr FROM pa0000 INTO it_tab WHERE pernr IN s_pernr.
    If you cannot do this and you do not want to delete the unwanted entries, then you can use the WHERE clause in the LOOP statement to process the specific entries required:
    LOOP AT it_tab INTO wa_tab WHERE pernr IN s_pernr.
    Regards,
    Aparna Alashe.

  • NW04s(SP7/FEP7)-Select Filter value for HIER in 3.XBexAnalyzer doesn't work

    Hi,
    We went live with SPS 7/FEP 7 and we are having problem in 3.X Bex Analyzer with "Select Filter Value" for charcteristic having active hierarchy(in this case it is using time dependent hierarchy). (For Eg: Organization Unit)
    If I inactivate the hierarchy for organization unit at query level and then execute the query, then "select filter value" works for Organization Unit.
    NOTE: I checked other query using hierarchy (not time dependent hierarchy) and I was able to do "select filter value"
    Please let me know if any OSS note is available for this issue so that we can fix this issue in our Production Environment.
    NOTE: The above issue works in SPS 8/FEP 802 with 3.X Bex Analyzer.
    Thankyou,
    -Sini
    Message was edited by: Sini Kumar

    Hi,
    Did you have an asnwer to your problem?
    We've a similar problem we had a technical upgrade to BI 7.0. But we still work with the frond end tools of 3.5.
    When we select in the Bex analyzer a node in an hierarchy it shows the result, but if want to select an other node we must first remove the old filter. This wasn't when we're on the 3.5 enviroment.
    Maybe if the problem is solved, this can help us.
    Thanks in advance!
    Regards,
    Juriaan

  • Reporting Services will not automatically use a different replica for the report server databases when a failover occurs. How to overcome this issue

    Reporting Services offers limited support for using AlwaysOn Availability Groups with report server databases. The report server databases can be configured in AG to be part of a replica; however Reporting Services will not automatically use a different
    replica for the report server databases when a failover occurs. How to overcome this issue? is there any workaround for that..
    Rahul

    Hi.
    With the AlwaysOn listener you should have a single DNS name to connect to regardless of which cluster node is active. Are you using the listener service? If not, please refer to the link below.
    http://msdn.microsoft.com/en-us/library/hh213417.aspx#AGlisteners

  • Defining default value for financial reports display in the workspace (9.3)

    Hi
    I need to change the default value for financial reports workspace preview mode, for every workspace user. It is actually set on html, and I would like to have pdf instead.
    This option can be changed when logged on the workspace, in file->preferences->financial reporting->default preview mode. However I want every user to start with the right settings, so they dont have to change anything manually.
    I have tried to do it with Shared Services : under projects, BI+, assign preferences. From there I can change the default folder and the start page (the general preferences), however I cannot find the options for financial reporting.
    Is there a way to change these values with hyperion tools ?
    If not, is it possible to change it directly in the repository DB ?Thanks and best regards

    We looked at this about 2 years ago - from memory, you can only set preferences when the users are first setup in Shared Services, under the manage preferences section of the wizard.
    I can't remember if there is a settings file you can edit for the default users - i think there is, but again this must be set before users are set up.
    We looked at changing users preferences, but gave up on the idea as all users had been provisioned already :-(
    Cheers, Iain

Maybe you are looking for