Report region columns constrained to 4000 chars?   Hitting LOV problems.

Hi all,
I've hit a problem that I'm hoping will have a simple answer.
Quick overview of issue:
APEX 3.01 application running against a 10gR2 DB.
We have an LOV defined that works just fine on various forms but in report regions where the LOV is available via a drop down column value in the report region HTML table we are hitting the error:
report error:
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
Some judicious debugging reveals that this seems to be because we are trying to load in more than 4000 characters into the LOV drop down in the report regions HTML table column (it's a moderately large LOV)..
This suggests that the default column type in a report region HTML table is VARCHAR2 and thus that there is a default 4000 character limit on any such column values, would that be a fair assumption? I know that the actual report row size always used to be limited to a total of 32k but this limit is a new one to me.
If there is such a limit, does anyone have any suggestions on how to work-around it i.e. is it possible to redefine report region column values to be other datatypes/dimensions or should we be looking at using an alternative such as a pop-up instead?
Many thanks.

Hi Scott,
Okay, what we have is a fairly simple Dynamic Page with two report regions (both standard type of 'SQL Query'). The second report region is the one causing us the headache. The column headings are set to 'Custom' but apart from that everything seems as it should be.
The following query populates an HTML table being generated in the second report region (problem line in bold):
SELECT apex_item.hidden(7,task_id)||
apex_item.select_list_from_lov(1, estimate_type, 'TASKSMK', NULL, 'YES', 0,'** Select Task **',NULL, NULL) as "Task Type",
'<img src="/i/themes/aqa/required.gif" alt="Required Field" tabindex="999" />'||apex_item.text(2, description,30,4000,'required="true"') as "Work Item(s)",
dbms_lob.substr(apex_item.select_list_from_lov_xl(3, username, 'PEOPLE', NULL, 'YES', 0, '** Select Resource **', NULL, NULL),4000) as "Resource",
apex_item.text(4, days,5,5) as "Days",
apex_item.text(5, start_date,11,11) as "target Start (dd-mon-yyyy)",
apex_item.text(6, NVL(end_date,ADD_MONTHS(start_date,1)),11,11) as "Target End (DD-MON-YYYY)",
rownum link
FROM
(SELECT t.task_id,
e.estimate_type,
t.description,
t.username ,
t.days,
t.start_date,
t.end_date
FROM estimate e, task t
WHERE e.project_project_id = TO_NUMBER(:F172_PROJECT_ID)
AND e.active_yn = 'Y'
-- and t.days > 0
AND t.ese_id = e.id
--AND e.creation_date = (SELECT MAX(ei.creation_date) FROM estimate ei WHERE ei.project_project_id = e.project_project_id AND ei.active_yn = 'N')
UNION ALL
SELECT 0 task_id,
0 estimate_type,
NULL description,
'0' username,
NULL days,
sysdate start_date,
ADD_MONTHS(sysdate,1) end_date
FROM dual
CONNECT BY LEVEL < = TO_NUMBER(:P19_ROWS_CNT))
All appears well until the number of values being returned in the second LOV (retrieved by the apex_item.select_list_from_lov_xl) exceeds 4000 characters and then we get the error first detailed. The substr around the function isn't usually present, it was added during the debugging, if I allow one more character than the 4000 or remove the substr completely then I get the error again. If the same function is used to retrieve the LOV on a normal Dynamic Form field then all is well, it only seems to have a problem when present in the HTML table being generated.
Are we doing something silly here?
Thanks.
Message was edited by:
jac

Similar Messages

  • Displaying report region columns in the correct order

    I have a report region in which the first 4 columns that are displayed are listed at THE END of the “Column Attributes” section.
    Why is this happening? Does some other setting have to be made to make them display at the end, where I want them?

    Thanks Matthew.
    I had actually figured that out already and was about to post that fact.
    Evidently, the order of the columns in the Action menu is set to the original order of the columns in the “Column Attributes” section. But if the column order is then changed in “Column Attributes”, the order in the Action menu remains at its original value, and thus needs to be manually reset.

  • How do I reference items in a report region

    I've created a report. You can view the region attributes at http://i3.tinypic.com/wcn59h.jpg.
    I've changed the "Display As" attribute of one of the items (QUAN_ID) to 'Select List (query based LOV)'. I've set the "LOV Query" attribute on this item to the following.
    select quan.answer_txt
    , quan.id
    from vug_question_answers quan
    , vug_survey_questions suqu
    where suqu.id = quan.suqu_id
    and suqu.surv_id = :p33_surv_id
    --and    suqu.id = :suqu_id
    order by quan.question_answer_seq_no
    The purpose of this LOV is to return QUESTION_ANSWERS that have a foreign key to the SURVEY_QUESTIONS record identified by the sufu_id. The bind-variable ":p33_surv_id" is a page item. I THOUGHT the bind-variable ":suqu_id" (referenced in the commented-out line) would be the name of a column item in my report region. However, the LOV doesn't return correct values if I uncomment the line containing :SUQU_ID.
    How do I determine the name of the report region column item so that I can reference it within the LOV of another item in the same region?
    Thanks,
    -Ken

    Ivo,
    That's it!
    My original tabular form query read as follows.
    select rean.id,
    rean.resp_id,
    suqu.surv_id,
    suqu.question_txt,
    quan.suqu_id,
    rean.quan_id, --this is the column I was adding an LOV to
    rean.entered_by,
    rean.entered_on,
    rean.updated_by,
    rean.updated_on
    from vug_respondent_answers rean
    , vug_question_answers quan
    , vug_survey_questions suqu
    where rean.resp_id = :p33_resp_id
    and quan.id = rean.quan_id
    and suqu.id = quan.suqu_id
    and suqu.surv_id = :p33_surv_id
    I've changed it to the following.
    select rean.id,
    rean.resp_id,
    suqu.surv_id,
    suqu.question_txt,
    quan.suqu_id,
    htmldb_item.select_list_from_query
    ( 6
    , rean.quan_id
    , 'select quan.answer_txt, quan.id from vug_question_answers quan, vug_survey_questions suqu where suqu.id = quan.suqu_id and suqu.surv_id = :p33_surv_id and suqu.id = '|| suqu.id ||' order by quan.question_answer_seq_no') quan_id,
    rean.entered_by,
    rean.entered_on,
    rean.updated_by,
    rean.updated_on
    from vug_respondent_answers rean
    , vug_question_answers quan
    , vug_survey_questions suqu
    where rean.resp_id = :p33_resp_id
    and quan.id = rean.quan_id
    and suqu.id = quan.suqu_id
    and suqu.surv_id = :p33_surv_id
    My screen now looks as found at http://i3.tinypic.com/wgq4g9.jpg. (Note that I've also changed the question since a previous post.)

  • How can i define the width of report column in report region ?

    Hi,
    I have report region and i want to have a static width for each column ( not based on column name of column data ), how can i do it ?
    Thanks in advance ,
    Yoel

    Can you provide more details pls? I am also trying to change widht of report columns and I do not see anywhere in reports atrributes where it allows me to do that...Thanks so much!

  • How to create a report region which the first colomn is row selector column

    I want to create a report region and its first column is a row selector column. I have used select sentence to select some columns. But I do not know how set the first column to row selector column. I mean I want to do as follow. When a radio which is first column is chosen, it will return it's value of the column in the chosen row. Please help me! Thanks

    Hi unnamed,
    Suppose you have an id that identifies your record.
    Go to Report definiton, tab report attirbutes.
    Select the id of your record.
    Create a link to the page you want to go to.
    Hope this helps.
    If not, I suggest you to create a from with report, and analyze the way the wizard has generated it.
    Leo

  • Using sqlldr when source data column is 4000 chars

    I'm trying to load some data using sqlldr.
    The table looks like this:
    col1 number(10) primary key
    col2 varchar2(100)
    col3 varchar2(4000)
    col4 varchar2(10)
    col5 varchar2(1)
    ... and some more columns ...
    For current purposes, I only need to load columns col1 through col3. The other columns will be NULL.
    The source text data looks like this (tab-delimited) ...
    col1-text<<<TAB>>>col2-text<<<TAB>>>col3-text
    more-col3-text
    more-col3-text
    more-col3-text
    more-col3-text
    more-col3-text
    END-OF-RECORD
    There's nothing special about the source data for col1 and col2.
    But the data for col3 is (usually) much longer than 4000 chars, so I just need to truncate it to fit varchar2(4000), right?
    The control file looks like this ...
    LOAD DATA
    INFILE 'load.dat' "str 'END-OF-RECORD'"
    TRUNCATE
    INTO TABLE my_table
    FIELDS TERMINATED BY "\t"
    OPTIONALLY ENCLOSED BY '"'
    TRAILING NULLCOLS
    col1 "trim(:col1)",
    col2 "trim(:col2)",
    col3 char(10000) "substr(:col3,1,4000)"
    I made the column 3 specification char(10000) to allow sqlldr to read text longer than 4000 chars.
    And the subsequent directive is meant to truncate it to 4000 chars (to fit in the table column).
    But I get this error ...
    Record 1: Rejected - Error on table COL3.
    ORA-01461: can bind a LONG value only for insert into a LONG column
    The only solution I found was ugly.
    I changed the control file to this ...
    col3 char(4000) "substr(:col3,1,4000)"
    And then I hand-edited (truncated) the source data for column 3 to be shorter than 4000 chars.
    Painful and tedious!
    Is there a way around this difficulty?
    Note: I cannot use a CLOB for col3. There's no option to change the app, so col3 must remain varchar2(4000).

    You can load the data into a staging table with a clob column, then insert into your target table using substr, as demonstated below. I have truncated the data display to save space.
    -- load.dat:
    1     col2-text     col3-text
    more-col3-text
    more-col3-text
    more-col3-text
    more-col3-text
    more-col3-text
    XYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
    YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
    END-OF-RECORD-- test.ctl:
    LOAD DATA
    INFILE 'load.dat' "str 'END-OF-RECORD'"
    TRUNCATE
    INTO TABLE staging
    FIELDS TERMINATED BY X'09'
    OPTIONALLY ENCLOSED BY '"'
    TRAILING NULLCOLS
    col1 "trim(:col1)",
    col2 "trim(:col2)",
    col3 char(10000)
    SCOTT@orcl_11gR2> create table staging
      2    (col1 varchar2(10),
      3       col2 varchar2(100),
      4       col3 clob)
      5  /
    Table created.
    SCOTT@orcl_11gR2> host sqlldr scott/tiger control=test.ctl log=test.log
    SCOTT@orcl_11gR2> select * from staging
      2  /
    COL1
    COL2
    COL3
    1
    col2-text
    col3-text
    more-col3-text
    more-col3-text
    more-col3-text
    more-col3-text
    more-col3-text
    XYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
    YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
    1 row selected.
    SCOTT@orcl_11gR2> create table my_table
      2    (col1 varchar2(10) primary key,
      3       col2 varchar2(100),
      4       col3 varchar2(4000),
      5       col4 varchar2(10),
      6       col5 varchar2(1))
      7  /
    Table created.
    SCOTT@orcl_11gR2> insert into my_table (col1, col2, col3)
      2  select col1, col2, substr (col3, 1, 4000) from staging
      3  /
    1 row created.
    SCOTT@orcl_11gR2> select * from my_table
      2  /
    COL1
    COL2
    COL3
    COL4       C
    1
    col2-text
    col3-text
    more-col3-text
    more-col3-text
    more-col3-text
    more-col3-text
    more-col3-text
    XYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
    YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
    1 row selected.

  • How to set value of a column in report region

    Hi,
    I have a report region based on a query.In this my first column is selectlist "select row" having to values "yes" & "No".
    I have two buttons on top of the region "Check all" and "uncheck all".
    My requirement is when I click check all button all rows corresponding to "select row" column gets selected to Yes and when I click No all rows gets selected to "No".
    Thanks
    Vikram

    Actully I want to set the value of a column in report region.
    There are replies in the forum but in those the item is in form but not in the report region.
    I am generating report region by using htmldb_item.selectlist and i dont know how to set value in these type of items.

  • Controlling Column Width in Report Region

    I have a report region based on a simple select statement. I'd like the table to be the full width of the region and I'd like the columns to be spaced evenly so that they are also the full width of the region. I have figured out how to set the table width via Report Attributes Substitution, but I am unable to set the column width. Any help would be greatly appreciated.
    Mark

    Hi take a look into this post:
    Translated in English:
    http://translate.google.de/translate?sl=de&tl=en&js=n&prev=_t&hl=de&ie=UTF-8&layout=2&eotf=1&u=http%3A%2F%2Fwww.apex-at-work.com%2F2010%2F08%2Fsilbentrennung-hyphenation-in-apex-ger.html
    Code must be extracted from Original post:
    http://www.apex-at-work.com/2010/08/silbentrennung-hyphenation-in-apex-ger.html
    This could be also interesting for your:
    http://www.apex-at-work.com/2010/03/automatic-linebreak-if-word-breaks-out.html
    Tobias
    http://apex-at-work.com

  • 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

  • Erratic Report Region Behavior with Dynamic SQL Queries

    I'm running HTMLDB v 1.5.1.00.12 and I've noticed some odd behavior with report regions using dynamic SQL queries. Every so often, our testers will run a page containing a dynamic sql report region and get the following error, (despite the fact the query was working only moments ago and no other developer has touched it):
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    or sometimes
    failed to parse SQL query:ORA-01403: no data found
    The only solution I've found so far is to:
    1) Make a copy of the failed report region.
    2) Disable or delete the original failed report region.
    The new copy of the report region runs without issue.
    My search of the forums turned up the following two threads, but neither provided me with a clear explanation of the cause, and how to avoid it:
    ORA-06502:PL/SQL: numeric or value error: character string buffer too small
    Re: Import Export Error (ORA-06502)
    The columns being returned are below the 4000 character limit, and the rows being returned are far less than 32k in size.
    Could this have anything to do with the way HTMLDB is internally storing the PL/SQL used to generate the dynamic SQL Query? Is there any known issue related to this with that version of HTMLDB?
    This problem occurs without any discernable pattern or consistency, making it hard to determine where I should focus my efforts in tracking down the cause.

    Hi all,
    My report seems to be behaving correctly once i set it to "Use Generic Column Names (parse query at runtime only)" :)
    Cheers,
    Joel

  • How to replace a table name with an item value in report region SQL query?

    I've got a SQL query in a report region that goes like this:
    SELECT :P30_HIDDEN FROM v_dms_dataset
    GROUP BY :P30_HIDDEN
    P30_HIDDEN is populated from a textfield input. Why doesn't this work, and is there a way to achieve what I'm trying to do here? I really need the ability to dynamically generate SQL queries in this way.

    Ben - you could either:
    1. case when :P30_HIDDEN = 'COL1' then col1 else ... end
    in order to determine which column to select (only really useful if you have a small number of predetermined columns to select from), or
    2. generate the SQL dynamically.
    Set the report region to SQL Query (PL/SQL function body returning SQL query), then have something like:
    declare
    l_sql VARCHAR2(4000);
    begin
    l_sql := 'SELECT ' || :P30_HIDDEN || ' FROM v_dms_dataset
    GROUP BY ' || :P30_HIDDEN;
    return l_sql;
    exception
    etc.
    end;
    John.

  • Export Report Missing Columns

    I have a normal report region (not interactive). It was working fine in APEX 3 but just recently upgraded to APEX 4. Now, it will miss some columns when I hit the Report Export link. I double checked and the column attribute is set to Yes for include in Export. I also have the column with the exact same column attribute settings on the exact same field on another page and it exports fine on that page.
    Are there any reported bugs or anyone have any ideas?

    I just fixed the problem, I had a column title with an under score (CLOSED_DATE) when I removed the underscore the problem was fixed, this missing columns is exported to excel now. Try renaming the column this will fix it also.

  • SQL Report Region

    Hi,
    I am using apex 4.0.1 and I have a page with several SQL Report regions. The user can edit the data in the report regions by clicking a column that uses a href link to open a DML page in a modal window. The user can then amend some data in the modal window, press save which closes the modal window and uses the partial page refresh process to refresh the SQL report region. (Using apex.event.trigger('#SOME_REGION'),'apexrefresh')).
    If I navigate through the report to show rows 31-45 and then click on a href to edit a record. On pressing save, the report is refreshed but the rows displayed goes back to 1-15.
    How can I get the report to stay showing the rows 31-45?
    Cheers
    Paul.

    I believe this answers my question
    http://monkeyonoracle.blogspot.com/2010/11/refresh-report-region-and-pagination.html
    Edited by: pjturley on Jan 10, 2012 1:14 PM

  • Performance issue for Report Regions

    We have an app which has as it's "Home Page" a portal-style page. The "portlets" are separate regions. Some of these regions are HTML forms, but most are report regions, invariably with PL/SQL returning the SQL query.
    On our dev box this portal renders fine, in no more than 5 seconds (acceptable). On the production box a couple of the portlets go crazy, usually taking between 1-2 minutes each. I know this because I added the #TIMING# string to each region footer. The portal page has a META tag to refresh every 120 seconds.
    The first thing I did to debug was to take the PL/SQL function body returning the SQL query, replace all the variables (which are just local vars, app items and page items) with hardcoded values, strip all quotes and run the "cleaned up" SQL query in SQLPlus. It executes very fast.
    So my conclusion is that the problem lies with the application server (which is Oracle iAS). Is this a logical conclusion? What should my next move be to get to the bottom of this?
    Even without the problem portlets the portal refresh speed varies widely, between <1 sec and >10 sec.
    The application also has other pages displaying the portal regions individually. These pages (including those with the "problem portlet" queries) render ok (ie, order of 5 seconds or less). This tells me that there is an issue with having a bunch of query-based regions on the same page.
    My guess is that I might need to examine the logs and/or httpd/modplsql settings of the app server. Number of simultaneous connections?
    What would happen if hundreds of users used this app concurrently, navigated to the portal page and left it like that to auto-refresh every 2 minutes? Are such pages a no-no in HTMLDB?

    Some more information:
    When I run the page in debug mode, I see the following timings for one of the problem portlets:
    11.53: show report
    11.54: determine column headings
    11.54: parse query
    60.95: binding: ":F118_BUNDLE"="F118_BUNDLE" value="1"
    60.95: binding: ":P52_STMETRICS_PRODBRANCH"="P52_STMETRICS_PRODBRANCH" value="RDBMS_MAIN"
    60.95: binding: ":P52_STMETRICS_PLATFORM"="P52_STMETRICS_PLATFORM" value="LINUX"
    61.35: print column headings
    61.35: rows loop: 15 row(s)
    [report is printed here]
    61.49: FORMITEM: P52_STMETRICS_PLATFORM HIDDEN
    61.54: FORMITEM: P52_STMETRICS_PRODBRANCH HIDDEN
    This tells me that the bulk of the time (50 seconds in this case) is eaten up in parsing the query. What is this symptomatic of?
    Another problem I've just noticed. It takes about 5 seconds to open up a region for editing (Region Definition) in HTMLDB. When I click "Apply Changes" (even without editing anything) it is taking on the order of minutes for the changes to be applied to the page. Our app server was bounced just before I noticed this.
    These are the params in our DAD:
    <Location /pls/toolsdb>
    SetHandler pls_handler
    Order deny,allow
    PlsqlDatabaseConnectString ...
    PlsqlDatabasePassword ...
    PlsqlDatabaseUsername ...
    PlsqlDefaultPage ...
    PlsqlDocumentPath docs
    </Location>

  • "Between NVL" - Works in SQL Command, not in APEX report region

    First, I realize I could use dynamic SQL (model 4), but I don't want to (too hard just yet).
    I have a select statement with a series of Where conditions that employ values, in bind variables, supplied by the user.
    I want the choice of parameters to be optional, so I am checking for and replacing nulls.
    Select emp_name from employee_table where
    emp_rating between nvl(:p7_rating_choice, 0) and nvl(:p7_rating_choice, 99)
    and
    emp_language_no between nvl(:p7_lang_choice, 0) and nvl(:p7_lang_choice, 99);
    (the binds should be numeric).
    The actual statement is quite a bit longer, but the point is that the BETWEEN NVL(:x, min) AND NVL(:x, max) piece does not seem to work when used in a report region.
    It works fine if ALL parameters are provided, but returns an error if one or more are null.
    In the SQL command window it works (with a pop-up) just fine.
    By the way, the :p7_lang_choice bind variable is chosen from a LOV list which works in all other cases.
    Also, if I disable nulls (choosing "no" in ITEM page), everything works fine. It seems that the substitution of the min and max values via the NVL returns the wrong data type.
    Any ideas what I have done wrong?

    Thanks Scott.
    Every day brings a little more understanding!
    I also noticed a simplified method in the APEX documentation (although there was no explanation of the code) as follows:
    Where
    (column = :p1_user_input_1 OR :p1_user_input_1 = [null substitution value])
    AND
    (column = :p1_user_input_2 OR :p1_user_input_2 = [null substitution value])
    AND
    etc...
    Using the value you provide in the LOV section for the null, the second part of the OR handles the null situation.
    For some reason I was so tied up with comparing to the column that I never thought to have an OR with a compare to something else.
    Oh well.
    Thanks,
    Norm

