Error in editing a report region

I have a report region (SQL Query PL/SQL function body returning SQL query).
When I try to save the region source, I got the following error:
1 error has occurred
* Function returning SQL query: Query cannot be parsed within the Builder. If you believe your query is syntactically correct, check the generic columns checkbox below the region source to proceed without parsing.
(ORA-01403: no data found)
Note that in the following region source, if I replace :P1_ITEM with 'One:Two:Three', I
did not get any error when I saved the report:
declare
l_sql varchar2(32676);
l_vc_arr2 HTMLDB_APPLICATION_GLOBAL.VC_ARR2;
begin
l_sql := 'select x, y '
l_vc_arr2 := htmldb_util.string_to_table(:P1_ITEM);
if l_vc_arr2(1) > 0 then
l_sql := l_sql || ', z';
end if;
l_sql := l_sql || ' where x.c1=y.c1 '
if l_vc_arr2(1) > 0 then
l_sql := l_sql || ' and z.c1=x.c1 and z.c2 in (';
l_sql := l_sql || l_vc_arr2(1);
for t in 2..l_vc_arr2.count LOOP
l_sql := l_sql || ',' || l_vc_arr2(t);
END LOOP;
l_sql := l_sql || ')';
end if;
l_sql := l_sql || ';';
return l_sql;
end;
Can someone help?
Thanks in advance.

Try adding these two bold lines:
declare
l_sql varchar2(32676);
l_vc_arr2 HTMLDB_APPLICATION_GLOBAL.VC_ARR2;
begin
l_sql := 'select x.c1, x.c3, y.c4 from x, y'
l_vc_arr2 := htmldb_util.string_to_table(:P1_ITEM);
IF l_vc_arr2.count() > 0 THEN
if l_vc_arr2(1) > 0 then
l_sql := l_sql || ', z';
end if;
l_sql := l_sql || ' where x.c1=y.c1 '
if l_vc_arr2(1) > 0 then
l_sql := l_sql || ' and z.c1=x.c1 and z.c2 in (';
l_sql := l_sql || l_vc_arr2(1);
for t in 2..l_vc_arr2.count LOOP
l_sql := l_sql || ',' || l_vc_arr2(t);
END LOOP;
l_sql := l_sql || ')';
end if;
END IF;
l_sql := l_sql || ';';
return l_sql;
end;
Sergio

