Apex 4.0.1 classic report export

Hello once again all you Application Express experts.
I am having some difficulty getting an apex classic report to export the results of the report grid.
This is a classic report being run, not interactive.
It is also as an SQL Query (PL/SQL function body returning sql query) for the report identification type.
The function body is of decent size, maybe 200 lines at most, but i have narrowed it down a couple of problematic lines.
The report runs perfectly when I take out the follow line from the function...
v_return := v_return || 'AND instr('':'' || ''' || :p3_status || ''' || '':'','':'' || xel.employment_status || '':'') > 0 ';
So :p3_status is a checkbox item on the page, with three options: Active, Terminated, Retired.
In the repeatable failure scenario :p3_status = 'Active'.
One of the interesting parts is the report grid always returns the right results to the screen, it is just the report export that fails.
It never errors, it just returns a no data response to the file being exported.
This is Application Express v 4.0.1 running on Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit.
Any thoughts or any troubleshooting hints anyone can provide?
Thanks,
Hayden

Hayden,
Why do u need to append the item value in the PLSQL function body when apex will take of that(using its bind value).
Your predicate is actually a static one since only the item value changes (and that can be handled by its bind value). So avoid concatenating it in the function body to build the clause(which has the additional problem of passing in the item value to the function)
Change it to
v_return := v_return || q'!AND INSTR(':'||:p3_status||':',xel.employment_status) > 0!';
Notice that the :p3_status item evaluation happens only in the apex page
Also making use of the q function to escape quotes, it makes life much more easier in these cases.

Similar Messages

  • ORDImage in APEX 4.0.1 classic report

    Hi
    I can successfully show BLOB images in a report but I'm stuck when I switch to ORDImage.
    I've been playing around with the Number/Date Format Column Attributes and borrowing from the BLOB version, have come up with
    IMAGE:ORDIMAGE_IMAGES:THUMBNAIL:IMAGE_ID
    However, I'm getting an error - ORA-06502: PL/SQL: numeric or value error: character to number conversion error
    I guess it's the thumbnail which is causing the problem as this is the ORDImage column in the ordimage_images table
    I've tried THUMBNAIL.GETCONTENT() and THUMBNAIL.CONTENT to no avail in attempt to get the BLOB data out of ORDImage
    Any ideas?
    Brian
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE     11.2.0.1.0     Production
    TNS for 64-bit Windows: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production

    Have you tried switching to SI_STILLIMAGE, ive heard that it is better, although there are some issues with speed when comparing average color. See you on friday. Love Patrick x

  • Report Export to csv doesn't correct translate additional characters in 3.0

    Hi all,
    i'am using apex 3.0 and the report export build in function does not export the correct german umlaut ( "ü" is translate to "ü").
    My characterset are
    NLS_CHARACTERSET: WE8ISO8859P1
    DAD CHARACTERSET: UTF-8

    Go in "Application > Shared Components > Edit Globalization Attributes > Globalization" and change "Automatic CSV encoding" to YES. Should work!
    Adrian

  • Error while exporting and installing an application with classic reports.

    I'm exporting an application from my test enviorment to my productive enviorment, but every time I try this all the classic reports within that application only show half of the rows that they should return. All the other components appear to be functoning correctly.
    Oracle 11g R2
    APEX 4.2.1.00.08
    Windows Server 2003 Enterprise.

    Hi Juan,
    a classic report has the ability to specify the number of rows displayed based on the value of an item. This feature isn't enabled is it?
    Regards
    Andre

  • How to Link column header only in classic Report in APEX 4.1

    Hello Everybody,
    Probably there is a simpler way to do this, but I am not sure. I want a link on column header in Report on a specific column. The link will take me to new region or a page.
    How to achieve this in APEX 4.1
    Theme : Blue 2
    Database 11g
    I see there is a column link opiton, but that creates link for every row in that column on a specific icon, I just want link on a title of the column in Classic Report.
    For Example,
    if there are two columns Name and Client ID, which has 10 records to display on a classic report. I wan the link on Client ID on header only not on the records.
    Can anybody provide some simple solution for this.
    Thanks,
    --CP
    Edited by: cpora007 on Jun 22, 2012 10:38 AM

    Hello,
    I didn't understand, what do you mean by default it is going to sort popup. I have a classic report based on SQL, which generates a report with static header, there is no sort or any other link on that.
    I added a link in column header name with an anchor. It works and takes to the new page.
    But it is not a proper solution. A solution based on Jquery dynamic action is preferable. Also the preferred option is that the link opens a hidden region of the same page at the same location of the report and the report gets hidden. after the procession on the form region and submitting the update/ insert process. the report region shows up with the change data.
    Moving on to new page is 2nd option, if the first do not work.
    In the JavaScript, put: apex.submit("GO_TO_MY_OTHER_PAGE");
    On the page, create a Branch to the Second page. Set the condition to Request=Expression 1. Set the request to "GO_TO_MY_OTHER_PAGE"
    On which page I need to create a branch?, Is it on the report page or the form page.
    Thanks a lot for the response. I appreciate your kind efforts in this regard.
    --CP                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • (Classic) Report losing pagination on partial page refresh - APEX feature request

    I have a page with both an Interactive Report and some classic Report regions.
    Based on user updates, there are many occasions where I need to do a partial page refresh.
    Thanks to plugin http://www.apex-plugin.com/oracle-apex-plugins/dynamic-action-plugin/refresh-interactive-report-1.0_361.html
    I'm able to refresh my IR, but not my classic report (unless I do a submit of the whole page) without losing pagination.
    Request: Will a Dynamic action 'Refresh without losing pagination' be part of future apex versions?
    Now, in apex 4.2, is there another work around available for classic reports?
    (I use 'submit page' now as action, but it's at least a second slower as a partial refresh, and because I need it on every user update, this second becomes a big addition to user frustration).
    Thanks, JP

    Here is the solution for your problem:
    https://apex.oracle.com/pls/apex/f?p=31517:243
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.apress.com/9781430235125
    https://apex.oracle.com/pls/apex/f?p=31517:1
    http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494

  • Exporting Classical Report to Excel

    Hi,
         I have a classical report in which I am adding a Button "Export to Excel". Now, if I click that button, I should be able to export my Classical Report to excel. Can somebody please help me on this.
    Thanks,
    Venkat.

    You can do it with the FM GUI_DOWNLOAD.
    Do like this:
    AT USER-COMMAND.
      CASE SY-UCOMM.
        WHEN 'EXCEL'.
    DATA: BEGIN OF it_fieldnames occurs 0, "saving the log file structure
    l_f(256) TYPE c,
    END OF it_fieldnames.
    it_fieldnames = 'Field1'.
    Append it_fieldnames.
    it_fieldnames = 'Field2'.
    append it_fieldnames.
    CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
    filename = P_FNAME
    filetype = 'DATE'
    TABLES
    data_tab = IT_DATA    " << data tab
    fieldnames = it_fieldnames    " << for header
    EXCEPTIONS
    file_open_error = 1
    file_write_error = 2
    invalid_filesize = 3
    invalid_table_width = 4
    invalid_type = 5
    no_batch = 6
    unknown_error = 7
    OTHERS = 8.
    IF sy-subrc <> 0.
    MESSAGE e999 WITH 'Error File Write Error: ' sy-subrc.
    ENDIF.
    ENDCASE.
    Regards,
    Naimesh Patel

  • Viewing a BLOB Data (Including Compressed Data) in Classic Report APEX 3.2

    Hi All,
    I have a table with a BLOB field.
    That blob field is containing image with .tiff format.
    I need to display those images in APEX 3.2 Classic Report.
    Am able to achieve this by following the instructions in the below link.
    http://st-curriculum.oracle.com/obe/db/apex/r31/apex31nf/apex31blob.htm#t4
    Now my problem is, Some of the image in my table is in compressed format.
    So those images are not displaying in the report, rather it is giving a message called 'No Preview Available'.
    How can i extract those images and display in the Classic Report.
    Please help me to achieve this.
    Thanks & Regards,
    Sakthi.

    What kind of compression are we talking about here ?
    <li>If its some kind of native image compression methods, then you could try the ORDImage utlity, here's a thread which discusses that : {thread:id=1048248}
    If its compressed using zip or some file compression utility, you may need to load the java code(into the DB) that can uncompress it for you and then call it from procedure which then uncompress'es it(using java class) and then send it back as an image(programmatic way way of showing images in apex).
    There posts should be of assistance
    <li>Extract XML from docx . Forget the post title , this post has some code which uncompresses a zip file in the database(ignore the rest of the post, if irrelevant).
    <li>Another posting about the same requirement, but with code for unzipping which you can adapt
    <li>If you are not in a hurry, this Oracle-Sun Java documentation explains the whole process of compression/uncompression with code that you can process within the database(from PLSQL using java wrapper)
    <li>The simplest is the PLSQL Package UTL_COMPRESS utility (also ) , which wouldn't need any extra coding for compressing/uncompressing binary data.this<a/>) , which wouldn't need any extra coding for compressing/uncompressing binary data.

  • Highlight currenct cursor at Classic report in Apex 4.1

    Hi,
    Highlight currenct cursor not working in Classic Report in Apex 4.1.
    Can someone help me ?
    Thanks

    Thank you for respon.
    I used standart template which provide by apex
    You can check at http://apex.oracle.com/pls/apex/f?p=16491:2.

  • "Character String Buffer too small" Classic Report Apex 3.2.1

    Hello Everyone,
    I know it is very old version I am discussing here but that is what we have in our environment, would really appreciate if anyone can help out.
    I have a classic report with the below query, in this I have added a filter using a select list item (P70_GROUP).
    SELECT vws.ServerID AS Display_ID,       vws.ServerID AS ID,       vws.Hostname,       vws.ServerStatus,       vws.SiteName AS Site,       vws.Client,       vws.CoreHours,       vws.Patch_Notes,       vws.PATCH_DEP,       vws.Patch_Day,       vws.PATCH_GROUPID,       vws.PATCH_TIMEID AS Time     FROM VW_Live_Support vws LEFT JOIN W_Patch_Groups wpg     ON (vws.Patch_GroupID = wpg.ID) WHERE vws.Deleteable      = 'N'   AND NVL(wpg.Ignore, 'N') = 'N'   AND ((:P70_GROUP > 1 AND vws.PATCH_GROUPID = :P70_GROUP) OR         (:P70_GROUP = 1 AND vws.Patch_GroupID IS NULL)      OR         (NVL(:P70_GROUP,0) = 0))   AND ( INSTR(UPPER(vws.HostName),    UPPER(NVL(:P70_SEARCH,vws.HostName)))    > 0 OR INSTR(UPPER(vws.ServerStatus), UPPER(NVL(:P70_SEARCH,vws.ServerStatus))) > 0 OR INSTR(UPPER(vws.SiteName),    UPPER(NVL(:P70_SEARCH,vws.SiteName)))    > 0 OR INSTR(UPPER(vws.Client),      UPPER(NVL(:P70_SEARCH,vws.Client)))      > 0 OR INSTR(UPPER(vws.CoreHours),    UPPER(NVL(:P70_SEARCH,vws.CoreHours)))    > 0 OR INSTR(UPPER(vws.Patch_Notes),  UPPER(NVL(:P70_SEARCH,vws.Patch_Notes)))  > 0       )
    Issue is when i select a group from the list I am getting
    "report error:
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small".
    one unusual thing I have noticed here is when I select "All Groups" which returns 0, it is running fine and returning 3700 rows but when I select any group which returns some 10-20 rows I am getting the above error.
    can't understand why this is, please help me out.
    Regards,
    Tauceef

    Tauceef wrote:
    Thanks alot for your prompt response
    Let me add some more into the issue I forgot to add.
    It is somewhat similar to what Michael has mentioned in his first post.
    Above said report is a Tabular form and there are 3 select lists in it out of which one list is too long (Group list), when I hide it report works for all the groups.
    That should have been made clear in the original post. Reports and tabular forms are not the same thing. There's much more that can go wrong on tabular forms, including hitting the LOV size limit of 32KB for a select list item. (Obviously if you hit this limit for a single item then you've automatically hit it the report row limit as well.)
    I have explained them about the LOV that when we remove that LOV it works fine but they need that list because it is a updatable value.
    As suggested by Michael, I have tried Substr, which also works fine for all the groups.
    I would suggest client to have a short name of the groups and use it as a temporary solution.
    You should use a Pop-up LOV control for large lists of options. Purely as a usability consideration—irrespective of APEX implementation limits—select lists should only be used in cases where there are a maximum of around 200 options.
    Regarding Debugging: I am not getting that option when I run the application as a developer, checked the application properties Debugging option is selected as Yes, don't know why it is not available.
    That's not connected to this problem. Open a new thread on that topic if you want to investigate and fix it.
    One more confirmation from you guys please, I have also suggested them to upgrate the environment to the latest version, hoping this will resolve the issue, please confirm?
    In the latest version also we have same size (32KB) limit or it has been increased?
    The 32KB limits for select lists and report rows are not documented but are still present in APEX 4.2 (and in APEX 5.0 to the best of my current knowledge).

  • Oracle APEX Classic Report Break Formatting

    I created a classic report. Under report attributes I defined Break Formatting as "First, Second and Third Column".
    The data columns for this report are Domain, Discipline, TechnologyArea and Products.
    Domain is the parent. Discipline is a child of domain. TechnologyArea is the child of Discipline. Products are children of TechnologyAreas.
    Domain prints in the first column, Discipline in the second, TechnologyArea in the third and Product in the fourth. There are one to many products for any TechnologyArea - and one to many TechnologyAreas for any Discipline - and one to many Disciplines for any Domain. The report is sorted on Domain, Discipline, TechnolgyArea and Product. Therefore domain prints over and over and over. Discipline prints over and over until it changes. TechnologyArea prints several times before it changes. I don't like that.
    I want the report to print Domain and not print it again until it changes. I want it to do the save for Discipline and TechnologyArea.
    I set break formatting to "First, Second and Thrid Column". Now Domain prints once and does not print again until it changes. So far so good! Now Discipline prints once and does not print on subsequent rows until the discipline changes. So far so good! The TechnologyArea name prints on every row. That's not good.
    Given this pattern, if there were an option for First, Second, Third and Fourth columns I think that would give me the report I want - but there's not. Can anyone tell me how to stop TechnologyArea from repeating on every row?

    This look about right?
    notice the last two records in the with statement are duplicates.
    with test_data as(
        select 'MAMMAL' domain, 'DOG' discepline, 'BEAGLE' technologyArea, 'SQUEEKY TOY' product from dual union all
        select 'MAMMAL',  'DOG' ,   'RETRIEVER', 'SQUEEKY TOY' from dual union all
        select 'MAMMAL',  'CAT' ,   'LION',      'SQUEEKY TOY'  from dual union all
        select 'MAMMAL',  'CAT' ,   'CHEETAH',   'SQUEEKY TOY'  from dual union all
        select 'MAMMAL',  'DOG' ,   'DINGO',     'SQUEEKY TOY'  from dual union all
        select 'REPTILE', 'LIZARD', 'IGUANA',    'LARGE ROCK' from dual union all
        select 'REPTILE', 'LIZARD', 'GUILLA MONSTER', 'LARGE ROCK' from dual union all
        select 'REPTILE', 'SNAKE',  'CORAL',     'LARGE ROCK' from dual union all
        select 'REPTILE', 'SNAKE',  'PYTHON',    'LARGE ROCK' from dual union all
        select 'REPTILE', 'SNAKE',  'KING',      'LARGE ROCK' from dual union all
        select 'MAMMAL',  'DOG' ,   'BEAGLE',    'BONE' from dual union all
        select 'MAMMAL',  'DOG' ,   'RETRIEVER', 'BONE' from dual union all
        select 'MAMMAL',  'CAT' ,   'LION',      'BONE' from dual union all
        select 'MAMMAL',  'DOG' ,   'DINGO',     'BONE'  from dual union all
        select 'REPTILE', 'LIZARD', 'IGUANA',    'HEAT LAMP' from dual union all
        select 'REPTILE', 'LIZARD', 'GUILLA MONSTER', 'HEAT LAMP' from dual union all
        select 'REPTILE', 'SNAKE',  'CORAL',     'HEAT LAMP' from dual union all
        select 'REPTILE', 'SNAKE',  'PYTHON',    'HEAT LAMP' from dual union all
        select 'REPTILE', 'SNAKE',  'KING',      'HEAT LAMP' from dual union all
        select 'MAMMAL',  'CAT' ,   'CHEETAH',   'BONE' from dual union all
        select 'MAMMAL',  'CAT' ,   'CHEETAH',   'BONE' from dual
    select * from(
    select
        case when domain         != nvl(domain_lag,        ':START:') then domain         else null end as domain,
        case when discepline     != nvl(discepline_lag,    ':START:') then discepline     else null end as discepline,
        case when technologyarea != nvl(technologyarea_lag,':START:') then technologyarea else null end as technologyarea,
        case when product        != nvl(product_lag,       ':START:') then product        else null end as product
    from(
        select domain, discepline, technologyarea, product,
               lag(domain,1)         over(order by domain, discepline, technologyarea, product) domain_lag,
               lag(discepline,1)     over(order by domain, discepline, technologyarea, product) discepline_lag,
               lag(technologyarea,1) over(order by domain, discepline, technologyarea, product) technologyarea_lag,
               lag(product,1)        over(order by domain, discepline, technologyarea, product) product_lag
          from test_data
         order by domain, discepline, technologyarea, product)
    where coalesce(product, technologyarea, discepline, domain) is not null
    edit
    I did not understand the question properly before submitting this. Here it is anyway.
    Cheers,
    Tyson Jouglet
    Edited by: Tyson Jouglet on Jan 26, 2011 2:42 PM

  • Does Classic report provide facility to make report total to be hyperlink

    Hi ,
    Does Classic report in apex provide provision to make the report-total row editable(hyperlinked) ? if so how to implement that.
    Acq     WIP     Closed
    Abc     1     3
    Def     2     5
    report total :     3     8
    Also is it possible to provide more than 2 downloadable options for classic report :
    For eg: now i have provided options to export a report to csv and excel format, along with these two can i provide pdf option!!!!
    Thanks in advance

    You didn't mention what version of Apex you are using. If you are on 4.0, this can be done easily using dynamic actions.
    Here is an example http://apex.oracle.com/pls/apex/f?p=24317:92
    One DA that looks like this http://screencast.com/t/djyAG6F4WFM
    The first TRUE action (fire on page load) changes the cursor style to indicate that the row is clickable http://screencast.com/t/Z3YIXo6c
    The second one actually does the redirect http://screencast.com/t/jHMtyDwK8lM in the example it just shows an alert message but you can modify it to pass in whatever parameters you need and construct the location.href to redirect to.

  • Show / Hide DOWMLOAD link in classical report based on user rights

    Hi,
    using apex 4.1.
    How i can display or hide download link in classical report based on user rights .
    The User who has download rights ,can download the data from classical report Otherwise it should hide.
    I have passed the code in authorization scheme in shared component as named "VIEW"
    DECLARE
    VNAME VARCHAR2(1000);
    BEGIN
    SELECT PAGE_NAME INTO VNAME FROM APEX_APPLICATION_PAGES WHERE PAGE_ID = :APP_PAGE_ID AND APPLICATION_ID = :APP_ID;
    return GET_ADMIN_STATUS_VIEW_NEW(:APP_USER,VNAME);
    END;How i can call "VIEW'' name in download link.

    Right click on the export link, select copy url. Create a button with redirect to URL. Use that URL (or at least everything with and after f?p). Bind rights to the button.
    Or create a second identical report with different rights, give one export enabled and one disabled. The first is better, the second is easier :)
    Edited by: Joni Vandenberghe on 8-feb-2013 5:08

  • Escaping HTML tags in Excel report export

    Hello,
    I have a classic report on an entry form that allows users to enter any character off the keyboard into a description field. The problem is that when users enter brackets ( greater than , less than ), APEX will handle them as HTML tags ( does not display all the text after the less than character) . I tried to change that column type to "display as text , escape special characters" but that did not help. So I had to user the htf.escape_sc function for that column and the report works just fine.
    however, the problem is that none of the solutions above worked for Excel export of that report. Can anybody tell me how to escape such special characters in the excel export of a report ???
    Thanks,
    Sam

    Where are the experts! it makes me feel like either no body has had this issue before (which seems odd) or that it is impossible to be resolved. Any suggestions will be appreciated..
    Thanks,
    Sam

  • Classic report - Condition evaluated for every row

    APEX 4.2.2
    I am seeing something strange in a classic report region. A report started to fail at run-time with a strange error about bad syntax. When I run the page in debug mode, I see the following
    print column headings
    rows loop: 30 row(s)
    ...Execute Statement: begin wwv_flow.g_boolean := '' is not null;
    end;
    ......Result = false
    ...Execute Statement: begin wwv_flow.g_boolean := '' is not null;
    end;
    ......Result = false
    ...Execute Statement: begin wwv_flow.g_boolean := 'string with a embedded ' single quote' is not null;
    end;
    ......Result = true
    Looks like the APEX engine is evaluating a boolean expression after rendering and each and every row in the report. And for some strange reason, it is using a piece of data from my query's resultset and failing because of the bad syntax introduced due to the single-quote in the string.
    I have never seen this before. Any idea what is going on?
    Thanks

    Howdy Paul, sorry should have provided all the details. No, this is a standard generic column template. Ah, you are right, drat I should have looked closer. The template has use a condition to show either a highlighted row or normal one. Sorry for the false alarm, I can take it from here. Enjoy your flight :-)

Maybe you are looking for