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 :-)

Similar Messages

  • 0ADHOC error while executing the query from Report Designer

    Hi All,
    When I am executing The Query from Report Designer,  am getting the below error.
    Please help me in this regard.
    The initial exception that caused the request to fail was:
    The Web template "0ADHOC" does not exist in the master system
    com.sap.ip.bi.base.exception.BIBaseRuntimeException: The Web template "0ADHOC" does not exist in the master system
    at com.sap.ip.bi.webapplications.runtime.service.template.impl.TemplateService.getTemplateContent(TemplateService.java:57)
    at com.sap.ip.bi.webapplications.runtime.jsp.portal.service.template.PortalTemplateAccessService.getTemplateContent(PortalTemplateAccessService.java:82)
    at com.sap.ip.bi.webapplications.runtime.preprocessor.Preprocessor.parseTemplate(Preprocessor.java:163)
    at com.sap.ip.bi.webapplications.runtime.xml.XmlTemplateAssembler.doInit(XmlTemplateAssembler.java:79)
    at com.sap.ip.bi.webapplications.runtime.template.TemplateAssembler.init(TemplateAssembler.java:133)
    Thanks,
    KVR

    Hi,
    The web template 0ADHOC is usually the standard web template for 3.x queries. The Report Designer executes the reports in java web, thus tries to find the template 0ADHOC in the 7.0 templates and does not find it. Check whether you have maintained the standard web template 0ADHOC for 7.0 reports also:
    Transaktion SPRO -> SAP Reference Image -> SAP NetWeaver -> Business Intelligence -> Settings for Reporting and Analysis -> Bex Web -> Set Standard Web Templates
    Best regards,
    Janine

  • 5200: Error executing query: in report (Workspace - Hyp Financial Report)

    I tried to open a report in the workspace and this error appeared only in an environment in other open properly, the reports are the same.
    Appears Only "5200: Error executing query: in report"
    What can I do?

    The below link may be provide some insight:
    5200: Error executing query: Invalid Item ID. Pls help
    Also check log file for details about the error you are getting so as to get more information.

  • Error executing Query - Workspace report error.

    Hi All,
    One of our user is getting "5200:Error executing Query" message while running the report in Hyperion Financial reporting workspace,how ever if I run this report with my login on his system I am able to run it.
    Could you please put some flash on it what may be the reason behind the same.
    waiting for your reply.....
    Thanks,

    Hi, in general the 5200 error means that the user cannot connect to run the report.
    What this means is that the user either doesn't have:
    - the necessary Workspace permissions, or
    - the necessary data source permissions to run the report. This can either be correct essbase permissions or perhaps the report uses a member they do not have access to see.
    I think from memory there should be a Details button on the error message which the user sees which should provide more detailed information. Can you confirm and reply back?
    Cheers, Iain

  • Problem class important error while executing Query from favorites

    Hi Experts,
    1. I have tried execute the query from favorites it is showing the error message. " Problem class important"
        In the message text: logs showing error message [Attached the message screenshot].
    2. From "Query Designer" Execute [Ctrl+R] gives the error "500 Internal Server Error" [Attached the screenshot]
    3. Able to execute the reports from RRMX.
    No ST22 dumps. Can any one suggest about...how to rectify the errors.
    Thanks in advance...Surya

    Need tyo make sure the problem is with the query/workbook are general issue with all workbooks/query.
    1. Make sure the base query of work book is still executable. RRMX/RSRT.
    2. Execute the work book in Bex/Excel and look for definition of workbook; there might be some thing in the workbook referencing other than base query.
    3. If other workbook are also not working? need to check if other users have same issue.?
    Hope this will help to narrow the problem.
    Gopi

  • Retrieve SQL Query from report without RAS.

    We have a fat client application which uses Crystal Reports.  We upgraded from the RDC/ActiveX viewer to the .Net SDK/.Net Viewer.  One feature that we miss is that we used to read the SQL Query that a report used and wrote it to our log file.  This helped with debugging and with troubleshooting problems in the field.
    Since we only deploy the freely distributable Crystal Reports model and I don't think that RAS falls into this category is there a way which we can read the SQL Query from a report?  If not, could you add this to a list of requested features for future versions.
    I understand why you removed the ability to set the SQL query, but simply reading it does add value.  Maybe it is difficult for you to return this before the report is run in which case giving us the ability to read the value after the report has been run would also be fine.
    Alternatively some sort of event that is fired each time a query is executed would also be helpful as this would allow Crystal Reports clients to monitor SQL from sub-reports.  You could even build a robust logging mechanism which could report additional information (i.e. number of rows returned, formula evaluations, or anything related to report execution).  All of this would make troubleshooting report issues easier for those of us who use Crystal Reports.

    Need to know what version of CR you are using?
    You can use InProc RAS, it comes with CR and is distributed with the runtime files.
    If you are using CR Basic or the version that comes with Visual Studio .NET then no this will not be added to that product line. It is basic functionality only. You will need to upgrade to a Developer version of Crystal reports to take advantage of the the RCAPI features as well as more general API's.
    There is logging for our DB drivers but the log files get very large. If you use ODBC then you have the option to turn on tracing also. Using RAS you don't need to turn on logging as you can get the SQL. This won't be added either.
    Thank you
    Don

  • Execute Query from LOV

    Hi
    There is a Button that run LOV(Show LOV) ,
    how could make the Form Execute Query According to the user Selection from that LOV?
    Thanks

    hi
    Thank you Rahamath and thank you Joachim
    -Create non database item (Item_A). (As you told me Rahamath)
    -Used the LOV to return the value at non database item
    (Item_A) . (As you told me Rahamath)
    -Create Global variable (g_var). (as you told me Joachim)
    -At the trigger When_Button_Pressed I wrote :
    if show_lov (my_lov) then
    go_block('database_block');
    :global.g_var :=:block.Item_A;
         Execute_Query;
    End if;
    - Create Pre_Query Trigger at database block level
    (as you told me Joachim)
         if :global.g_var is not null then
    :id := :global.g_var,
    :global.g_var := null;
    end if ;
    so finally its work
    Thank you a lot for all of you
    bye
    mahmoud

  • Execute Query from string

    Dear forum members,
    Is it possible to execute a query from a string like this:
    DECLARE
      thishere  VARCHAR2;
    BEGIN
      f:='from iv_view_cqir_sum where 1=1 ';
      select sum(a) into thishere [...];
    END;The [...] should be taken from the string f...
    Any comments welcome!
    Cheers,
    Johann

    You can do it in this way:
    SQL> create table test1(id number);
    Table created.
    SQL> insert into test1 values(1);
    1 row created.
    SQL> insert into test1 values(2);
    1 row created.
    SQL> DECLARE
       v_var     VARCHAR2 (10) := 'where id=1';
       v_count   NUMBER;
    BEGIN
       EXECUTE IMMEDIATE 'select count(1) from test1 ' || v_var
                    INTO v_count;
       DBMS_OUTPUT.put_line (v_count);
    END; 
    1- - - - - - - - - - - - - - - - - - - - -
    Kamran Agayev A. (10g OCP)
    http://kamranagayev.wordpress.com

  • Calling execute query from WVI

    i wans to call the execute query function from the when-validate-item or in other words when i exit a text box i know calling execute_query from WVI is restricted but this is my requirement so pls tell me what is the way out for it... is there any other trigger in which i can do this or any other way out
    do reply
    thanx in advance
    amyt

    U will have to use combination of triggers
    depending upon your form.
    Key Next Item and WHen Mouse leave should be used

  • Execute query from OBIEE report

    Hi,
    Is it possible from an OBIEE report, after filtering records, to simply execute a (insert) query/function/stored procedure with this subset of filtered records (only id's are enough) as parameter ?
    Regards

    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 :-)

  • Error execute query from stateful session bean

    Hi,
    I created a stateful session bean, it's flow are as following:
    - client invoke open()
    - client "iterate" using method next()
    - client invoke close()
    In open, I get Connection to db-source, create a PreparedStatement, and execeute the query, store in a resultset.
    In next(), I traverse the resultSet using next().
    In close(), I close both resultset, statemtn, and connection.
    Here's the snippet of my code:public SynchCatalogBean implements SessionBean {
        private Connection conn;
        private PreparedStatement stmt;
        private ResultSet rs;
        private static final String = "SELECT ? FROM ?";
        public void openCategory() throws RemoteException {
            DataSource dataSource =
                (DataSource)jndiContext.lookup(DATASOURCE);
            con = dataSource.getConnection();
            stmt = con.prepareStatement(QUERY);
            stmt.setString(1, "id");
            stmt.setString(2, "category");
            rs = stmt.executeQuery(); //this throws exception
        public String next() throws ... {
            if (rs.next())
        public void close() throws ... {
            rs.close();
            stmt.close();
            conn.close();
    }Well, the problem is, once I test with a simple client, the line rs = stmt.executeQuery() produce exception like this:[SynchCatalog] TRANSACTION ROLLBACK EXCEPTION:Error opening category; nested exception is:
        java.rmi.RemoteException: Error opening category
    [SynchCatalog] java.rmi.RemoteException: Error opening category
    [SynchCatalog]  at matashop.product.ejb.SynchCatalogBean.openCategory(SynchCatalogBean.java:66)
    [SynchCatalog]  at java.lang.reflect.Method.invoke(Native Method)
    [SynchCatalog]  at org.jboss.ejb.StatefulSessionContainer$ContainerInterceptor.invoke(StatefulSessionContainer.java:570)
    [SynchCatalog]  at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:190)
    [SynchCatalog]  at org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSessionInstanceInterceptor.java:209)
    [SynchCatalog]  at org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:133)
    [SynchCatalog]  at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:263)
    [SynchCatalog]  at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:99)
    [SynchCatalog]  at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:195)
    [SynchCatalog]  at org.jboss.ejb.StatefulSessionContainer.invoke(StatefulSessionContainer.java:326)
    [SynchCatalog]  at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerInvoker.java:392)
    ...My stateful-bean is "read-only" bean, it just execute a select statement, so why Jboss complain about transaction exception? Can anyone help me?
    -- Verdi March --

    agree, you cannot pass tablenames as ? parameters. Instead you should generate your SQL statement dynamically
    private static final String = "SELECT ? FROM ";
    public void openCategory() throws RemoteException {
    stmt = con.prepareStatement(QUERY + "category");
    stmt.setString(1, "id");

  • Execute Query from SAP Menu with Analyzer

    Hi.
    I have created a menu for users. This menu contains links to queries that are opened with Internet Explorer.
    Now, i want to have another link but instead of opening it with Internet Explorer, i want to open them with Analyzer.
    Is possible to launch a query trough SAP Menu link in Analyzer? User will not need to open it trough 'Folder + Open Query ..'
    Kind regards,
    Inigo.

    Here are couple of directions:
    1. Create a local workbook which has embedded query. Store this workbook on a remote server or BI/FTP and create a link from it. But once this link is clicked, that workbook will be downloaded and user will have to login again in BEx analyzer.
    2. If we can call transaction "RRMX" from web, it will eliminate problem of relogin.
    3. Launching BExAnalyzer.exe file from web should launch analyzer automatically. Check whether this file accepts any parameters like open dialogue or query name??
    Hope something helps..
    Abhijeet

  • Error During executing query from OBIEE

    Hi,
    I have installed EBS and i have integrated OBIEE with EBS. (on Windows server 2003).
    Now after logging to OBIEE, I went to the subject area for creating a Query.
    After selecting the column when i press button "Display Result"
    The following message is displayed.
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 23006] The session variable, NQ_SESSION.ICX_SESSION_COOKIE, has no value definition. (HY000)
    SQL Issued: SELECT "- Equipment"."Organization (Department Hierarchy)" saw_0 FROM "Manufacturing Hub Catalog" ORDER BY saw_0
    I have added the entry for my DB in Data Source (ODBC).
    Please tell me the reason for this error.
    Regards,
    Niranjan.

    Hi,
    i have a problem:
    when i open a query with OBI Answers i have this error:
    Error Code:OPR4ONWY:U9IM8TAC:OI2DL65P
    Stato: HY000. Codice: 10058. NQODBC [SQL_STATE: HY000|http://forums.oracle.com/forums/] [nQSError: 10058|http://forums.oracle.com/forums/] Si è verificato un errore generico({color:#ff0000}generic error{color}). [nQSError: 16001|http://forums.oracle.com/forums/] Stato errore ODBC: 28000 codice: 18456 messaggio: Microsoft[ODBC SQL Server Driver|http://forums.oracle.com/forums/][SQL Server|http://forums.oracle.com/forums/]Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.. (HY000)
    Istruzione SQL eseguita: SELECT BEN010_TIPO_BENEFIT.X_DESCRIZIONE saw_0 FROM dbo ORDER BY saw_0
    What's the problem and can i do?
    Sorry for my bad english.
    I'm waiting an answer..
    Tanks.
    Roberto Testa
    Edited by: user10366555 on 7-ott-2008 2.42

  • Query based Report (Reports From SQL Query)

    Hi All,
    I am facing a problem with a report. I need your help.
    I am creating a Report From SQL Query (Portal) with some arguments passed at runtime. I am able to view the output, if the query returns few rows ( arount 1000 rows). But for some inputs it needs to generate >15000 records, at this point the page is getting time out (i think!) and showing error page. I am able to execute query from the SQL Plus console ot using TOAD editor. Here the query is not taking more that 2 mins time to show the result.
    If i am executing from Portal i observed that, once i give the appropriate input and hit submit button a new oracle process is getting created for the query on UNIX (I am usign "TOP" command to check processes). The browser page will be shown error page after 5 minutes (i am assuming session time out!) , but on the backend the process will be executed for more than 30 mins.
    Can i increase a timeout of portal page, how i can do this?
    The data returned as a result of the query is sized more than 10 MB. Is caching this much data is possible by the browser page? is the returned data is creating any problem here.
    Please help me to find appropriate reasone for the failure?

    Can you post the URL that is giving you the page not found error ? I am not sure if I can be of much help though.
    In order to increase your chances to get a reply you should also post your question in the Portal Forum - Oracle Application Server Portal
    Edited by: Rodolfo Ferrari on Jun 16, 2009 3:49 PM

  • How to find the last execute query

    Hi, Is there a way to find the last executed query of report?
    Thanks
    Aali
    Edited by: aali on 22-Feb-2010 06:39

    Hi,
    if you hold the necessary privileges, you might find the SQL in the shared pool:
    select last_active_time, parse_calls, disk_reads, buffer_gets, cpu_time, end_of_fetch_count, executions, plsql_exec_time, sql_text
    from V$SQLSTATS
    where sql_text like '% some distinctive string %'
    order by last_active_time desc;if you insert some meaningful string in form of comment inside the query itself, say /* report #1 on page 3 */
    you may be able to track it down more easily.
    select last_active_time, parse_calls, disk_reads, buffer_gets, cpu_time, end_of_fetch_count, executions, plsql_exec_time, sql_text
    from V$SQLSTATS
    where sql_text like '% report #1 on page 3  %'
    order by last_active_time desc;Bye
    Flavio
    http://oraclequirks.blogspot.com

Maybe you are looking for