Similar Messages

  • Version 3.1 fault - ORA-06502 error when creating SQL Report Region/Page

    I usually perfect my query in SQL*PLUS before I create a new report region.
    Consequently, I copy the code into the region wizard to create the new page. However, since we have upgraded to Version 3.1, virtually every report I have tried to create has created the following error:
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    It would appear that a maximum of 960 characters can be used to create the region/page. Perversely, once the page/region has been created, I can then edit the source and include as much code as I want (so far I've not run up against a limit)
    As it's just annoying, but not stopping me doing what I wanted to do, I've not got around to mentioning this error previously, but it occurred to me that I should (so I am!)
    David

    Hi David,
    Thank you for reporting this. Unfortunately, this was a regression introduced in Application Express 3.1. The workaround is to edit the region, as you suggested. This has been filed as Bug 6956070 and will be corrected in the forthcoming Application Express 3.1.1 patch set.
    Joel

  • Apex 2.2.1- error in editing a report withIE 6: ORA-20001- Checksum error

    Hi all,
    I'am getting an Error when I try to edit a report with Internet Explorer 6: ORA-20001-...- Checksum error.
    With Firefox it works fine.
    Customer is using IE as standard browser and Firefox is not available here.
    Any Ideas?
    Kazim

    I had to apply Patch 4554072, provided with APEX.
    This patch is available in the directory patch\bug4554072.
    Kazim

  • Not able to edit the report from BO 5.1

    Hi,
    User has Business Objects 5.1 version on his machine  and he is able to login to Business Objects 5.1.2 and can also open the BO reports from the required path
    When he edit the report, the BO is gettng hung and following errors occured one by one when he clicks ok button
    error1: "you must close this universe(name of universe) before importing it"
    when he clicks OK button on this error, second error is received
    error2: "Some obsolete objects have been removed from the query. (QP0027)"
    When he clicks OK button on this error, third error is received
    error3:"A connection required to refresh this document is unavailable(DA0004)"
    I am not understanding why these three errors are receiving one by one.Please tell me how to resolve above errors and edit the report
    kind Regards,
    Srinivas

    Hi Denis,
    Normally,what we do is once we provide access to webi users group for each user from BO supervisor module, user(s) will able to refresh/edit the existing report from Full client BO.His colleagues have had no problem editing all his reports from their machines but he is not able to edit any report from his machine and BO is getting freeze.
    He also reinstalled BO and cleaned out everything on his Computer and re-built it but the issue is not yet resolved
    Can you please tell me how to resolve this issue
    Kind Regards,
    Srinivas

  • How to hide a  report region on a page

    Hello,
    I have a page divided with 5 regions ( report region).
    Is it possible to not show a region when the page is loaded iif the query is not returning any results?
    thanks
    Roseline

    Hi,
    Yes, you can conditionally show regions.
    Go edit your report region and set Condition Type "EXISTS (SQL query returns at least one row).
    And in Expression 1 place
    SELECT 1 FROM
    ( paste your query here )Between bracket place your query.
    Br, Jari

  • APEX_040100.WWV_FLOW_API Error while creating a Interactive Report Region

    I am getting the following error while creating an Interactive report region on a page. (version - 4.1.0.00.32)
    Error Unable to create Dynamic Query page.
    ORA-04065: not executed, altered or dropped ORA-04065: not executed, altered or dropped stored procedure "APEX_040100.WWV_FLOW_API" ORA-06508: PL/SQL: could not find program unit being called: "APEX_040100.WWV_FLOW_API"
    DBA complied package but the error persists.
    Does anyone know how to debug this
    Thanks,
    Priyanka

    Hello ???,
    We are experiencing this too at login in an application. The error is caused by violating the constraint WWV_FLOW_DATA_IDX1 on columns FLOW_INSTANCE, ITEM_ID in table WWV_FLOW_DATA. So for some reason the value of an item in session state is set multiple times.
    When looking at the Access view (statement below) I see that there are multiple logins per second for a user (I have seen 12 times as maximum).
    select login_name, application, access_date, count(*)
    from WWV_FLOW_USER_ACCESS_LOG_V
    group by login_name, application, access_date
    having count(*) > 1
    order by access_date descSince this count of logins varies from 1 to 12, it looks like it is not caused by the application itself, but I also don't have a clue what the root cause is.
    Is there anyone else with more information on this issue?
    We are on APEX 4.0 and Oracle 11g and the applications have all been built in this environment, so no upgrades have been performed.
    Regards, Wouter
    Edited by: Wouter Breeuwsma on 31-mei-2012 12:05

  • Restricting the pl/sql error in report region(sql report)

    Hi,
    Is there any way to hiding pl/sql error in report region when we use generic column names*(Use Generic Column Names (parse query at runtime only)*
    ). and type is sql query else displaying alternative error message on that particular report region
    I am using apex 4.1 and 11g database
    Thanks
    Sagar.

    What kind of pl/sql error you are talking about?

  • SQL Report Region error in 4.0

    Hi guys,
    Forgive me if this issue has been discussed already. My server was updated to 4.0 and my report region now displays with the column headers above the wrong columns - they are slipped to the left one place. I looked at the source code and I think I found the problem. The code is below. The table id parameter is missing an end quote. This is just for Deafult Look 4.
    I don't think there is anything I can do on my end, but let me know if I am wrong. Thanks.
    Bill
    < table summary="Report Layout Table" class="default4" align="center" border="1" cellspacing="0" cellpadding="1" id="report_R246637997917001988 >
    < tr >< th id="Selected" >Selected< /th >
    < th id="EMPID" >Selected< br >By< /th >
    < th id="LINEID" >Line ID< /th >
    < th id="CREW" >Crew< /th >
    < th id="Sun" >Sun< /th >
    < th id="Mon" >Mon< /th >
    < th id="Tue" >Tue< /th >
    < th id="Wed" >Wed< /th >
    < th id="Thu" >Thu< /th >
    < th id="Fri" >Fri< /th >
    < th id="Sat" >Sat< /th >
    < th id="Rotates" >Rotation< br >(Days)< /th >
    < th id="Every" >Every< br >(Weeks)< /th >
    < th id="NOTES" >Notes< /th >
    < th id="View" >View< /th >
    < /tr >
    Edited by: [email protected] on Jul 6, 2010 5:57 AM

    Hi Bill,
    I reviewed the procedure which emits the HTML for these built-in report templates, and you are correct - there is a missing trailing double quote after the ID attribute of the TABLE tag. I believe this affects all built-in report templates.
    I have filed internal bug 9880291 and this will be a high priority for us to include in the forthcoming Application Express 4.0.1 patch set. A workaround (albeit not elegant) is to use one of the theme's report templates and not one of the built-in report templates. I'll ask internally if there is any other viable solution to this problem in the meantime.
    Joel

  • Error message while creating or editing a report

    Hi, we acquire the Crystal reports Ver 2008 type full, and this moment we are having an error message while creating or editing a report, the message suddenly appears saying:
    Crw32.exe has enconutered a problem and needs to close.
    Is there a patch available or what can we do?
    Thanks.

    Hi Lucus,
         This is to general an error, 1st try to reinstal the software, make sure you have admin rights on the PC, and try again.  If you still get the error, I would call the support number, and let them help you out.   You may need to know,   the type of PC or server the software was installed on, the current os, available memory... etc    For now, I would go to windows (If that is what you are running ) and re-install or repair the software.

  • Error when trying to use this query in report region

    Hi ,
    I am getting "1 error has occurred
    Query cannot be parsed within the Builder. If you believe your query is syntactically correct, check the ''generic columns'' checkbox below the region source to proceed without parsing. ORA-00933: SQL command not properly ended"
    while trying to use this query in reports region .
    Pls help.
    Thanks ,
    Madhuri
    declare
    x varchar2(32000);
    begin
    x := q'!select (first_name||' '|| last_name)a ,
    count(distinct(session_id)),manager_name
    from cappap_log,
    MIS_CDR_HR_EMPLOYEES_MV
    where DECODE(instr(upper(userid),'@ORACLE.COM',1),0,upper(userid)||'@ORACLE.COM',upper(userid)) = upper(email_address)!';
    if :P1_ALL = 'N' then
    x:= x||q'!and initcap(first_name ||' '|| last_name)=:P1_USERNAME!';
    else
    x:= x||q'!and initcap(first_name ||' '|| last_name)like '%'|| :P1_USERNAME||'%'!';
    end if;
    if :P1_APP_NAME = '%' then
    x:= x||q'! and flow_id like '%'!';
    else
    x:= x||'flow_id = :P1_APP_NAME';
    end if;
    x:= x||q'! group by first_name||' '|| last_name , manager_name!';
    return x;
    end;

    Hi, I am actually stuck here. Can you please let me know which among these is the higher version.
    1) Final Release 3.50
       Version 3500.3.016
    2) Final Release 3.50
        Version (Revision 481)
    Because it is working fine in the 1st one whereas its throwing that error pop-up in 2nd one(as soon as we select the Change query global definition option) .

  • ERROR: cannot edit or duplicate page. Reason: no editable regions

    Hi,
    Going round in circles with this one.  Feeling like Friday afternoon.
    URL: http://www.business-risc.com/fleet/bss/1/index.html
    CtrlE works fine.
    Click on "POLICIES" spry tab
    Click on EDIT PAGE
    Highlights the correct editable region... hover confirms its an editable region.
    Allows me to edit, no problem.
    Then, on SAVE DRAFT or DONE returns ERROR: cannot edit or duplicate page.  Reason: page does not contain any editable regions.
    I just cant see why.  Can anyone help please?
    Thanks
    Carol

    There should be a space before the ice:editable attributes (all of them):
    class="TabbedPanelsContent"ice:editable="*"
    Regards,
    Dan Popa

  • Error when refreshing report region: ORA-20876: Stop APEX Engine

    I'm using Apex 4.2. On click of a button, I refresh 2 Standard Region Reports with a Dynamic Action. This dynamic action has been working without problems for WEEKS and all of a sudden i'm getting the ORA-20876: Stop APEX Engine error when I click the button.
    In the dynamic action, I removed the refresh of the second report and now the error does not occur. If I add the second refresh action back in, it throws the above error. I've even tried making the second report identical to the first and the refresh action fails. I don't understand why this is failing on the second refresh action since the second report & region is IDENTICAL to the first report now.
    Please help!
    Thanks,
    John

    I would use something like firebug to see how the AJAX call for the refresh is working. I would want to see what is begin posted and what's being returned from the call.
    That should shed some light on the issue.
    THanks
    -Jorge

  • Error when opening column of report region after upgrading app to APEX 3.1

    Hi,
    I upgraded my application to APEX 3.1 and when trying to open a column of report region i get the following msg:
    ORA-20505: Error in DML: p_rowid=6290155934197181, p_alt_rowid=ID, p_rowid2=1478511314274023, p_alt_rowid2=SECURITY_GROUP_ID. ORA-20503: Current version of data in database has changed since user initiated update process. current checksum = "B4F3478A44141430C9AF16E681E565DD" application checksum = "2ADA7E1799DE09728D88020A4EC9F218"
    Any suggestions ?

    Hi user585480,
    I have got this problem couple of time with respect to Tabular form.
    I tried two ways:
    1. Close all browser and clear all you temporary internet settings and delete cookies etc. Try if it works.
    2. If step 1 does not work I re-create the Tabular form Region.
    Regards
    Rana

  • Putting video clips (mov) in to edit work place time line after photos (jpeg) getting error message, the importer reported a generic error. ? please help thanks

    premier elements12, putting video clips (mov) in to edit work place time line after photos (jpeg) error message, the importer reported a generic error. ? please help.

    TINA54
    Thanks for the reply.
    Some general comments...
    Regarding:
    THERE ANY WAY I CAN PUT MULTIPLE RANDUM TRANSITIONS IN TO THE TIME LINE WITH JUST ONE CLICK ? .
    There is no transition choice for random transitions across the Premiere Elements 12 workspace Timeline. But, the Elements Organizer 12/Create Menu/Slideshow and its Slideshow Editor does have that random transition choice. So, one possibilitity would be to create your slideshow in Elements Organizer 12 Slideshow Editor and then move the slideshow into Premiere Elements with the Output of Edit with Premiere Elements Editor command.
    Pending more details of the slideshow you are creating, I think that you would get your best photo quality and overall results staying with Premiere Elements 12 workspace (1080p) project and the transitions randomized manually.
    perhaps applying the default to all (all at the same time),
    using Timeline Menu/Apply Default Transition,
    and then replacing transitions randomly for the random transition look).
    Please let us know if any of that worked for you.
    Thanks.
    ATR

  • SQL-01403 error reported in a Report Region when there is data to display

    I have a report region populated by a PL/SQL function body returning a SQL Query. When the region is displayed, "ORA-01403: no data found" is output when there should be rows displayed on the report. I see a lot of postings related to ORA-01403, but none seem to describe why this problem occurs or how to solve it.
    Here is the generated SQL query:
    SELECT DISTINCT entry_type, active_time, expire_time, facility, via, output_remarks, p_reports.f_get_to_positions (entry_id, NULL) pos FROM (SELECT 'RSTN' entry_type, active_time, expire_time, facility, via, output_remarks, entry_id FROM v_restriction_daily_all WHERE (entry_type in ('RSTN', 'APREQ', 'GS')) UNION ALL SELECT 'RSTN' entry_type, active_time, expire_time, facility, via, output_remarks, entry_id FROM v_restriction_daily_all WHERE (entry_type in ('RSTN', 'APREQ', 'GS')) UNION ALL SELECT 'RSTN' entry_type, active_time, expire_time, facility, via, output_remarks, entry_id FROM v_restriction_daily_all WHERE (entry_type in ('RSTN', 'APREQ', 'GS')) UNION ALL SELECT 'APERQ' entry_type, active_time, expire_time, facility, via, output_remarks, entry_id FROM v_apreq_daily_all WHERE (entry_type IN ('APREQ', 'RSTN')) UNION ALL SELECT 'GS' entry_type, active_time, expire_time, facility, via, output_remarks, entry_id FROM v_apreq_daily_all WHERE (entry_type IN ('GS', 'RSTN')) UNION ALL SELECT entry_type, active_time, expire_time, facility, via, output_remarks, entry_id FROM v_edct_daily UNION ALL SELECT entry_type, active_time, expire_time, facility, via, output_remarks, entry_id FROM v_runway_daily UNION ALL SELECT entry_type, active_time, expire_time, facility, via, output_remarks, entry_id FROM v_deicing_daily UNION ALL SELECT entry_type, active_time, expire_time, facility, via, output_remarks, entry_id FROM v_delay_daily UNION ALL SELECT entry_type, active_time, expire_time, facility, via, output_remarks, entry_id FROM v_swap_daily UNION ALL SELECT entry_type, active_time, expire_time, facility, via, output_remarks, entry_id FROM v_sua_daily UNION ALL SELECT entry_type, active_time, expire_time, facility, via, output_remarks, entry_id FROM v_information_daily UNION ALL SELECT entry_type, active_time, expire_time, facility, via, output_remarks, entry_id FROM v_outage_daily ) WHERE (active_time BETWEEN TO_DATE (:G7_LOCAL_MIDNIGHT, 'YYYYMMDDHH24MI') AND TO_DATE (:G7_LOCAL_MIDNIGHT, 'YYYYMMDDHH24MI') + 1)
    I am using version 1.6.0.00.87.
    Please advise. Thanks.

    Create a summary column (lets say "CS_TotalRecords") at report level, and set the following properties:
    Function: Count
    Source: column which can not be null (if report displays some data)
    Reset At: Report
    Create a format trigger at most outer frame (the frame you want to hide and all object within that), and write following code:
    BEGIN
    IF NVL(:CS_TotalRecords,0) = 0 THEN
    RETURN (FALSE);
    END IF;
    RETURN (TRUE);
    END;
    Hope this helps.

