XL Reporter Query problem

I have a query with sbo:
SELECT T0.DocNum, T0.ItemCode,t0.duedate,T0.PlannedQty, T0.OriginNum as Sale-Order, T0.U_Doc_Remarks,t2.numatcard  FROM OWOR T0 left join OITM T1 ON t0.itemcode = T1.ITEMCODE left join ordr t2 on t0.originnum = t2.docnum where T0.OriginNum = '[%0]'
but in XL Reporter, How do I set up?  OWOR_OriginNum Equal SO_DocNum and OWOR_OriginNum as a param

XL Reporter does not support SQL. All its meta data have been predefined in the system. You may not have left join option at all.
Try some other tools such as Crystal Report or Query PLD.
Thanks,
Gordon

Similar Messages

  • Printable Report Query Problem

    I am attempting to develop a printable report query. I have created a report query under shared components that consists of 12 separate queries that gather data that all relates to a single page item. The intent is to create a printed PDF document for the user on demand that will display all this information about the page item that they have selected.
    The report query gathers the information and generates an XML file in the following format.
    <DOCUMENT>
        <ROWSET1>
            <ROWSET1_ROW>
                             *Data from query 1*
            </ROWSET1_ROW>
        </ROWSET1> 
        <ROWSET2>
            <ROWSET2_ROW>
                              *Data from query 2*
            </ROWSET2_ROW>
            <ROWSET2_ROW>
                              * Data from query 2*
            </ROWSET2_ROW>
       </ROWSET2>
       <ROWSET3>
           <ROWSET3_ROW>
                              * Data from query 3*
           </ROWSET3_ROW>
           <ROWSET3_ROW>
                              * Data from query 3*
           </ROWSET3_ROW>
       </ROWSET3>
    </DOCUMENT>I then took this XML file and developed an RTF template using BI Publisher desktop and imported it as a Report Layout.
    I then connected this RTF layout to the report query and ran it. I did not get the all the data to print.
    I found the reason it did not work was that the XML file that is generated from the report query is not static. The next XML file that was generated from the report query looked like this:
    <DOCUMENT>
        <ROWSET1>
            <ROWSET1_ROW>
                               * Data from query 3*
            </ROWSET1_ROW>
            <ROWSET1_ROW>
                               * Data from query 3*
            </ROWSET1_ROW>
        </ROWSET1> 
        <ROWSET2>
            <ROWSET2_ROW>
                               * Data from query 7*
            </ROWSET2_ROW>
            <ROWSET2_ROW>
                               * Data from query 7*
            </ROWSET2_ROW>
            <ROWSET2_ROW>
                               * Data from query 7*
            </ROWSET2_ROW>
       </ROWSET2>
       <ROWSET3>
           <ROWSET3_ROW>
                               * Data from query 1*
           </ROWSET3_ROW>
       </ROWSET3>
    </DOCUMENT>So I cannot develop an RTF template to display the data if I do not know where that data will appear in the generated XML.....
    Questions (I will offer several POINTS to anyone who can answer any of these questions!!!!)
    I am using APEX version 3.1
    *1. Why does the report query seem to randomly renumber and reorder the XML data it produces?*
    *2. Is there any way to make the report query output the XML data in the same order that the individual queries are ordered every time?*
    *3. Is there any way to specifically name the rowsets or rowset rows that is supported by APEX?*
    *4. Are there any other methods that I can explore to produce this report?*
    *5. Is this a problem because I am on an old release? Is this not a problem on 4.1?*
    Edited by: bhenderson on Feb 1, 2012 8:22 AM

    Thanks for your response.
    There are 12 separate queries in the report query. Each one is in a separate box on the report queries screen.
    I don't know how to post an image here, but I will try to describe it:
    The first query selects several fields relating to :P5_WIP_ENTITY_ID, which is a Work order. This query is header information about the job and should only return one row.
    The other queries get other information relating to :P5_WIP_ENTITY_ID, like part numbers that may have been issued to that job, purchases made for that job and so on. These queries may return more than one row or may not return anything.
    I have created the queries in the order that I want them to display on the form, however, when the XML is generated, ROWSET1 may have the data from the Header Query one time, then the next time it may have data from the purchase query. In other words, it does not display the data in the order that the queries appear on the report query page, and it seems to reorder the output at random.
    I have looked everywhere I could think of, but there doesn't seem to be any way of connecting or relating the separate queries. I also tried doing separate queries in one box and joining them, but there is a limit of 60 data items you can select from one query box.
    Edited by: bhenderson on Feb 3, 2012 10:01 AM

  • Out standing MIS Report query problem.

    Hi,
    We designed MIS Report for outstanding mis through Crystal report.here we are facing probleme.ex:AR invoice raised on 01 Jan 09 bill amount 1000 and for this client is received full amount against that bill on 04 march09.in this report we provided parameters for from date and to date. When user selected in parameter from date 010109 to 050309 it will show pending amount is 0.but users are asking if they select from date upto 030309 means it will show pending amount should be show 1000.in this query we are retrieving based on document status when open. How we can show report for this requirements. Please guide me.if we give docstatus='O' or docstatus= 'C' it's showing but pending amount =Bill amount - paid amount here it's showing 0 i think here also we need to pass incoming payment docdate.how wen do please guide me.
    below this is the query.
    set @FromYear=case when month(@ToDate)>=1 and month(@ToDate)<=3 then Year(@ToDate)-1 else Year(@ToDate) end
    set @ToYear=case when month(@ToDate)>=1 and month(@ToDate)<=3 then Year(@ToDate) else Year(@ToDate)+1 end
    --select @fromYear,@toyear,@todate,@ProjCode,@Cardcode,@VoucherType,@GroupName
    select a.u_category,a.docdate,g.name,d.CardCode,d.cardname,e.GroupName,SUBSTRING(CONVERT(VARCHAR(11), a.docdate, 113), 4, 8)as Month of invoiceraised,
    b.seriesname,a.docnum,a.Project,0,a.doctotal,
    paidamount= case when a.paidtodate is NULL then 0 else a.paidtodate end,
    pendingamount= case when isnull(a.doctotal,0)-isnull(a.paidtodate,0) is null then 0 else isnull(a.doctotal,0)-isnull(a.paidtodate,0) end,
    case when year(a.docdate) = @ToYear and month(a.docdate) = 3 then isnull(a.doctotal,0)-isnull(a.paidtodate,0) else 0 end as March ,
    case when year(a.docdate) = @ToYear and month(a.docdate) = 2 then isnull(a.doctotal,0)-isnull(a.paidtodate,0) else 0 end as Feb,
    case when year(a.docdate) = @ToYear and month(a.docdate) = 1 then isnull(a.doctotal,0)-isnull(a.paidtodate,0) else 0 end as Jan,
    case when year(a.docdate) = @FromYear and month(a.docdate) = 12 then isnull(a.doctotal,0)-isnull(a.paidtodate,0) else 0 end as Dec,
    case when year(a.docdate) = @FromYear and month(a.docdate) = 11 then isnull(a.doctotal,0)-isnull(a.paidtodate,0) else 0 end as Nov,
    case when year(a.docdate) = @FromYear and month(a.docdate) = 10 then isnull(a.doctotal,0)-isnull(a.paidtodate,0) else 0 end as Oct,
    case when year(a.docdate) = @FromYear and month(a.docdate) = 9 then isnull(a.doctotal,0)-isnull(a.paidtodate,0) else 0 end as Sept,
    case when year(a.docdate) = @FromYear and month(a.docdate) = 8 then isnull(a.doctotal,0)-isnull(a.paidtodate,0) else 0 end as Aug,
    case when year(a.docdate) = @FromYear and month(a.docdate) = 7 then isnull(a.doctotal,0)-isnull(a.paidtodate,0) else 0 end as July,
    case when year(a.docdate) = @FromYear and month(a.docdate) = 6 then isnull(a.doctotal,0)-isnull(a.paidtodate,0) else 0 end as June,
    case when year(a.docdate) = @FromYear and month(a.docdate) = 5 then isnull(a.doctotal,0)-isnull(a.paidtodate,0) else 0 end as May,
    case when year(a.docdate) = @FromYear and month(a.docdate) = 4 then isnull(a.doctotal,0)-isnull(a.paidtodate,0) else 0 end as April,
    --case when a.docdate = (select f_refdate from ofpr where year(f_refdate)=year(a.refdate) then a.doctotal-c.paidtodate else 0 end as Pre-Yr
    nodocsum=isnull(f.nodocsum,0),0 as PreviousFY
    from oinv a
    left join nnm1 b on a.series=b.series
    inner join INV1 c ON a.DocEntry = c.DocEntry
    inner join OCRD d ON d.CardCode=a.CardCode
    left join ocpr g on g.cardcode=d.cardcode
    Inner join OCRG e on e.GroupCode=d.GroupCode and e.grouptype='c'
    LEFT JOIN ORCT f ON a.DocEntry = f.DocEntry
    where
    a.docstatus='O' and
    case when a.doctotal-a.paidtodate is null then 0 else a.doctotal-a.paidtodate end >= 0
    Reds,
    Sampath kumar devunuri.

    Hi,Gordon Du ,
    We are designing through Crystal reports 2008 only. Based on SQL query how we can maintain History of Document status and date in table. Please give me your advise how we can rectify this problem. Kindly find above query.
    Regds,
    Sampath Kumar.

  • Matrix Report Query Problem

    Dear members
    I am using reports 6 and oracle 9i. I am trying to create a matrix report in which i want to show products as rows and dates as columns. Dates should be fixed 7 days any from to dates given by user. I have used two tables prd_plan_m and product_code. I want to show plan_no and plan_qty based on product_code and date. I want to show all the products as rows whether it has plan or not and 7 days columns shows as heading weather in this there is any plan or not.
    For this reason i have made this query.
    SELECT ALL p.code,pkg_prod.get_prod_name(p.code)prod_name,pkg_prod.get_prod_qty(p.code)prod_qty,P.PLAN_ID, P.PLAN_DESC, a.dates,
    P.PLAN_QTY, P.UNIT_ID, P.REMARKS
    FROM PRD_PLAN_M P ,(select rownum - 1 + to_date('20-jul-08', 'dd-mon-rrrr') dates
    from all_objects
    where rownum < to_date('26-jul-08', 'dd-mon-rrrr') -
    to_date('20-jul-08', 'dd-mon-rrrr') + 2)a
    where P.PLAN_DATE(+) = A.DATES
    UNION
    SELECT E.P_CODE,E.PROD_NAME,E.PROD_QTY,null,null,null,null,null,null FROM PROD_CODE E
    But this query shows duplicates rows. suppose one product_code in prd_plan_m has plan_qty shows one row and the row from product_code table also show the same row which have no plan qty.
    Help me in this regard.
    I will be very thankful to you .
    thanks and regards

    Thanks for reply. But this query is also produce the same results see bellow output.
    CODE     PROD_NAME     PROD_QTY     PLAN_ID     PLAN_DESC     DATES     PLAN_QTY UNIT_ID     REMARKS
    0101     MOUNTAIN DEW     225 ML NR               
    0201     PEPSI MAX     240 ML          
    0301     PEPSI          250 ML          P0001L01 TEST PLANE-01     7/21/2008 20000 1          test
    0301     PEPSI          250 ML
    0302     MOUNTAIN DEW     250 ML          P0005L02 NEW ENTRY     7/26/2008 20000          TEST
    0302     MOUNTAIN DEW     250 ML
    Code 0301 and 0302 are repeated. But they should be shown only once. Please help me to resolve this problem.
    thanks & regards

  • Report Query Problem/Question

    I have 3 tables:
    Table one - Recipe
    PK varchar2(100) (yes, I know it isn't a number, but I had to put a 'CPL' in front of each sequence)
    RECIPE_NAME varchar2(250)
    Table two - Ingredients
    PK varchar2(100) (same reason as above expect needed a 'P' in front of each sequence)
    INGREDIENT_NAME varchar2(250)
    PRICE number
    Table three - Lkup_recipes
    PK number
    RECIPE_PK varchar2(100)
    INGREDIENT_PK varchar2(100)
    QUANTITY
    So, table one contains data like this:
    CPL1234 'APPLE PIE'
    CPL1256 'PIE CRUST'
    table two contains data like this:
    P1234 'FLOUR' 5.00
    P1256 'EGG' 2.56
    P1278 'WATER' 0.00
    P1312 'APPLE' 0.50
    table three contains data like this:
    1234 CPL1234 CPL1256 2
    1235 CPL1234 P1312 5
    1236 CPL1234 P1234 1
    1237 CPL1256 P1234 1
    1238 CPL1256 P1278 3
    Now, I have a report that shows the RECIPES with their price. I am having problems getting the proper price, based on the data above, since my recipe, Apple Pie, contains ingredients as well as the recipe, Pie Crust.
    I would expect the price of my pie to be: $17.50 but I am only getting a cost of $7.50.
    The query I am currently using is:
    select t1.pk, t1.recipe_name, sum(t2.price * t3.quantity) Price
    from recipe t1, ingredients t2, lkup_recipe t3
    where t1.pk = t3.recipe_pk
    and t2.pk = t3.ingredient_pk
    group by t1.pk, t1.recipe_name
    Obviously it isn't tracking down beyond the recipe, Pie Crust, to determine its' cost based on the ingredients contained in it.
    Any ideas out there on how to get my full price?
    Thanks!!
    Chrissy

    Hi Chrissy, <br>
    Your problem is that while you put "Pie Crust" as an ingredient in the apple pie, It is not also in the ingredients table. Heres an option:<br>
    run a batch job that looks at the ingredients table and finds all of the ingredients that are actually recipes. Have it calculate the cost of these "sub recipes" and insert them in the ingredients table along with their cost. <br><br>
    While this will get you around your problem, I dont think it is a good solution. You should rework your data model to be more versatile to include sub recipes OR you can simply alter your application to not use sub-recipes at all (instead just re-list all of the ingredients).
    <br><br>
    Let me know if you need any advice.
    <br>
    Dave<br>
    Lehr.ServeHTTP.com

  • 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?

  • Recurring problem - need to touch report query to make page to work again

    Hello
    In my APEX 3.0 (Oracle 10.2.0.3.0) application I have a main menu which is a very simple page with one report that selects from a local table (no dblink) what pages the logged user has access to.
    The problem is that now and then (around once a week) users get "page not found" after they log in to the application but before the main menu is displayed. After some testing I found out that, to fix it, I need to touch the report query (let's say, adding an extra space somewhere) and apply changes. After that, the page works fine...
    I have other much more complex pages in the application that don't have such problem.
    Any advice? Where should I start investigating to fix this?
    Thanks
    Luis
    PS: From the error_log file:
    [Mon Aug 20 10:12:54 2007] [error] [client 10.0.10.87] [ecid: 11877561:10.0.24.16:14092:0:37471,0] mod_plsql: /pls/apex/f HTTP-404 ORA-03113: end-of-file o
    n communication channel\n
    [Mon Aug 20 10:12:54 2007] [alert] [client 10.0.10.87] [ecid: 11877561:10.0.24.16:14092:0:37471,0] mod_plsql: Unable to reset state for mode 0: Err 3114 url=>/pls/apex/f

    i have this exact same problem in our production environment
    i really need help to fix it or we'll lose our major client
    they're fed up with it
    anyone?

  • Problem with Report Query

    I have tested the integration of Apex3.0 and BI Publisher via Report Query.
    This works very well, however I want to create a hierarchical XML document via the following Query:
    select a.id,
    a.persoonsnr,
    a.volgnr_dvb,
    a.jaar,
    a.naam,
    a.code_sagitta,
    a.status,
    a.invgebruiker,
    a.invdatum,
    a.mutgebruiker,
    a.mutdatum,
    cursor (
    select w.afspraken
    from hri_opmwerkresult w) as owr
    from hri_prsactiviteiten a
    I get the error message ORA-00932 inconsistent datatypes expected number got curser
    Is there a work around to create a report-query with master-detail info?

    Anyone?

  • 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

  • Sub Report Performance problem

    Our current software configuration is Microsoft SQL Server 2008 R2 (10.0.2531.0) where our data is housed. Our User Interface is Microsoft Visual Studio 2008 (Visual Basic) and Microsoft .NET 3.5 SP1 platform.  We use Crystal Reports 2008 (12.0.0.683) to do our reporting.
    We upgraded from Crystal Reports XI and our reports are taking a long time to render?... Is there any evidence of other companies experiencing this trouble? Are there any degraded performance issues when moving from XI to 2008?
    In some cases we utilizing a small simple sub report.
    Any help appreciated. Thanks.

    Hi Billy,
    Subreports in detail sections are never a good idea. Example, you have 100 records returned int he main report and if that field is your subreport link it causes the subreport to run 100 times. Your database is being queried 101 times.
    Also, the default time out for database is typically 1 minute, could be you need to verify your report and database so CR can "clean up" any wrong pointers.
    It's always better to do the data collection server side if and when possible, after all that's what they do best.
    Not much detail to go on so I can't say if it's a report design problem other than the above or not. It could be also that .NET takes time to load all of the CR assemblies so depending on how you have your app configured depends on the delay. If you load a dummy report when your starts up to pre-load CR runtime then subsequent reports will be much faster.
    Also check off all of the Verify Database options, you may be telling CR to verify each time which on big databases can cause a delay also.
    Thank you
    Don

  • Interactive report performance problem over database link - Oracle Gateway

    Hello all;
    This is regarding a thread Interactive report performance problem over database link that was posted by Samo.
    The issue that I am facing is when I use Oracle function like (apex_item.check_box) the query slow down by 45 seconds.
    query like this: (due to sensitivity issue, I can not disclose real table name)
    SELECT apex_item.checkbox(1,b.col3)
    , a.col1
    , a.col2
    FROM table_one a
    , table_two b
    WHERE a.col3 = 12345
    AND a.col4 = 100
    AND b.col5 = a.col5
    table_one and table_two are remote tables (non-oracle) which are connected using Oracle Gateway.
    Now if I run above queries without apex_item.checkbox function the query return or response is less than a second but if I have apex_item.checkbox then the query run more than 30 seconds. I have resolved the issues by creating a collection but it’s not a good practice.
    I would like to get ideas from people how to resolve or speed-up the query?
    Any idea how to use sub-factoring for the above scenario? Or others method (creating view or materialized view are not an option).
    Thank you.
    Shaun S.

    Hi Shaun
    Okay, I have a million questions (could you tell me if both tables are from the same remote source, it looks like they're possibly not?), but let's just try some things first.
    By now you should understand the idea of what I termed 'sub-factoring' in a previous post. This is to do with using the WITH blah AS (SELECT... syntax. Now in most circumstances this 'materialises' the results of the inner select statement. This means that we 'get' the results then do something with them afterwards. It's a handy trick when dealing with remote sites as sometimes you want the remote database to do the work. The reason that I ask you to use the MATERIALIZE hint for testing is just to force this, in 99.99% of cases this can be removed later. Using the WITH statement is also handled differently to inline view like SELECT * FROM (SELECT... but the same result can be mimicked with a NO_MERGE hint.
    Looking at your case I would be interested to see what the explain plan and results would be for something like the following two statements (sorry - you're going have to check them, it's late!)
    WITH a AS
    (SELECT /*+ MATERIALIZE */ *
    FROM table_one),
    b AS
    (SELECT /*+ MATERIALIZE */ *
    FROM table_two),
    sourceqry AS
    (SELECT  b.col3 x
           , a.col1 y
           , a.col2 z
    FROM table_one a
        , table_two b
    WHERE a.col3 = 12345
    AND   a.col4 = 100
    AND   b.col5 = a.col5)
    SELECT apex_item.checkbox(1,x), y , z
    FROM sourceqry
    WITH a AS
    (SELECT /*+ MATERIALIZE */ *
    FROM table_one),
    b AS
    (SELECT /*+ MATERIALIZE */ *
    FROM table_two)
    SELECT  apex_item.checkbox(1,x), y , z
    FROM table_one a
        , table_two b
    WHERE a.col3 = 12345
    AND   a.col4 = 100
    AND   b.col5 = a.col5If the remote tables are at the same site, then you should have the same results. If they aren't you should get the same results but different to the original query.
    We aren't being told the real cardinality of the inners select here so the explain plan is distorted (this is normal for queries on remote and especially non-oracle sites). This hinders tuning normally but I don't think this is your problem at all. How many distinct values do you normally get of the column aliased 'x' and how many rows are normally returned in total? Also how are you testing response times, in APEX, SQL Developer, Toad SQLplus etc?
    Sorry for all the questions but it helps to answer the question, if I can.
    Cheers
    Ben
    http://www.munkyben.wordpress.com
    Don't forget to mark replies helpful or correct ;)

  • 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.

  • Report region with column link that opens a pdf doc based on report query

    Hello
    I'm building a report table that displays info about a customer - simple select - and, for each record, has associated column links based on report queries that receive ID as parameter. When clicked, it opens the report in pdf extension. My problem here is how to pass the ID as a parameter to that report query considering i'm using a report table and that there are no items in page 71...
    This is the report query i'm using:
    select initcap(a.customer) customer
    , initcap(a.address) address
    , initcap(a.rep) rep
    , (select initcap(b.city)
    from portal_records b
    where b.contrib=a.contrib
    and b.year=to_char(sysdate,'yyyy')) city
    , (to_char(a.datereg,'dd')||' de '||to_char(a.datereg,'Month')||' de '||to_char(a.datereg,'yyyy')) datereg
    from portal_authorizations_cve a
    where a.id=:P71_ID ???????????????
    I thank in advance all your replies!!

    Hello
    First of all, let me compliment your for your demo application... It's awesome!
    I've looked into your sample (page 15) and, as far as i see, it opens a document saved in a table's column. I don't want the file to be saved there but generated when the user clicks on that particular link... So i still have the problem of how to pass the right ID as a parameter considering there is no page item on that page...
    My javascript knowledge is little so i ask you: when clicking the link, is there any way of opening a window with the url f?p=&APP_ID.:0:&SESSION.:PRINT_REPORT=Authorization_CVE and the ID as a parameter?
    I thank in advance!

Maybe you are looking for