Access htmldb_application.g_f01 from Report Query ?

I want to have a search functionality built into the report itself, so, was trying to create a sql report as:
select htmldb_item.hidden(1,null) empno,
htmldb_item.text(2,null) ename,
htmldb_item.select_list_from_query(3,null,'select distinct job, job from emp') job,
htmldb_item.popupkey_from_query(4,null,'select ename, empno from emp',10) mgr
from dual
union all
select empno, ename, job, mgr
from emp
where empno = NVL(htmldb_application.g_f01(1), empno)
and ename = NVL(htmldb_application.g_f02(1), ename)
However, this gives an error saying "ORA-06553: PLS-221: 'G_F01' is not a procedure or is undefined".
I changed the radio button to parse query at runtime only to ensure that the collection gets created first, but even then during runtime it gives the same error. I tried to create two reports (to try conditional display) the first report contain the union clause, and the second report just containing select * from emp where empno = htmldb_appl....
even this is giving error.
Is there anyway to achieve this functionality ?

Ok, I created hidden columns for :p1_empno, p1:ename, p1:job etc and in a submit process assigned them to the htmldb_application.g_f01, ...etc, and changed the query to
from emp where empno = nvl(:p1_empno, empno) and ....
this is working,
(a)Is there any better way to do it instead of creating these hidden columns.
(b)how can we toggle this htmldb_item.hidden, ..., row (search row) display ? clicking on an icon in the column header should either display this row and clicking it again should hide this row.

