Report-Query Value

Hi Experts,
Currently we are using one BW report in 3.5version(report query against multi provider).
Current issue:
Cube Fields:
PO Number: 123
Order value 100.
Confirmation value 50
Final Delivery Indicator: X (YES-No more confirmation is expected)
Calculation on the Query:
Outstanding Confirmed Value= Order Value - Net Confirmed Value
Here Outstanding Confirmed Value = 100-50=50.So in the reports, Outstanding Confirmed Value shows 50.
But the PO's Final Delivery Indicator is marked. So No more confirmation is expected
Question:
I am not able to create any formula against the filed Final Delivery Indicator. But i want to show in the report that if the PO's Final Delivery Indicator marked, then Outstanding Confirmed Value has to be 0(ZERO).
Please help me achieve this result. Thanks.
Advance Thanks.
RR.

Hi ,
This can be achived in the following way.
1. Create your formula
    "Outstanding Confirmed Value= Order Value - Net Confirmed Value" and hide it using the property.
2. Create one more forumala which will check the condition. i.e. if the Final Delivery Indicator is marked then it will set the outstanding confirmed value as zero else it will show the value which we are getting by using above mentioned formula.
put the following condition in the formula.
[Final Delivery Indicator = = 0 ] * 0 + [Final Delivery Indicator <> 0]*Outstanding Confirmed Value
This will work as follow.
For example : Outstanding Confrimed Value is 50 and Final Delivery Indicator is marked.
= [ 0 == 0 ] * 0 + [ 0 <> 0 ] * 50
= 1* 0 + 0 * 50              " When the condition is satisfied its result is 1. here 0 == 0 condtion is satisfied so its return value is 1.
= 0
Hope this will help.
- Jaimin