Maybe you are looking for

  • Twelve of my third-party apps essentially uninstall themselves when I sync my iPod Touch.

    Here's the kicker: in NO WAY did I uncheck their boxes, yet iTunes keeps thinking I want to remove them. I am at a loss what to do, as the support articles on Apple's site aren't helpful. This has not occurred before today. I suspect this has its roo

  • Eset Node 32 interfering with icloud photos

    I have recently installed Eset Node 32 on my WIndows 7 PC. My photos are now not updating on my Photo Stream/iCloud Photos folder. Any ideas?

  • Error 25011 installing Rescue and Recovery 4.3

    On installing the R&R 4.3 on my X200T running Windows 7 I am getting the error 25011. The location was originally set (correctly) as UK, following a previous thread I changed the locale to US (and rebooted) Tried both the US and multi-language instal

  • Where is iPhone crash log for Windows?

    Mac keeps them in ~/Library/Logs/CrashReporter/MobileDevice. What is the corresponding location for Windows? Does the user have to sync the iPhone to get the latest crash log for an iPhone app?

  • Problem in adding Search function in HeadMast.

    Hello All, I am working on EP6 SP2 and wanted to know how can I add the Search function (which is on Toolbar and appears below the HeadMast in Portal), to be included as a prt of HeadMast. Please refer to this link: http://www.sapdesignguild.org/reso