Refresh Interactive Report Definition via PLSQL

Hello!
I am currently working on set of generic database-apex applications.
That means I have two applications. The first is the admin apex application used to define columns and tables.
The second application is the one for the end users, where they can view and edit the values.
My problem now is: Every time the admin adds or removes a column I need to edit the user-apex application, open the region definition of all interactive reports and switch to the report attributes to add/remove the columns of the report.
I would like to automate this step via plsql. How can I achieve this?
I guess the first step would be to load a list of all IRs...
select * from apex_application_page_ir where application_id = 133;
But I don't know how to reload the columns...
Can anyone help?
Thanks in advance!
BR Mike

Hello Andre, Hello Mimi!
Thank you for your messages.
First to your idea Mimi, i think you brought me on the right track. Using your update statement doesn't works for me.
There are some missing permissions I couldn't grant and in addition I think this would hardly work because apex_application_page_ir is a complex view.
But I am currently working on a solution using the wwv_flow_worksheet_standard.synch_report_columns function. Code like this:
DECLARE
l_flow_id NUMBER (20);
l_region_id NUMBER (20);
l_query VARCHAR2 (4000);
l_result VARCHAR2 (4000);
BEGIN
SELECT application_id, region_id, sql_query
INTO l_flow_id, l_region_id, l_query
FROM apex_application_page_ir
WHERE page_id = 9 AND application_id = 133;
APEX_040100.wwv_flow_worksheet_standard.synch_report_columns (p_flow_id => l_flow_id,
p_region_id => l_region_id,
p_query => l_query,
p_add_new_cols_to_default_rpt => 'Y');
COMMIT;
END;
Unfortunately it doesn't work. When executing the synch_report_columns procedure the following error raises.
ORA-01003: no statement parsed
ORA-06512: at "SYS.DBMS_SYS_SQL", line 1685
ORA-06512: at "SYS.DBMS_SQL", line 629
ORA-06512: at "APEX_040100.WWV_FLOW_WIZARD_API", line 840
ORA-06512: at "APEX_040100.WWV_FLOW_WORKSHEET_STANDARD", line 2735
ORA-06512: at line 23
Maybe you or someone else can reproduce the error?
Therefor you simply need an interactive report on a page, based on a view. Remove some column of the view definition-the IR will display an error like this:
ORA-20001: get_dbms_sql_cursor error ORA-00904: "DUV_FOCUS_OFFSET": invalid identifier
Then execute the code above (use your page and app_id).
After the execution the IR should work again. In my opinion...
@Andre: The application I am working on is a critical pice of software used in a highly sophisticated semiconducter fab.
It is simply impossible to train some of the shift leaders or operators on apex, in fact it is a great thread if someone else can change the application and produces a downtime.
So for me it is necessary to script everything as far as possible. I finished nearly everything, simply the synch of the report columns is missing...
BR Mike