Similar Messages

  • Ora-06502 pl/sql numeric or value error in Report Query in oracle apex

    Hello all,
    I need your help...
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    I am using bi publisher to generate PDF reports in oracle apex.
    We were using APEX 4.0 and migrated to 4.2 just a week ago.
    Now we have apex 4.2.
    When I try to Create report query,
    Shared Components >> Report Queries then create.
    and test a report in a create wizard I am getting a error "ORA-06502: PL/SQL: numeric or value error: character string buffer too small".
    I have also applied a patch "16760897".
    This issue is because of number of columns in a query is more then 26.
    If I run a report with 26 or less number of columns then the is working fine, otherwise getting this error.
    My before migration report queries working perfectly even now, but not new queries.
    This issue is also in apex.oracle.com.
    You can see
    Not working  - http://apex.oracle.com/pls/apex/f?p=619:4
    Working - http://apex.oracle.com/pls/apex/f?p=619:2:
    Please give a solution.
    Thanks you.

    check the DB version compatibility with apex 4 or your DB version to apex 4.0 support for upgrade!
    Oracle Application Express Installation Requirements for 4.0

  • How to accessing current row report column value in Lov Query?

    Hi,
    which access methods (eg. bind variables, substitutions, ...) for getting the current row report column value can be used in the "Lov Query" property of a report column?
    As what I know of and what I have read on the forum there are no bind variables for the report columns. For the "Link Text" property it seems that the column values exist as substitution strings (#COLUMN_NAME#). But they don't work in the Lov Query. => And would be good because of a hard parse each time the Lov query is executed.
    The following post (Re: Simulating a correlated sub query in lov
    is showing a solution to use package variables for temporary storage of the referenced value, but the only problem with that solution is that if a new record is added with the "Add rows to tabular form" process the package variable still contains the value from the last queried row! Is there a way (variable, APEX package, ...) to determine if the lov query is executed for a new record so that the package can return null?
    I know that I could write the package in a way that the value is immediately cleared when lov_pkg.keyval is called (one time read), but then I would have to create several variables if I'm accessing the value multiple times in the query or in another query => I think an one time read solution would be very obscurely.
    Thanks for your help
    Patrick
    http://inside-apex.blogspot.com

    Hi Patrick,
    I agree that it's a waste to continually use Ajax to go back to the server to get the contents of a dynamic select list.
    There are no bind variables for any row item - but what you do have, as per my previous post, is the value of the data entered by the user in the first row. You can pass this into your application process (using get.add("VARIABLENAME", value)), which can use it to retrieve the correct LOV in your Ajax code - this will give you a "bind variable" that your process can use.
    What you could do, however, is generate hidden select lists on your page - one for each possible LOV list and replace the contents of the new row's select list with the contents of the appropriate hidden select list. This is easy to do with javascript (using innerHTML functions). Obviously, though, the usefulness of this depends on the number and size of the select lists.
    Even if you don't generate them to start with, you can keep a copy of any select lists returned by Ajax in the DOM for use on new rows. So, if you have retrieved a select list, you will have a copy of it in DOM which you can then copy into the new row. If you don't have the list in DOM, use Ajax to get it, store a copy of it and copy it into the new row.
    Which method you use will depend on the number/size of select lists needed. If they are few in number and/or size, I would suggest generating hidden lists. If they are large, use Ajax to get them once, store them and then retrieve them from the DOM when needed.
    There is another thread here where Arie recommends going to the server every time to make sure you get the most up-to-date data for the lists. If you want to follow this advice, for this reason, use get.add("VARIABLENAME", value) to pass the value to your process. If this is not an issue, you can use one of the other methods I outlined above.
    Regards
    Andy

  • Forming a report query dynamically with the value of an item

    Hi Gurus,
    We wanted to create a report based on the value of an item in the page.
    For example
    There is a text box named p1_table depending on the value of this item the query of the report should change
    1) when p1_table = emp then report query should be select * from emp
    2) when p1_table = dept then report query should be select * from dept
    I tried doing this using
    select * from :p1_table and select * from v('p1_table') , it is not working.
    Kindly help me in achieving the requirement.
    Thanks & Regards,
    Vikas Krishna

    Hi Vikas,
    You have to do this as a report based on a function that returns the query as a string. You build up the string dynamically in the function.
    Regards
    Andre

  • 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

  • Passing report value to PDF report query

    I apologize if this has already been asked and answered.
    Here's the scenario --
    I have a monthly sales page which displays the company sales for each day of the specified month. I also have a working report query and RTF layout which accepts the invoice date as a parameter which was created with the BI Publisher Word plug-in.
    What I would like to do is add a link or button to each row of the report that would call the PDF report, but passes the #invoice_dt# column in as the parameter. Invoice_DT isn't a session state variable, so is it possible to pass this to the report query?
    Thanks,
    Leigh

    Well, in my search for an answer to a different question, I did run across the answer to this in another thread.
    Re: Passing Parameters to a report query

  • Performance issues when creating a Report / Query in Discoverer

    Hi forum,
    Hope you are can help, it involves a performance issues when creating a Report / Query.
    I have a Discoverer Report that currently takes less than 5 seconds to run. After I add a condition to bring back Batch Status that = ‘Posted’ we cancelled the query after reaching 20 minutes as this is way too long. If I remove the condition the query time goes back to less than 5 seconds.
    Please see attached the SQL Inspector Plan:
    Before Condition
    SELECT STATEMENT
    SORT GROUP BY
    VIEW SYS
    SORT GROUP BY
    NESTED LOOPS OUTER
    NESTED LOOPS OUTER
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS OUTER
    NESTED LOOPS OUTER
    NESTED LOOPS
    NESTED LOOPS OUTER
    NESTED LOOPS OUTER
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS
    TABLE ACCESS BY INDEX ROWID GL.GL_CODE_COMBINATIONS
    AND-EQUAL
    INDEX RANGE SCAN GL.GL_CODE_COMBINATIONS_N2
    INDEX RANGE SCAN GL.GL_CODE_COMBINATIONS_N1
    TABLE ACCESS BY INDEX ROWID APPLSYS.FND_FLEX_VALUES
    INDEX RANGE SCAN APPLSYS.FND_FLEX_VALUES_N1
    TABLE ACCESS BY INDEX ROWID APPLSYS.FND_FLEX_VALUE_SETS
    INDEX UNIQUE SCAN APPLSYS.FND_FLEX_VALUE_SETS_U1
    TABLE ACCESS BY INDEX ROWID APPLSYS.FND_FLEX_VALUES_TL
    INDEX UNIQUE SCAN APPLSYS.FND_FLEX_VALUES_TL_U1
    INDEX RANGE SCAN APPLSYS.FND_FLEX_VALUE_NORM_HIER_U1
    TABLE ACCESS BY INDEX ROWID GL.GL_JE_LINES
    INDEX RANGE SCAN GL.GL_JE_LINES_N1
    INDEX UNIQUE SCAN GL.GL_JE_HEADERS_U1
    INDEX UNIQUE SCAN GL.GL_SETS_OF_BOOKS_U2
    TABLE ACCESS BY INDEX ROWID GL.GL_JE_HEADERS
    INDEX UNIQUE SCAN GL.GL_JE_HEADERS_U1
    INDEX UNIQUE SCAN GL.GL_DAILY_CONVERSION_TYPES_U1
    TABLE ACCESS BY INDEX ROWID GL.GL_JE_SOURCES_TL
    INDEX UNIQUE SCAN GL.GL_JE_SOURCES_TL_U1
    INDEX UNIQUE SCAN GL.GL_JE_CATEGORIES_TL_U1
    INDEX UNIQUE SCAN GL.GL_JE_HEADERS_U1
    INDEX UNIQUE SCAN GL.GL_JE_HEADERS_U1
    INDEX UNIQUE SCAN GL.GL_JE_BATCHES_U1
    INDEX UNIQUE SCAN GL.GL_BUDGET_VERSIONS_U1
    INDEX UNIQUE SCAN GL.GL_ENCUMBRANCE_TYPES_U1
    INDEX UNIQUE SCAN GL.GL_SETS_OF_BOOKS_U2
    TABLE ACCESS BY INDEX ROWID GL.GL_JE_BATCHES
    INDEX UNIQUE SCAN GL.GL_JE_BATCHES_U1
    INDEX UNIQUE SCAN GL.GL_SETS_OF_BOOKS_U2
    INDEX UNIQUE SCAN GL.GL_JE_BATCHES_U1
    TABLE ACCESS BY INDEX ROWID GL.GL_PERIODS
    INDEX RANGE SCAN GL.GL_PERIODS_U1
    After Condition
    SELECT STATEMENT
    SORT GROUP BY
    VIEW SYS
    SORT GROUP BY
    NESTED LOOPS
    NESTED LOOPS OUTER
    NESTED LOOPS OUTER
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS OUTER
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS OUTER
    NESTED LOOPS
    NESTED LOOPS OUTER
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS OUTER
    NESTED LOOPS
    TABLE ACCESS FULL GL.GL_JE_BATCHES
    INDEX UNIQUE SCAN GL.GL_SETS_OF_BOOKS_U2
    INDEX UNIQUE SCAN GL.GL_JE_BATCHES_U1
    TABLE ACCESS BY INDEX ROWID GL.GL_JE_HEADERS
    INDEX RANGE SCAN GL.GL_JE_HEADERS_N1
    INDEX UNIQUE SCAN GL.GL_SETS_OF_BOOKS_U2
    INDEX UNIQUE SCAN GL.GL_ENCUMBRANCE_TYPES_U1
    INDEX UNIQUE SCAN GL.GL_DAILY_CONVERSION_TYPES_U1
    INDEX UNIQUE SCAN GL.GL_BUDGET_VERSIONS_U1
    TABLE ACCESS BY INDEX ROWID GL.GL_JE_SOURCES_TL
    INDEX UNIQUE SCAN GL.GL_JE_SOURCES_TL_U1
    INDEX UNIQUE SCAN GL.GL_JE_CATEGORIES_TL_U1
    INDEX UNIQUE SCAN GL.GL_JE_BATCHES_U1
    TABLE ACCESS BY INDEX ROWID GL.GL_JE_LINES
    INDEX RANGE SCAN GL.GL_JE_LINES_U1
    INDEX UNIQUE SCAN GL.GL_SETS_OF_BOOKS_U2
    TABLE ACCESS BY INDEX ROWID GL.GL_CODE_COMBINATIONS
    INDEX UNIQUE SCAN GL.GL_CODE_COMBINATIONS_U1
    TABLE ACCESS BY INDEX ROWID GL.GL_PERIODS
    INDEX RANGE SCAN GL.GL_PERIODS_U1
    TABLE ACCESS BY INDEX ROWID APPLSYS.FND_FLEX_VALUES
    INDEX RANGE SCAN APPLSYS.FND_FLEX_VALUES_N1
    INDEX RANGE SCAN APPLSYS.FND_FLEX_VALUE_NORM_HIER_U1
    TABLE ACCESS BY INDEX ROWID APPLSYS.FND_FLEX_VALUES_TL
    INDEX UNIQUE SCAN APPLSYS.FND_FLEX_VALUES_TL_U1
    TABLE ACCESS BY INDEX ROWID APPLSYS.FND_FLEX_VALUE_SETS
    INDEX UNIQUE SCAN APPLSYS.FND_FLEX_VALUE_SETS_U1
    INDEX UNIQUE SCAN GL.GL_JE_HEADERS_U1
    INDEX UNIQUE SCAN GL.GL_JE_HEADERS_U1
    INDEX UNIQUE SCAN GL.GL_JE_HEADERS_U1
    Is there anything i can do in Discoverer Desktop / Administration to avoid this problem.
    Many thanks,
    Lance

    Hi Rod,
    I've tried the condition (Batch Status||'' = 'Posted') as you suggested, but the qeury time is still over 20 mins. To test i changed it to (Batch Status||'' = 'Unposted') and the query was returned within seconds again.
    I’ve been doing some more digging and have found the database view that is linked to the Journal Batches folder. See below.
    I think the problem is with the column using DECODE. When querying the column in TOAD the value of ‘P’ is returned. But in discoverer the condition is done on the value ‘Posted’. I’m not too sure how DECODE works, but think this could be the causing some sort of issue with Full Table Scans. How do we get around this?
    Lance
    DECODE( JOURNAL_BATCH1.STATUS,
    '+', 'Unable to validate or create CTA',
    '+*', 'Was unable to validate or create CTA',
    '-','Invalid or inactive rounding differences account in journal entry',
    '-*', 'Modified invalid or inactive rounding differences account in journal entry',
    '<', 'Showing sequence assignment failure',
    '<*', 'Was showing sequence assignment failure',
    '>', 'Showing cutoff rule violation',
    '>*', 'Was showing cutoff rule violation',
    'A', 'Journal batch failed funds reservation',
    'A*', 'Journal batch previously failed funds reservation',
    'AU', 'Showing batch with unopened period',
    'B', 'Showing batch control total violation',
    'B*', 'Was showing batch control total violation',
    'BF', 'Showing batch with frozen or inactive budget',
    'BU', 'Showing batch with unopened budget year',
    'C', 'Showing unopened reporting period',
    'C*', 'Was showing unopened reporting period',
    'D', 'Selected for posting to an unopened period',
    'D*', 'Was selected for posting to an unopened period',
    'E', 'Showing no journal entries for this batch',
    'E*', 'Was showing no journal entries for this batch',
    'EU', 'Showing batch with unopened encumbrance year',
    'F', 'Showing unopened reporting encumbrance year',
    'F*', 'Was showing unopened reporting encumbrance year',
    'G', 'Showing journal entry with invalid or inactive suspense account',
    'G*', 'Was showing journal entry with invalid or inactive suspense account',
    'H', 'Showing encumbrance journal entry with invalid or inactive reserve account',
    'H*', 'Was showing encumbrance journal entry with invalid or inactive reserve account',
    'I', 'In the process of being posted',
    'J', 'Showing journal control total violation',
    'J*', 'Was showing journal control total violation',
    'K', 'Showing unbalanced intercompany journal entry',
    'K*', 'Was showing unbalanced intercompany journal entry',
    'L', 'Showing unbalanced journal entry by account category',
    'L*', 'Was showing unbalanced journal entry by account category',
    'M', 'Showing multiple problems preventing posting of batch',
    'M*', 'Was showing multiple problems preventing posting of batch',
    'N', 'Journal produced error during intercompany balance processing',
    'N*', 'Journal produced error during intercompany balance processing',
    'O', 'Unable to convert amounts into reporting currency',
    'O*', 'Was unable to convert amounts into reporting currency',
    'P', 'Posted',
    'Q', 'Showing untaxed journal entry',
    'Q*', 'Was showing untaxed journal entry',
    'R', 'Showing unbalanced encumbrance entry without reserve account',
    'R*', 'Was showing unbalanced encumbrance entry without reserve account',
    'S', 'Already selected for posting',
    'T', 'Showing invalid period and conversion information for this batch',
    'T*', 'Was showing invalid period and conversion information for this batch',
    'U', 'Unposted',
    'V', 'Journal batch is unapproved',
    'V*', 'Journal batch was unapproved',
    'W', 'Showing an encumbrance journal entry with no encumbrance type',
    'W*', 'Was showing an encumbrance journal entry with no encumbrance type',
    'X', 'Showing an unbalanced journal entry but suspense not allowed',
    'X*', 'Was showing an unbalanced journal entry but suspense not allowed',
    'Z', 'Showing invalid journal entry lines or no journal entry lines',
    'Z*', 'Was showing invalid journal entry lines or no journal entry lines', NULL ),

  • Report query with bind variable

    Trying to create a report query for xsl-fo print. For output format I pick "derive from item" then pick the item name from the list, on the next screen, I paste the query with the bind variable. on the next step test query, I always get "data not found" regardless what value I type in. This is the same query that I ran under sql commands without any issues.
    Does anyone run into the same issue as I have when attempted to create a query with bind var ? There is no problem creating a query without bind varibles. . thanks.
    Munshar

    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

  • Performance problem with report query

    Hi,
    I am encountering a performance issue with a page returning a report.
    I have a page that has a region which joins 2 tables. One table has about 220,00 rows, while the other contains roughly 60,000 rows. In the region source of the report region, the query includes join condition with local variables. For example, the page is page 70, and some join conditions are:
    and a.id=:P70_ID
    and a.name like :P70_NAME
    I run the query that returns a large number of rows from sqlplus, and it takes less than 30 sec to complete.
    When I run the page, the report took about 3 minutes to return.
    In this case, :P70_NAME is initialized to '%' on the page.
    I then tried to substitute variable value directly in the query:
    and a.id=1000
    and a.name like '%'
    this time the report returned in about 30 sec.
    I then tried another thing which specified the region as "PL/SQL Function returning sql query", and modified the region as follows:
    l_sql := '.......';
    l_sql := l_sql || 'and a.id=' || v('P70_ID')
    and similar substituting :P70_NAME to v('P70_NAME') and append its value to the l_sql string.
    The report query page also returned in 30 sec.
    Is there any known performance issue with using the bind variable (:PXX_XXX) in the report region?

    If you are able.. flush the shared_pool, run your
    report then query the v$sql_area or v$sql_text tables.
    Or do a google query and look up Cary Milsap's piece on enabling extended trace .. there is your sure fire way of finding the problem sql. I am still learning htmldb but is there a way to alter session enable trace in some pre-query block?

  • Bind Variables and Shared Component Report Query

    I have a query in a region report which I have replicated to a shared component report query.
    Both queries reference page items as bind variables in the where clause.
    The report region on screen shows the correct results but the report query shows "no data". This is the case when running "Test Query" and "Download XML data" from the shared component report query definition. If I hardcode the variable names I get rows returned, If I use bind variables - and specify the values for these variables I get no data. THe XML file contains the tags for each bind variable I have specified but has no data between the tags. I have Ticked the box to include application and session state but it appears that the bind variables are not being used.
    When I use my report query in the application (URL tied to a button) I get the same problem, the binds are not being passed to the report query.
    Can someone please clarify if this is a bug or not? And if not, how can I get it to work.
    I am using Apex 4.0.2
    Thanks
    Kathryn

    Hi
    To confirm, yes I selected the bind variables. I used these in the report layout, but the xml file has them as empty i.e.
    <P0_START_DATE><P0_START_DATE/> with nothing in between.
    IN the Test Query section, if I put real values in the boxes for the bind variables, I get no data found. If I hardcode the values into the query, I get the data.
    I've repeated the create report query many times and have created a report layout in RTF. I can use the layout with my region - in the print attributes and the layout works with the query but I need to create a PDF using 2 queries - ROWSET1 and ROWSET2. I can generate the XML but the values in the rows are all empty. When I use the layout with a report query instead of the region, I get no data even though I have used the same sql and have selected the bind variables. I was using variables from page items on page zero but have also tried using page items on the current page, the result is the same.
    I need to use a report query and a report layout as I need data from 2 queries in the PDF.
    I looked at your demo - what happens if you add a second sql query to the report query - is there any chance I can look at the back end (developer access?)
    Thanks for your input
    Kathryn

  • Report Query returning "No Data Found" with bind variables

    I put a simple query into Report Query:
    Select "bluefish". "name" as "name",
    "bluefish"."primary_flag" as "primary_flag",
    "bluefish"."status" as "status",
    "bluefish"."ID" as "ID" from "bluefish" "bluefish" where "bluefish"."ID" = :P3_XPRINTID
    When I test the query, data is returned; however, when I try to run the query using "Test Report" button, I get an error 01403 No Data Found. If I replace the bind variable with an explicit value, the report works.
    Anyone have any ideas as to what is causing this problem? I am using the Generic Report Layout, with various output types. I AM editting the query and defining the bind variable before I test the report (otherwise, the query wouldn't run).
    Charles

    Sometimes if you create a form/report/whatever using the wizards, it will create an After Submit process called something like Reset Page - basically you want to make sure you don't have any After Submit processes that call a Clear Session state (it may say something like Clear Cache for Page).
    In your branch, there is also a box that says Clear Cache - you want to make sure that does not have page Number 8 in it or it will clear your session state.
    Put the page in Debug mode and read through it - check to make sure your value is getting saved and maybe you can see what is going wrong.

  • Setting a bind variable in a Shared Component Report Query

    I have defined a Shared Component Report Query in APEX using a bind variable similar to below
    Select name, id , ....
    from asset
    where id = :id
    I have also created a Report Region that displays a table where one of the columns contains a value I would like to be a link column that can launch the Report Query and pass its value to the bind parameter :id in the report query. This in turn would generate a pdf report for the details associated with that column. I am having problems setting the :id bind parameter. How do I do this?
    Can anyone help?
    Thanks

    The bind values are set from session state. So if try something like this:
    Select name, id , ....
    from asset
    where id = :P1_ID
    With P1_ID being a page item, for which you set the session state / value before generating the PDF file. So assuming you already have a page with a report and a page item, and that page item is already used in your report, then you could just create a button to download the PDF, make sure the button is a submit button, and create a branch pointing to the report query URL (or in 3.1 use the create button wizard, to do this declaratively.)
    Regards,
    Marc

  • BI Publisher Report Query Error: "character string buffer too small"

    Using apex.oracle.com, I am trying to make a Report Query (Shared Components > Report Queries) based on many columns (around 60).
    When I enter my SQL in the "Source Query" Text Area and then click Test Report I get the following error:
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small In order to try to make the simplest test case possible for this, I then tried entering SQL selecting just from DUAL.
    The following SQL fails with the error mentioned above.
    SELECT
    'wibble' as a
    ,'wibble' as b
    ,'wibble' as c
    ,'wibble' as d
    ,'wibble' as e
    ,'wibble' as f
    ,'wibble' as g
    ,'wibble' as h
    ,'wibble' as i
    ,'wibble' as j
    ,'wibble' as k
    ,'wibble' as l
    ,'wibble' as m
    ,'wibble' as n
    ,'wibble' as o
    ,'wibble' as p
    ,'wibble' as q
    ,'wibble' as r
    ,'wibble' as s
    ,'wibble' as t
    ,'wibble' as u
    ,'wibble' as v
    ,'wibble' as w
    ,'wibble' as x
    ,'wibble' as y
    ,'wibble' as z
    ,'wibble' as ab
    ,'wibble' as ac
    ,'wibble' as ad
    ,'wibble' as ae
    ,'wibble' as af
    ,'wibble' as ag
    ,'wibble' as ah
    ,'wibble' as ai
    ,'wibble' as aj
    ,'wibble' as ak
    ,'wibble' as al
    ,'wibble' as am
    ,'wibble' as an
    ,'wibble' as ao
    ,'wibble' as ap
    ,'wibble' as aq
    ,'wibble' as ar
    ,'wibble' as at
    ,'wibble' as au
    ,'wibble' as av
    FROM dualRemoving the last column from this SQL query (bringing the total number of columns down to 45) as follows and then clicking "Test Report" works successfully.
    SELECT
    'wibble' as a
    ,'wibble' as b
    ,'wibble' as c
    ,'wibble' as d
    ,'wibble' as e
    ,'wibble' as f
    ,'wibble' as g
    ,'wibble' as h
    ,'wibble' as i
    ,'wibble' as j
    ,'wibble' as k
    ,'wibble' as l
    ,'wibble' as m
    ,'wibble' as n
    ,'wibble' as o
    ,'wibble' as p
    ,'wibble' as q
    ,'wibble' as r
    ,'wibble' as s
    ,'wibble' as t
    ,'wibble' as u
    ,'wibble' as v
    ,'wibble' as w
    ,'wibble' as x
    ,'wibble' as y
    ,'wibble' as z
    ,'wibble' as ab
    ,'wibble' as ac
    ,'wibble' as ad
    ,'wibble' as ae
    ,'wibble' as af
    ,'wibble' as ag
    ,'wibble' as ah
    ,'wibble' as ai
    ,'wibble' as aj
    ,'wibble' as ak
    ,'wibble' as al
    ,'wibble' as am
    ,'wibble' as an
    ,'wibble' as ao
    ,'wibble' as ap
    ,'wibble' as aq
    ,'wibble' as ar
    ,'wibble' as at
    ,'wibble' as au
    FROM dualSo the question is: Is there a hard-coded limit of 45 columns for a Source Query? Or is there something else causing this error message?
    (For information in the above example I have "Use Generic Report Layout" selected and the output format set to "PDF")
    Thanks very much in advance for any comments or suggestions,
    Andy

    Thanks for the suggestion Simon.
    I just created a view based on the 46-column SELECT statement from dual above and then set "SELECT * FROM myview" as the Source Query.
    Unfortunately I get exactly the same error.
    Thanks,
    Andy

  • 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

  • Comma separated data into IN clause in oracle report query

    i have a field on form as order number it takes more than one value as 1,2,3
    now i want to fetch data in report query for where order no in 1,2 and 3...
    but field takes value as 1,2,3...
    how can i separte the comma from value and how can i pass value in IN clause...or
    how can i get all records with order no 1,2,3...
    please suggest how can i achieve the same....

    Hi Maddy....
    Try this :
    declare
    var varchar2(10);
    v1 varchar2(5);
    v2 varchar2(5);
    v3 varchar2(5);
    vRegExp varchar2(5);
    begin
    var:='1,2,3'; 
    vRegExp:='[^,]+';
    FOR i IN 1..length (regexp_replace (var,vRegExp))  + 1
    LOOP
                v1 := REGEXP_SUBSTR (var,vRegExp);
                v2 := REGEXP_INSTR(var,vRegExp,1,2);
                var := substr(var,v2);
               // here fetch you data from report by passing v1 as a parameter;
          EXIT WHEN v2 = 0;
    END LOOP;
    end;
    Hope this will resolve your question..
    Thanks

Maybe you are looking for

  • How can I make a "Soap bubble" effect in FCP5

    I would like a color tint in the bubble, but no optical distortion. Like The Wizzard of OZ. Any ideas? Thanks in advance, David

  • Custom fields for ROS initial page in BSP application

    Hi, We want to add some more customer fields in ROS initial page, for example TIN number. We have added a field to ZZTIN in the include CI_CUF_REQ_FIELDS of structure ROS_CUF_REQ_FIELDS and also implemented BAdI ROS_REQ_CUF. After adding custom codes

  • Rows not deleted after delete in BefExportToDat Script in FDM

    Hi I am using FDM ERPI to load data from Oracle eBS GL 1.5 to Oracle Hyperion Planning 11.1.2.1. I have to slit data coming from eBS to 2 Essbase applications, using a temporary table : Location1 (data to app1) : I have to load data on accounts liste

  • Combining 3 Movement types into 1

    Hello Gurus The requirement is to combine below 3 movement types into 1. 1) Blocked Stock/Q Stock to Unrestricted Use. 2) Unrestricted use to Sales Order Stock. 3) MB1B from 2010 to 3000. Will Appreciate your responce on this

  • Online issue with the radio

    I can listen to the radio on the internat but after 30 min off it shut down and i have to reset why? help anybody