Similar Messages

  • Send .pdf-file from report query in an email

    i don't know how i can refer to a immediately created .pdf-file of a report query.
    if i klick a button following steps should happen (in background):
    1. create .pdf-file of an existing report query (where is this document stored?)
    2. send this file via email-attachment (how can i refer to the created file and use the apex_mail.add_attachment procedure)
    i hope somebody can help me!
    maddl
    Application Express 3.1.0.00.32
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi

    Maddl,
    Typically, when you have a report query, associated with a report layout, you print it using a button that branches or links to a URL with a special request that initiates the download of the PDF document. In that case, you PDF is not stored anywhere on the server, it's passed from your rendering engine to your client PC / browser.
    If you want to render the PDF document on the server, and attach it to an email using add_attachment, then you would use the print API (introduced in APEX 3.1). You can call apex_util.get_print_document, with specifying the report query name and report layout name, and get back a BLOB, which you can then attach to an email. here's the links to the documentation of that API:
    http://download.oracle.com/docs/cd/E10513_01/doc/appdev.310/e10499/api.htm#CHDDECIA
    Regards,
    Marc

  • Get XSD from Report Query

    APEX 4.0.2
    Oracle 11.2.0.1.0
    Hello,
    We are trying to retrieve the XML Schema for a Report Query.
    The following code example is working, but the 'xsd' parameter for p_document_format is not documented.
    Is 'xsd' a supported parameter value for APEX_UTIL.GET_PRINT_DOCUMENT?
    v_blob := APEX_UTIL.GET_PRINT_DOCUMENT (
        p_application_id      => NV('APP_ID'),
        p_report_query_name   => 'test',
        p_report_layout_name => null,
        p_report_layout_type => null, 
        p_document_format     => 'xsd',
        p_print_server => null);Thank you in advance!

    Hi Eric,
    We have four different versions of apex_util.get_print_document, so depending on what you want to do, you can create PDFs and other document types based on your own XML data, your own style-sheets, or referencing pre-defined report-queries, with pre-defined layouts, or custom layouts. We support the output formats I've previously listed for all four versions. However the internal implementation of those APIs is different for the APIs that reference report queries and those that reference custom XML data. When referencing report queries, APEX first loads and executes those queries and generates the XML data, and then passes the XML on the the print rendering engine. The parsing and execution of those queries happens to use the same internal functions that are also used on the report query edit page, where you have buttons that allow for downloading XML and XML Schema representations of your report query. Those XML and XSD documents are intended to be used with the BI Publisher Word Plug-In or third-party XSL design tools to design report layouts. Now given that the same internal functions are used, you can actually generate XML Schema (XSD) documents using the apex_util.get_print_document API, but only with those versions that let you reference a pre-defined report query. This isn't officially supported, so I can guarantee that this behavior won't change in the future, though I don't see why we would change that. The main reason for supporting XML in those APIs is really to test the print functionality without requiring a print rendering engine. But looks like there are some other use cases for those output formats as well.
    Hope the helps,
    Regards,
    Marc

  • Restrict URL Access when linking from report

    I have an application that will be a little like a wizard in that I need to control how users get to a form, so I would like to prevent them from being able to just going straight to that page and entering data into the form. I tried using various session state security options, including No URL Access, but that blows up when I try to link from a report to that form for editing purposes.
    Is there some way I can link from the report if the target page restricts URL access, and can get a get a brief overview (or point me to some documentation) on the various branch types? I can't find a good explanation anywhere and I'm hoping that solves my problem.
    thanks.

    Hi,
    1.
    What about using an Authorization Scheme and then using Security of Page Attributes.
    In fact it is schema of users, roles, and passwords.
    2.
    f?p=App:Page:Session:Request:Debug:ClearCache:itemNames:itemValues:PrinterFriendly
    f?p=6000:6004:&SESSION.::NO:6003:MY_ITEM1,MY_ITEM2,MY_ITEM3:1234,,5678
    This example:
    * Runs page 6004 of application 6000 and use the current session ID
    * Clears the current session's cache for items on page 6003
    * Indicates debug information should be hidden (NO)
    * Sets the value of MY_ITEM1 to 1234, sets the value of MY_ITEM2 to null
    (indicated by the comma used as placeholder), and sets the value of MY_ITEM3 to 5678
    - Into Column Attributes/Column Link/Link Text pick an icon.
    - Select for Attributes/Column Link/Target “URL” for table Emp_Address and into URL field type:
    javascript: popupURL('f?p=&APP_ID.: 6004:&SESSION…………');
    You can use the value of any Item. Then in the URL link page check that item.
    Moreover, you can use f?p=&APP_ID.: 6004:&SESSION…..My_Item:#ReportColumnName#.......
    I hope this would help.
    Konstantin

  • APEX 4.0 Report Query column limitation, 43 column maximum for the result!

    Hi there,
    I'm trying to generate report from Apex 4.0.1, but I got stucked with column limitation when I'm executing the report query.
    Case:
    Environment: oracle 11g, apex 4.0.1, oracle BI 11, windows xp
    Table: My test table is quite simple, by creating a sample table with 44 columns, the column name is random, i.e. column1..column44, column data type is varchar2 (20)
    report query:my report query is also simple, by "select * from testtable"
    Data: no data in my sample table
    Error: then I'll get the error: "HelpORA-06502: PL/SQL: numeric or value error: character string buffer too small"
    solution: If I shrink the table column from 44 to 43, then the report can be generated to xls, pdf, etc.
    Question: Is there any column limitation for Apex report query? I know there's a 32k row size limitation for varchar, but since there's no single data in my table, it shouldn't be the case.
    Does anybody get this issue before? Thanks for any generous input!! :)
    Horatio

    hi marko,
    Thanks for the reply, but i can't find the 45 column limitation from report query and report printing. any clue for this call?
    Regards
    Horatio

  • Access APEX_APPLICATION.G_F01 in an SQL query for a report

    APEX 4.0.2.00.07
    I've got a standard report with checkboxes. The SQL is along the lines of:
    SELECT APEX_ITEM.CHECKBOX(1,empno,'CHECKED') " ",
           ename,
           job
    FROM   empThen I have another report below this, which I want to drive based on the items checked in the first report. I know that the checkbox values will go into the APEX_APPLICATION.G_F01 collection. Normally these are accessed using pl/sql such as:
    FOR I in 1..APEX_APPLICATION.G_F01.COUNT LOOP
        DELETE FROM emp WHERE empno = to_number(APEX_APPLICATION.G_F01(i));
    END LOOP;But is there any way I can access the collection from the sql for my second report.
    i.e. I want my sql to be something like:
    SELECT empno, day_of_service
    FROM   emp_timesheet
    WHERE emp_no in <get access to the collection here>I was hoping that the check box collection would be available from the APEX_COLLECTIONS view, but it doesn't seem to be there.
    Thanks,
    John

    John,
    If the goal is to hold onto the checked values for some other processing then you could add them to a collection yourself.
    create a process on your page which looks something like this:
    This will create your collection if it does not exist or delete everything currently in it if it does exist and then insert your new selections.
    DECLARE
       l_col_name varchar2(30) := 'EMP_SELECTED';
    BEGIN
        apex_collection.create_or_truncate_collection(l_col_name);
        FOR I in 1..APEX_APPLICATION.G_F01.COUNT LOOP
            apex_collection.add_member(
                l_col_name,
                to_number(APEX_APPLICATION.G_F01(i))
        END LOOP;
    END;your second query could look something like this:
    SELECT empno, day_of_service
      FROM emp_timesheet
    WHERE empno in (select C001 empno
                       from apex_collections ac
                      where ac.collection_name = 'EMP_SELECTED')
    Edit
    some people choose to create a view ontop of certain collection queries which will be reapeated throughout the application so you could also just
    create view selected_emps as
    select C001 empno
      from apex_collections ac
    where ac.collection_name = 'EMP_SELECTED'   and your new query would look like:
    SELECT empno, day_of_service
      FROM emp_timesheet
    WHERE empno in (select empno
                       from selected_emps)Cheers,
    Tyson Jouglet
    Edited by: Tyson Jouglet on Apr 6, 2011 10:37 AM

  • Execute query from report

    Hello,
    I would like to have a report wich contains a checkbox and a description. Depending on the checkboxes checked, the corresponding queries (stored in the same table, and for each description) should be executed and display the result on another page. The queries should be executed as from clicking a button.
    I have 2 question:
    1. how should I handle it for executing a query stored in a table? is it just report type sql query or something else...
    2. how can I know the exact lines (depending on the checked checkboxes when clicking the button?
    Thanks in advance!
    Regards,
    Sofie

    I'm first trying to count the checked boxes, to see if it is really doing the right thing.
    HTMLDB_APPLICATION.G_F01.COUNT counts the checked ones, right?
    so in my process i have:
    begin
    if HTMLDB_APPLICATION.G_F01.COUNT is not null then
    :P80_TEST := HTMLDB_APPLICATION.G_F01.COUNT;
    end if;
    end;
    but nothing is displayed in the field P80_TEST...
    what is wrong?
    Regards,
    Sofie
    PS: this seems to be a topic only for me :-)

  • Enhancement Req (v4.0): Report Query- Output Format- Derive from Item

    Brief Introduction
    I have 1 major request I would like to make (and 2 lesser ones). The first, I would like to specify custom available output formats for 'Report Query' objects, as well as Reports Regions, Interactive Reports, etc. I believe that this could easily be an instance setting in the Report Server region of the internal workspace, or per workspace / application. Even if not supported on the system wide level, I would recommend that the "Derived from Item" output format "Return Value" be allowed to be returned unaltered to the Report Server. I know that the type is returned as "_xf", and for my purposes I would REALLY like to be able to get something other than the defaults.
    Use Case
    I am creating a custom JasperReports integration (for which I will be launching a public SaaS beta extremely soon). It uses the standard Apex reporting objects (Queries, Layouts, Print Buttons, etc). JasperReports templates are uploaded as Report Layouts and everything works fine. I am, however, wanting to implement as many output formats as are available to me in Jasper...that means Word 07, Excel 07, ODS, ODT, etc. For the items that take a print server override I can handle this in other ways (even though this appears broken [see below]), but for the standard report queries this isn't available. I would basically like the option to define the set of available output formats for the report server, and what the "_xf" returned for each one is.
    Minor Requests
    - Replace Uploaded Templates: If a template is used often and updated, then it has to be changed everywhere...minor irritation.
    - Customize Report Server URL for the Workspace or Application: For SaaS instances, workspace developers may license or have access to reporting solutions that are not (and should not be) available to all of the Oracle instance's workspaces, or may conflict with a service that is already provided by the instance administrators.
    Broken
    When I use the print server override, with the "Use Headers From" option, it appears that neither my content type, nor my content disposition headers are being sent back to the client. This is the work around solution for the non-standard types issue I am requesting enhancement on, so I would like to know what I can do to get this working immediately.
    Additional Info
    As it stands, if the site is available, feel free to sign up for the beta. The beta keys will be exported soon to the instance and made available. Instructions on setup will also follow:
    https://apex.vendelinc.com/apex/f?p=home

    Hi, please did you get any solution to this issue? I am having similar challenge right now.
    select     EMP.DEPTNO as DEPTNO,
         DEPT.DNAME as DNAME,
         EMP.EMPNO as EMPNO,
         EMP.ENAME as ENAME,
         EMP.JOB as JOB,
         EMP.MGR as MGR,
         EMP.HIREDATE as HIREDATE,
         EMP.SAL as SAL
    from     SCOTT.DEPT DEPT,
         SCOTT.EMP EMP
    where EMP.DEPTNO=DEPT.DEPTNO
    and      DEPT.DNAME =upper(:dname)
    This run perfectly in sql developer, toad, and even inside publisher if I login directly to publisher to create report.
    Generating this same query in shared component query builder and testing it returns no data found. If I remove the last line, it works. but with the last line, it return no data found. It seems no one has been able to provide solution to this issue

  • How do we reference report output (E.G.htmldb_application.g_F01.)?

    Hi there,
    We are trying to reference data returned by a query using an array statement such as XX := htmldb_application.g_F01.count;
    The value is always zero. Are we missing something?
    Thanks

    Hi Scott,
    Correct.
    We have say 2 columns FUND and EXCEL_FUND. A snippet of the query would look like;
    select a.segment1 fund, '="' || a.segment1 || '"' excel_fund.....
    they return 01 and ="01" for example.
    We conditionally display 01 on the on-screen report but we want to export ="01" to excel so the leading zeros are not stripped out.. The browser displays the report region data 01 correctly. But we cannot export ="01" as it appears that unless you display the value you cannot export it(version 3.1).
    So we have our own export to excel button which works if we re-run the query. But we do not want to re-run the query, we want to re-use the "result set" of the on-line report(sorry, i am not certain what all the terms are). Everyone seems to use the htmldb_application package but we don't know if the htmldb_application.g_F01 array item is loaded up by the app or do we have to do it? We are in a bit of a fog.
    Any help is appreciated.
    Thanks

  • Unable to access the data from Data Management Gateway: Query timeout expired

    Hi,
    Since 2-3 days the data refresh is failing on our PowerBI site. I checked below:
    1. The gateway is in running status.
    2. Data source is also in ready status and test connection worked fine too.
    3. Below is the error in System Health -
    Failed to refresh the data source. An internal service error has occurred. Retry the operation at a later time. If the problem persists, contact Microsoft support for further assistance.        
    Error code: 4025
    4. Below is the error in Event Viewer.
    Unable to access the data from Data Management Gateway: Query timeout expired. Please check 1) whether the data source is available 2) whether the gateway on-premises service is running using Windows Event Logs.
    5. This is the correlational id for latest refresh failure
    is
    f9030dd8-af4c-4225-8674-50ce85a770d0
    6.
    Refresh History error is –
    Errors in the high-level relational engine. The following exception occurred while the managed IDataReader interface was being used: The operation has timed out. Errors in the high-level relational engine. The following exception occurred while the
    managed IDataReader interface was being used: Query timeout expired. 
    Any idea what could have went wrong suddenly, everything was working fine from last 1 month.
    Thanks,
    Richa

    Never mind, figured out there was a lock on SQL table which caused all the problems. Once I released the lock it PowerPivot refresh started working fine.
    Thanks.

  • Export to Excel from Report region (pl/sql returning sql query)

    Hello all,
    I have encountered an interesting problem. I have an HTMLDB application with a lot of sql reports coded straight inside the report region. In order to better organize my reports, I decided to
    1. make all my report regions of type "Pl/Sql function returning SQL query"
    2. create a package inside my database schema which houses all reports as pl/sql functions returning VARCHAR2, the string returned being the report query
    3. just calling "return package_name.function_name" from inside my report region of type "Pl/sql function returning SQL query".
    This technique seemed to work perfectly. The reports were being returned as expected. I was then asked to provide the "Export to Excel" capability to all my reports. This seemed like a piece of cake using HTML DB's "Export to Excel" extension. However, the "export to excel" does not function correctly when my reports are inside a package in the database. HTML DB tries to export but inside the excel spreadsheet, instead of seeing row data, I see:
    <pre>failed to parse SQL query:
    ORA-00936: missing expression
    <!-- select a.username, b.table_name, 'View Row Data' from schema_browser_user_list a, all_tables b where a.user_id = and a.username = b.owner order by b.table_name asc
    --!>
    </pre>
    I am building my query string inside of my package functions by using a combination of literal strings and concatenating them with some parameter values being passed in. It seems that the HTML DB engine which exports the report to excel does not properly understand the concatenation of variables as can be seen by the empty space to the right of the equal sign in the "a.user_id = " clause. Does anybody have any input as to whether this is a known issue or if I am doing something wrong? Thanks a lot for your time.
    - Kenny R.

    James,
    Thanks for the quick reply. I think you mis-understood what I'm doing. All I'm doing is creating packaged functions which return VARCHAR2. The VARCHAR2 that they return is the report query. With this technique, I no longer have to type the query into the HTML DB report region. Instead, I make the report region a "Pl/sql function returning sql query" and make the following call: return package_name.function_name(some_application_items passed in as parameters)
    This makes for a much more organized html db app. The problem is that the "export to excel" function does not correctly interpret the VARCHAR2 that my packaged functions are returning. Is this a better explanation? Thanks again for your time.
    - Kenny R.

  • How to find a query name from report name

    I have a report in my system with the name AQICMM==========P2============ . I believe this was created from a query. How to find the query corresponding to this report ? I need to change the logic for certain columns of the report. How to know if this was created from SQVI or SQ01 or any other transaction.
    THanks.

    Found it..Query name is P2. It was in a different query area..Standard area and not custom area where I was initially looking at.
    Edited by: Shareen Hegde on Aug 22, 2008 5:14 PM

  • Report query not returning the field value from external table

    hi
    I have an issue regarding reports. I have a query having 4 fields from external table and remaining from db tables. the report query returns all the fields from the db tables and only 2 fields from external table. but the same query if I tried in plsql developer it returns all the fields values.
    Can anyone please help me in this issue.
    Thanks and Regards
    kk

    Duplicate post?
    value not displaying in report whereas it returns in plsql developer
    value not displaying in report whereas it returns in plsql developer
    Please log a SR if you do not get any reply to your thread instead of creating new one.
    Thanks,
    Hussein

  • How to display first row value returened from a query as checked as default in a report

    How to display first row value returned from a query as checked as default in a report
    Example
    Parameter 1
    Paramerter2
    ABD
    x(checked)
    Test
    DEF
    JMG
    Mudassar

    Hi Mudassar,
    The issue is caused by the order in which the parameters appear in the report data tab can be difference between our report execution and it failing. In other words, “Parameter2” is execution before parameter “A” due to this issue. We can adjust the parameter’s
    order to solve the issue.
    If “Parameter2” is parameter “A”, we cannot use that expression. Because fields cannot be used in report parameter expression, if we want to display the first value returned from a query as default value, we have to fill the “Specify values” text box with
    the specific value in Default Values dialog box.
    Regards,
    Alisa Tang
    Alisa Tang
    TechNet Community Support

  • IR Dashboard report from new query not getting all Quick Filter selections

    I inherited an IR Dashboard .bqy and my user recently added a new Query, Result, Table, and Report section to it. I cannot get the report to dynamically filter based on the date chosen in the existing Quick Filters section. It seems to be filtering the Location properly (drop down in Quick Filters section), but not the date. Her result section refuses to show anything less than ALL dates from the query.
    The other reports/pivots already on the dashboard work fine with all QuickFilters.
    In my attempt to integrate her new report in to the dashboard I add a new hidden "dummy" pivot (based on the existing query btw, not the new query-could that be the issue? it's dummy though so i figured it was ok), reference this pivot in the Embedded Targets object I found by adding "Object~Pivot4|Type~9|Target~Casket Margin Summary" line,
    went to Dashboard Studio and was able to Associate this report in to the right frame, etc.
    In the script behind the QIQ date "Set Filters" button I saw this code for the existing "Result_Detail" section so I added a line for my new "Results_Merch Detail" section.
    var objServDate = ActiveDocument.Sections["Casket Margin"].Shapes["Service_Date^qiqlbx^showname^a"];
    if (objServDate.SelectedList.Count > 2){
         Alert("Please select only two dates");
         return;
    ActiveDocument.Sections.Item(txlMe.Text).Qiq_onControlClick(this.Parent,this)
    ActiveDocument.Sections["Results_Merch Detail"].Limits["Service Date"].Operator = 11
    ActiveDocument.Sections["Results_Detail"].Limits["Service Date"].Operator = 11;
    I tried it with and without an extra semi-colon at the end of my line. Is that the right way to tell it to apply it to more than 1 Result??
    Worked with this for hours now and can't find whatever else is hidden which tells the QIQfIlter Date to refresh this NEW query/result when chosen.
    I tried to make sure all Filter items exist in the new query's Request line, one was missing. i haven't gone back to Dash Studio since then and re-saved, does THAT matter? I saved the .BQY and re-processed, still no luck.
    can anyone help? I'm desperate for suggestions.
    Thank you!
    Karen

    This has been resolved. The main thing that kept it from working was I kept launching the Dashboard Studio after I was in Design mode so any time I got to the QIQ Filters setup screen it looked like cryptic code and there was nothing to alter or play with to try and force the filters to take effect, so I never changed anything.
    This time I launched the Dashboard Studio while accidentally in regular mode, blessing in disguise. on Step 1 of the wizard I chose QIQ Filter Properties from the configuration drop down list which pops up the Local Filters setup window, now in place of code syntax there was english-like words & action items for me to play around with so I chose my new result set from the drop down list and highlighted all the limits and clicked "Set Filters". Presto, that did it.
    Also I had to make sure all the columns referenced in the QIQ drop down lists and pick list was in my request line in the Query & Result section, repeat the above, and it's all working great now.
    Thanks,
    Karen

Maybe you are looking for

  • Printer Dosen't Work

    it is wireless and was saying that the printer was offline when i plugged it in still was off line

  • 1.5.1 Opening File in PlsqlNode incorrectly displays a default connection

    SQL Developer 1.5.1.54.40, JDK 1.6.0_04, Win XP SP 2 I have just noticed that opening a file as a PlsqlNode (based on file type preferences) displays a default connection (the connection for the current tab). However, when compiling, you are prompted

  • Open CS6 document with 2 artboards in CS5

    How can I open a document made in CS6 with 2 artboards, in CS5? If I open this document, I only can choose 1 of the 2 artboards. Making a new doc. with 2 artboards and place the document isn't working. Tinke78 from Belgium

  • E4200V2 or E4200V1 - How to tell the difference?

    I currently own a E4200 which I haven't used in years since I switched to ATTUverse. I'm dusting it off and getting ready to use it as I'm switching back to Time Warner Cable.  I need to update firmware and download Cisco connect but I dont know if I

  • Reg: IDOCs n RFs

    Hi, can v import IDOCs n RFCs frm XI server ....?