Similar Messages

  • Refresh Interactive Report based on Flash Pie Chart selection

    I have an Interactive Report:
    select ename "Employee Name",
    mgr "Manager
    from     emp e, dept d
    where e.deptno = d.deptno ;
    That i'd like to have filtered by MGR when a Flash Pie Chart is clicked:
    select null link,
    mgr label,
    count(emp_id) value
    from     emp e, dept d
    where e.deptno = d.deptno
    group by mgr ;
    Can someone indicate how i'd do this?
    Thanks in advance!
    John

    Hi,
    This post might help
    Re: Navigable pie-chart
    Regards,
    Jari
    http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0

  • Automatic update of interactive report definition

    Hi,
    I have a IR based on a view, that has dynamic number of columns (because of row to column conversion). For example there are records for year 2010 to 2012, but if user inserts record for 2013, a new column will be added to the view.
    This column is not shown in IR until I go to report definition, click "Apply" and "OK" for adding new columns.
    That's the same for removing columns, means if all records for a year (i.e. 2012) are deleted, I get an error that "2012" cannot be found, because the column is no longer available in view.
    Can the report definition update be done automatically. I don't know, when user insert / delete records for year and don't want to update the definition manually every day.
    chrissy

    Hi Tyson,
    thanks for the answer ...
    adding the columns manually and put conditionally display is not the best solution, but for the beginning should work.
    Maybe someone else has a better solution.
    I thought about collections, but ended at the problem of the column heading naming.
    I also thought about using a classic report, but users want to have the features of IR.
    so if anybody has another idea, I will be happy to hear ...
    chrissy

  • Refreshing interactive report on change of dates

    Hi,
    I have a IR where the source contains the query WHERE from_date = to_char(:P3_FROM_DATE) AND to_date = to_char(:P3_TO_DATE) , now when I change the item value in P3_FROM_DATE and P3_TO_DATE , I want the IR to change according the selected values .
    I tried with dynamic action ,but it didnt work , may be I gave the wrong code ...
    How can I achieve this ?
    Thanks & Regards
    Umer

    Nice1 wrote:
    Hi,
    I have a IR where the source contains the query WHERE from_date = to_char(:P3_FROM_DATE) AND to_date = to_char(:P3_TO_DATE) , now when I change the item value in P3_FROM_DATE and P3_TO_DATE , I want the IR to change according the selected values . Use <tt>\</tt> not <tt>\{quote}</tt> when posting code.
    What is the data type of the FROM_DATE and TO_DATE columns? (You should not use TO_DATE as an identifier as it is the name of a built-in function.)
    If it's DATE, do they store time as well as date information?
    As APEX items, P3_FROM_DATE and P3_TO_DATE are character strings and <tt>to_char</tt> should not be used. If the database columns are DATEs, then <tt>to_date</tt> should be used:WHERE from_date = to_date(:P3_FROM_DATE, '<format mask of P3_FROM_DATE item>') AND to_date = to_date(:P3_TO_DATE, '<format mask of P3_TO_DATE item>')
    I tried with dynamic action ,but it didnt work , may be I gave the wrong code ...
    What did you try with Dynamic Action? How can we know if it's the wrong code if you don't show what you did?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Synchronize IR columns via plsql API

    Hi!
    I would like to use the package wwv_flow_worksheet_standard to synchronize the IR columns in my application out of plsql.
    Reason: My IR are based on views (simply: Select * from view_name) I have lots of them and they change frequently via plsql execute immediate.
    What I have tried is:
    DECLARE
    l_flow_id NUMBER (20);
    l_region_id NUMBER (20);
    l_query VARCHAR2 (4000);
    l_result VARCHAR2 (4000);
    BEGIN
    SELECT application_id, region_id, sql_query
    INTO l_flow_id, l_region_id, l_query
    FROM apex_application_page_ir
    WHERE page_id = 9 AND application_id = 133;
    APEX_040100.wwv_flow_worksheet_standard.synch_report_columns (p_flow_id => l_flow_id,
    p_region_id => l_region_id,
    p_query => l_query,
    p_add_new_cols_to_default_rpt => 'Y');
    COMMIT;
    END;
    Unfortunately it doesn't work. When executing the synch_report_columns procedure the following error raises.
    ORA-01003: no statement parsed
    ORA-06512: at "SYS.DBMS_SYS_SQL", line 1685
    ORA-06512: at "SYS.DBMS_SQL", line 629
    ORA-06512: at "APEX_040100.WWV_FLOW_WIZARD_API", line 840
    ORA-06512: at "APEX_040100.WWV_FLOW_WORKSHEET_STANDARD", line 2735
    ORA-06512: at line 23
    Can anyone help?
    Best regards,
    Mike

    Hello Joni!
    Thank you for your reply! Unfortunately this is not what I am searching for.
    I want to update the interactive report definition on my apex page out of plsql.
    E.g. the query of the IR on my page is: Select * from view_name
    When i add/remove columns from the view, the IR is broken. In order to repair the IR I need to logon to apex, edit every IR and save it again. Afterwards the new columns will appear in the report.
    Because my application has about 30 IR's and columns will change frequently I would like to script this step.
    The function APEX_040100.wwv_flow_worksheet_standard.synch_report_columns sounds like it does exactly what I need.
    Unfortunately what I tried doesn't work. (Look above)
    BR Michael

  • Interactive Report - is there a way to find and change if necessary the unique column.

    While creating an interactive report I accidently entered the wrong "unique column" on the sql query page.  Is this a big deal and how can I find and change if necessary.
    Query Builder
    Link to Single Row View
    Yes
    No
    Uniquely Identify Rows by
    ROWID
    Unique Column
    Unique Column

    33ac2d45-960f-45af-acba-507f01d18e08 wrote:
    Please update your forum profile with a real handle instead of "33ac2d45-960f-45af-acba-507f01d18e08".
    While creating an interactive report I accidently entered the wrong "unique column" on the sql query page.  Is this a big deal and how can I find and change if necessary.
    Query Builder
    Link to Single Row View
    Yes
    No
    Uniquely Identify Rows by
    ROWID
    Unique Column
    Unique Column
    Yes. You can change this using the Uniquely Identify Rows by/Unique Column properties in the Link Column section on the Report Attributes tab of the interactive report definition.

  • Creating Interactive Report BQY through SDK

    Is there anyway to create interactive reporting BQY file through Interactive reporting SDK via Java Coding?
    Thanks
    Sakthivel K

    What are you fully trying to do? What version are you using?
    Have you looked at the JavaDocs for IR?
    I have done it via VB.
    You may want to explore documentation within Dashboard Studio. specifically related to Impact Manager and BOM.
    Wayne Van Sluys
    TopDown Consulting

  • Recompile the Interactive report at runtime

    Hi Everyone,
    I have an Interactive report. It is based on the table that is generated by the job process. The process is executed every fortnight. The Job process drops the table and recreates it.
    The table gets created with the same or with different column names.
    When I run the report, it is validated against the older column names and complains in case any of it goes missing.
    What is the way by which I can get this report working without manual intervention? (without logging in as developer and a click on Apply button, to include the column changes).
    I searched the forum and could find some threads where the same topic is discussed but I was not able to figure out clear solution to achieve this.
    [ http://forums.oracle.com/forums/thread.jspa?messageID=3425129)]
    Thanks,
    Pooja.

    Hi Tom,
    Thanks a lot for replying.
    I followed the steps from the following link, and got it working.
    http://www.oracleapplicationexpress.com/2009/02/interactive-report-based-on-plsql.html
    Thanks,
    Pooja

  • Display interactive report rows based on user role.

    Hello,
    Can anyone please help me out with this issue. i have an interactive report and now i want to make this report as conditional based on user role. Like i want to dispaly all the report rows for an Admin user role and for a developer I want the report to display only his/her rows. Can anyone please help me how can I resolve this issue.
    Do I need to have two separate reports for each role or can we make achieve this with only one report.
    thanks,
    Orton

    Here is a possible answer.. Build your Interactive report off of a collection. And when you build the collection you can build an if statement to either build your select with or without the filtering of user_id..
    See this blog entry for how to build a interactive report from a collection: http://www.oracleapplicationexpress.com/tutorials/71-oracle-apex-interactive-report-based-on-plsql-function
    Thank you,
    Tony Miller
    Webster, TX

  • Getting interactive report settings

    Hi!
    Is there any way to get interactive report setting via pl/sql or javascript? Like current control breaks, highlights, custom columns etc.

    Hi Andrei,
    You can get all the settings from the APEX views with prefix APEX_APPLICATION_PAGE_IR.
    Machaan

  • 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

  • Row filter on Interactive Report via URL parameter

    Hi,
    I've searched the forum but can't find a concise answer.
    Is it possible to pass a parameter (p_X) from one page to another via the url and then use p_X to act as a row filter in an Interactive report?
    Thanks for the help
    Joel

    Joel -
    Read the link that Andy posted. It is a pretty good source. This topic is not really that difficult to do. I have done it several times. Make sure that you understand the URL syntax for APEX. If you need a refresher on this take a look at http://www.oracleapplicationexpress.com/tutorials/55
    Austin

  • Interactive reporting : error while refreshing MSSQL data in Workspace

    Hi all,
    I recently work with Hyperion and I am facing an issue that makes me crazy.
    My configuration is simple :
    - 1 win2003 server with Hyperion Interactive Reporting services and workspace installed (both works properly)
    - 1 winXP machine with MS Sql Server 2005
    - My dev PC an winXP with IR studio.
    I created an IR report with a MSSQL query that retrieves data into a Table.
    The report is displayed properly and the data is OK.
    When I refresh the data in IR studio, everything is OK.
    I import the OCE file into the the workspace, following by the BQY file.
    The report is displayed properly in workspace with the correct data.
    I change the data in the MSSQL server and I try to refresh the report in the workspace.
    So, I open the report in the workspace and I click on the refresh button.
    But when I do that, I get an error message.
    I read somewhere that we have to configure the DAS.
    I assume that the configuration is made via the Administer/Database connection management (sorry if names are not correct, but I have a french version).
    But when I try to add a new connection, I have only 4 choices for the type of database : Essabse, Financial Management, Planning and SAP BW.... No MSSQL Server.
    I hope that anyone among you can help me, but anyway, thanks for reading my post.

    You need to enter DATABASE details in DAS (Data Access Services) by running Service Configurator.
    Then run Remote and Local Service configurator to enter database details.
    ##I assume that the configuration is made via the Administer/Database connection management (sorry if names are not correct, but I have a french version).
    This is something related to Financial Reporting.
    Hope this helps.
    Regards,
    Manmohan Sharma

  • Column link in interactive report to run procedure and refresh

    I have an interactive report which displays a report based on a table. This is a summary table populated overnight from some complex spatial analysis, which takes a few hours to run. I have a requirement to allow the user to refresh one row in this table - they would do this during the day if they needed to see the most up-to-date values.
    I have a package with two stored procedures - one which does the full refresh of the table, and one which refreshes one row when PK is passed in.
    One of the columns in the table is 'last_refreshed' which is a date - this is shown in the interactive report including minutes.
    I was thinking that maybe I could include a hyperlink on this 'last_refreshed' date column in the report. When a user clicked on it, it would run the stored procedure for that row and would refresh the report.
    Any ideas on how I could do this? I've hit a bit of a dead end for now.
    Thanks

    OK, I worked it out.
    I created an application item to store a global variable.
    Then in the column attributes of the report, I set the 'last_refreshed' to be a linked column, setting target to the current page and then setting the application item global variable to be the row PK.
    Then I have a Process which runs the required stored procedure reading the application item global variable, set to run on page load.
    Sorted.

  • Interactive Report's Column Definition - Single Row View Label Bug?

    Hello,
    I have an Interactive report that I've added a Blue background to certain column headings (done by giving Column Heading a background color), this works fine except for the Single Row view - it displays the &lt;....&gt; code I used to get the background color and the column heading. I've tried to change the Single Row View Label by unchecking the 'Use Same Text for Single Row View' on the Column Definition and giving a different label, it just ignores whatever I put in and shows the Column Heading with the &lt; .... &gt; code. Is this a Bug or am I doing something wrong?
    Thanks,
    Anna

    Hi Anna,
    I believe that it is a bug.
    If the 'Use Same Text for Single Row View' checkbox is unticked and some text is entered in the 'Single Row View Label' field it gets ignored completely when viewed in the single row view and the existing value in 'Column Heading' is used.
    I wanted to do something similar to you, colouring some of the Interactive Report column headers, and it works fine in the IR report itself but shows the code (span style:color etc) in the single row query. I am using Apex 3.1.1 and the Sand Theme.
    I created a simple application on apex.oracle.com using the red theme and in single row view it still ignores the 'Single Row View Label' but interestingly shows the Column Heading text without the code. This indicates that there could be a work-around by altering the theme.
    Regards,
    Chris

Maybe you are looking for

  • Java.lang.NoClassDefFoundError when opening Sun ONE Studio 4 CE

    Hi! I have installed Sun ONE Studio 4 CE with windows 2000 OS and when I open the runidew.exe, it's application I'm getting an error that says " A java.lang.NoClassDefFoundError" and ide.log messsage is this Log Session: Saturday, May 17, 2003 3:20:5

  • Restrictions on JPanel

    Sorry, just deleted the whole post. It was about having trouble calling up a class which extends a JPanel from a class which extends a JFrame. I have messed about a little and came up with this. I have to add my JPanel class to a JFrame, so in my JFr

  • External hardrive issues!

    So I just ordered my MacBook and I'm nervous about my external hard drive which I'm currently using on my PC for my anime and to backup my itunes. If I want to use it with my MacBook would I have to reformat it and therefore lose all the stuff on my

  • Variables on 0FISCPER

    Is anyone aware of any variables on 0FISCPER which give me: 1) Year to Date 2) Previous Fiscal Year I need this cumulated? Thanks

  • Enhancements to SQL Developer to Compete with TOAD.

    1) Allow to describe on an object name in a browser. Pop up new browser for described item. in Toad the key is F4. Allow an accelerator to be set. 2)Replicate all the objects in Schema browser that exists in TOAD. Allow the user to change the Connect