Maybe you are looking for

  • How can I remove books from my Ipad "Kindle" and put them back into Icloud "archieve"

    I have purchased a mini Ipad and loaded up Kindle.  How can I remove the books I've read from my device and move them back to Icloud archieve?

  • PDF Forms not opening in Windows 7 Pro and 8

    I am having problems with editable PDFs I have created using Mac Acrobat Pro 10.1.13 not opening with editable features. These PDFs open correctly when opened with Mac OSX and Windows 7 home version. They do not work correctly when opened in Windows

  • Extender

    Hey there! I am new to this forum, so first of all- hello I have recently had BT Infinity installed and am using the BT Hub 3. The router is located downstairs and my room (which contains my computer) is upstairs. Now, my wireless is rather jittery a

  • How to send a SmartForm output as Email to external id?

    I want the Smartform output to email to extrenal email-id. I don't want the Smartform output as any kind of attachment, but the Smartform output needs to be shown on the main email body. Can anyone pls. help me out?

  • Drill Down Error DET_LEVEL

    Hi, I am writing a macro to enable data entry only when drill-down on 2 characteristics say Customer and Material. ========================= IF - Disaggregation Check DET_LEVEL('9AMATNR')=1 AND DET_LEVEL('9ACUST')=1 Row : KeyFigure (Attributes)= ROW_