Bex Query not passing all rows to Crystal reports

hello experts,
i have created a bex query that shows all employees from the master data table and links to the cats table to show absence hours...
in bex, all employees are showing and some of the employees have hours showing for sick time. this is known as a left outer join.
i have created a report in crystal with this bex query and it does not show rows from the master data that do not have a link to the cats table. only the rows that have a link to the cats table are showing up. (this is compared to a inner join)
the reason i need the master data from the employee table is that the users want to divide the total hours off(sick time) per department by the total employees in that department.
here is the sql query from crystal that was created automatically when i used the bex query to created the crystal report.
SELECT {Measures.4J8L2TQJ3P517ISQ1R4Y8UZ36, Measures.4J9PY3UANRIW2HW15YSOED92A, Measures.4J9TLIO0NDQROSA2YONCW6HB6}
ON COLUMNS,
NON EMPTY
CROSSJOIN(0EMPLOYEE.LEVEL01.MEMBERS, 0EMPLOYEE__0COMP_CODE.LEVEL01.MEMBERS)
DIMENSION PROPERTIES 0EMPLOYEE.50COMP_CODE, 0EMPLOYEE.50MAST_CCTR ON ROWS
FROM ZCATS_MC1/ZZCATS_MC1_Q001C
SAP VARIABLES 0I_DAYS INCLUDING 0CALDAY.20100502 : 0CALDAY.20100903
i am using the mdx driver, and the integration kit is 2.8.
any thoughts?
thanks,
erik

Thanks Ingo for the quick response.
this sounds like a limitation in the integration between bex and crystal because the query shows the correct data and the crystal reports does not. i have tried to add a calculated key figure to all the rows and put a number in it but it still does not show the rows in crystal.
my issue is that they(the business users) want to know all the employees in the employee master data along with all the sick / illness data.
do you have a suggestion for this issue?
do you think that the mdx driver should be updated to allow master data to flow to crystal?
thx,
Erik

Similar Messages

  • Bex Query not passing blank columns to crystal reports

    good morning ladies and gentleman,
    i have created a bex query that shows all employees from the master data table and links to the cats table to show absence hours...
    in bex, all employees are showing and some of the employees have hours showing for sick time. very good...
    i have created a report in crystal with this bex query and it does not show rows from the master data that do not have a link to the cats table. only the rows that have a link to the cats table are showing up.
    the reason i need the master data from the employee table is that the users want to divide the total hours off(sick time) per department by the total employees in that department.
    i have tried to create a formula that will add 1 to the hours sick field, then all the rows should have a amount in it. but, it still does not show the employees who do not have sick time.
    here is the sql query from crystal.
    SELECT {[Measures].[4J8L2TQJ3P517ISQ1R4Y8UZ36], [Measures].[4J9PY3UANRIW2HW15YSOED92A], [Measures].[4J9TLIO0NDQROSA2YONCW6HB6]}
    ON COLUMNS, 
    NON EMPTY
    CROSSJOIN([0EMPLOYEE].[LEVEL01].MEMBERS, [0EMPLOYEE__0COMP_CODE].[LEVEL01].MEMBERS)
    DIMENSION PROPERTIES [0EMPLOYEE].[50COMP_CODE], [0EMPLOYEE].[50MAST_CCTR] ON ROWS
    FROM [ZCATS_MC1/ZZCATS_MC1_Q001C]
    SAP VARIABLES [0I_DAYS] INCLUDING [0CALDAY].[20100502] : [0CALDAY].[20100903]
    this is kind of an emergency and i have been working on this for two days and cannot come to a resolution.
    if anyone can help, i would appreciate it.
    i am guessing that there is a option somewhere that will allow blank records to show.
    please help.
    thanks,
    erik

    miss stated the issue. created new note.

  • Export for all rows of a Report Region

    Hi,
    I have a html region with a query button to restrict which rows get selected in a reports region below it.
    But I also want to have a link to export all rows in the report to a csv file. Button the report region may already
    have selected data in it that is not necessarily all rows in the report. Thus I guess I am wondering if I should
    create a whole separate hidden report region that will always select all rows in the query to relate the
    export link to? Or if I can someone use the current report region and select all rows for the export but
    not requery or change the currently displayed report regions results?
    Thanks in advance!

    Yes I just created a hidden report i.e. one with all columns set to
    APEX_APPLICATION.G_EXCEL_FORMAT = TRUE
    And then just create a javascript function to call the export routine...

  • Multi pass bursting of a Crystal report on business view with a bex query

    In BO CMC, we have a group with a list of user.
    The idea is to burst (via the multi pass bursting method) a Crystal report for this list of user with the constraint that this report should only contains data of the store linked to the user.
    Our data comes from a SAP BI cube.
    The link between a Store and a User comes from an other system.
    We have build a bex query and use it as a data source of a Crystal Data Foundation.
    In this Data Foundation we have an other table storing the user ID and the Store ID.
    These 2 tables are linked in this Data Foundation on the Store ID.
    Business element and Business View have also been created on top of this Data Foundation.
    We have impletemented a filter in this Data Foundation to filter out data on the user id. This user id will be filled when bursting the report for all requested users thanks to this function :.
    As a user is linked to one store, the data foundation will filter the data coming from the bex query and show only the data of the user's store.
    We have build a crystal report using the business view created above as data source. We have made some test on a small amount of data and it works, data are correctly filter out and the reports shows only the data from one store.
    But the problem is that we have a lot of stores (more than 600) and doing this way implies that the bex query will always return the data for all the stores as the filter will occurs in the data foundation and not on the bex query.
    We need to find a way to make the bex query returning only the data of the store linked to the user for which we burst the report.
    As we have more than 600 stores this was an idea to avoid managing more than 600 under BO groups or more than 600 different filters.
    This solution do not work when the bex query result set is too large.
    Does anyone has an idea on how to implement such "dynamic" filter in the bex query? The parameter is the user ID but the filter to be applied on the bex query is on the store ID.
    We are under BO XI release 2, Crystal XI Release 2 and we have installed the BO release 2 integration kit for SAP

    Hi,
    what about setting up the data level security in BW ?
    Ingo

  • Delete command is not deleting all rows

    Hi All,
    Database version 10.2.0.2
    Delete command is not deleting all rows and deleting some subset of rows which it should delete, ever time I delete and do the roll back, next time it will delete some random rows, count is different everytime with in the range but not complete in anyway. see the following -
    select count(*) from test where evt_id in (select evt_id from test1);
    COUNT(*)
    27105
    delete from test where evt_id in (select evt_id from test1);
    16045 rows deleted.
    select count(*) from test where evt_id in (select evt_id from test1);
    11060
    rollback;
    Againg the same procedure -
    select count(*) from test where evt_id in (select evt_id from test1);
    COUNT(*)
    27105
    delete from test where evt_id in (select evt_id from test1);
    14320 rows deleted.
    select count(*) from test where evt_id in (select evt_id from test1);
    COUNT(*)
    12785
    why its not deleting all the 27k rows in one shot? Is there any bug related to that?
    Thanks
    Abhinav

    Odd that what looked like identical statements produced different results, both the counts and the deletes. The most likely cause of that is your data is changing - as Fahd suggested perhaps a simultaneous load taking place.
    The delete issue is probably not due to a bug. Possible but unlikely.
    If any evt_id values are NULL they won't be deleted with the subquery - a NULL in test.evt_id will never match a NULL in test1.evt_id.
    Have you tried alternative subqueries - a correlated EXISTS subquery for instance?

  • BW Query variable default value put in Crystal report variable question

    Why BW Query variable default value put in Crystal report variable for BO InfoView to open crystal report.
    I using Analyzer to open bw query,variables had default value ,but crystal report can't had variable default value ,and can't search variable  value.
    pho:
    [http://file.itpub.net/f/e38876ad4f6efb7e73980488e7d71f8d/4ae940e9/day_091029/20091029_2b04da1232144feba180OrB23SNvXtoT.gif/p/1.gif]
    [http://file.itpub.net/f/d93ddfe61e0eaf80429726c61f1a02ff/4ae940e9/day_091029/20091029_3211ffe04bf0302fbab5FRKnbwmH80p7.gif/p/BW_QUERY_Crystal.gif]
    Edited by: flying on Oct 29, 2009 8:20 AM

    I Know what to do .
    but Crystal report date variable value are Garbage characters "###".
    PHO:
    [http://file.itpub.net/f/39a8510104476707ae21c945db93ecba/4ae97949/day_091029/20091029_32dcbb7e7d99141483aesJ9KBJHXN0Kj.gif/p/2.gif]

  • Date Filter in BEx Query not applied to Webi Document

    Hi
    I have a simple BEx Query on 0MATERIAL - with Article (0MATERIAL) and Created On Date (0CREATEDON) characteristics in the Rows and 1ROWCOUNT key figure in the columns.
    If I restrict the BEx Query on 0MATERIAL to a single value, only that particular record is returned when I run the query in WebI - which shows Article and Created On Date.
    However, if I restrict the BEx Query to a specific 0CREATEDON date, the WebI report ignores this restriction and returns ALL records in the InfoProvider 0MATERIAL.
    If I run the BEx Query in the web, only those records with the particular restricted date are returned, so why does the WebI report ignore the BEx Query date restriction?  Any ideas where I am going wrong?
    Thanks
    Anton

    Hi Victor
    Thanks for the reply.  It turns out even after refreshing the universe structure and exporting I had to shut down Webi and reopen it for the changes (date restriction) to take effect.
    But thanks for the headsup on that bug/SAP note anyway - it is helpful to know.
    Rgds
    Anton

  • Bex Query Variable error in Webi and Crystal for Enterprise

    Hi,
    We just upgrade to BOBJ 4.1 SP2 and BW7.4 SP5
    I am creating a webi report based on a BEx query. There is Variable on Period/Fiscal Year from BEX side(Mandatory prompt) when I try to create a Webi or Cyrstal for Enterprise report the below error pops up. Other Bex queries work correctly. Can it be the values in the variable the following values exist when execute from Bex i.e. 001.2012; Period 2013
    Is the SAP Note : 1611185 relevant for 4.1 SP2
    Error:
    com.businessobjects.sdk.core.server.CommunicationException$UnexpectedServerException: Termination message sent
    ABEND DBMAN (257): SQL Error: INTERNAL_ERROR
      MSGV1: INTERNAL_ERROR
    Is this True for BOBj4.1 SP2?
    http://scn.sap.com/thread/3362312
    Selection range variables are not fully supported in Crystal Reports for Enterprise.
    Message was edited by: Tienie Nothnagel

    Henry Banks wrote:
    > I know what you mean.  In BEx, it's automatic: the default values are pre-selected at runtime, based on user authorizations
    >
    > In WebI, user needs to do a 3-click workflow to select the authorized values from the prompt dialog. This can be broken down into 3 phases:
    >
    > (a) initialize prompt u2013 empty pane.
    >  (b) refresh list of values,
    >  (c) select response values.
    Thanks Henry! I was looking for this confirmation that it is a limitation of Webi and I'm not missing something.
    Henry Banks wrote:
    > ---> make this BEx variable u2018mandatoryu2019 u2013 this will trigger an automatic refresh mechanism on the list of values, and show it to the user.  This will eliminate steps (a) & (b).
    >
    It is not possible to set Authorization variables as mandatory. They are set to "optional" and cannot be changed (BEx limitation).
    Henry Banks wrote:
    > Unfortunately, BEx and WebI are not like-for-like replacement tools. Not all u2018normalu2019 BW features integrate natively into BObj.
    > So this will also have to be an excercise in positioning a new product to your onboarding users.  (i.e.  just click the button)
    > Regards,
    > H
    I understand that. Thanks for your suggestion.

  • BEx query not shown in BO 4.0; BICS

    Hi,
    I have a sample BEx query designed in Query Designer 7.x; I would like to use this query with Web Intelligence of BO 4.0. However, the query is not being displayed.
    In CMC -> Authentication we have entered our SAP BW system and we are getting the roles imported. So the connection seems to work.
    In the query I have turned on the option "Allow External Access to this Query" (but I think this isn't necessary for BICS?).
    However, the query isn't displayed when creating a new WebI document based on BEx. Do I have to do some more steps?
    Thanks!
    Edit: I now created a new OLAP connection, our BO server can see the query and cube. But: I don't see this OLAP connection in Web Intelligence Rich Client. I am using the administrator login and have full access.
    Edited by: SteveXI on Sep 7, 2011 5:29 PM

    Hi,
    I have created 2 OLAP connection in CMC with SSO and Predefined. (does not work with prompt).
    I can see the list of queries from cube with predefined connection, but all are gredout!!. what could be the reason?
    With SSO connection i get following error -
    com.google.protobuf.UninitializedMessageException: Message missing required fields: bytesValue
    Any input is much appreciated.
    Thanks.
    Edited by: Rajan Patel on Oct 12, 2011 4:40 PM

  • OracleXMLQuery not fetching ALL rows

    Problem:
    ======
    For example, if there are 10 rows in the Table, sometimes the XMLQuery sees less than 10 rows. We wrote a small test program with a JDBC query for select count(*) from Table, which always shows 10. So nothing wrong with Connection/Statement settings. They all use DEFAULT settings (READ_COMMITTED, TYPE_FORWARS_ONLY).
    Why does n't XMLQuery see all rows available from the Query?
    Software Version:
    ============
    Oracle 10.1.0.5
    XDK: Oracle XDK 10g
    JAVA 5
    My program:
    =========
    Connection connection = dataSource.getConnection();
    Statement stmt = connection.createStatement(); <-- We tried with TYPE_SCROLL*. Still not working.
    ResultSet rs = stmt.executeQuery("select * from MyTable);
    //1. Query the database with the OracleXMLQuery. Result will be in XML format.
    OracleXMLQuery query = new OracleXMLQuery(connection, rs);
    query.keepObjectOpen(true);
    query.setMaxRows(1); //We don't want to build huge XML DOM for all rows.
    while (rs.next()) { <--- Ideally it should iterate 10 times XMLDocument xmlDoc = (XMLDocument) query.getXMLDOM();          
    System.out.println(xmlDoc);
    if (query.getNumRowsProcessed() > 0) {          
    //Do something here
    Thanks.
    Kanugula.

    I am providing the stack trace. You have more information.
    By the way, what surprises me is "OracleXMLQuery sees 1/2 of the rows only. Means if you have 12 rows, it sees 6 only"
    query= OracleXMLQuery (id=2148)
    conv= OracleXMLConvert (id=2154)
    colCount= 48
    collectTimingInfo= false
    collIdAttrName= null
    collItemTag= "_ITEM"
    colNames= OracleColumnName[48] (id=2376)
    colNamesHash= Hashtable<K,V> (id=2377)
    conn= LogicalConnection (id=2145)
    curCount= 2
    dataHeader= null
    dateFormat= "yyyyMMddhhmmss"
    docTag= null
    docType= 1
    dset= OracleXMLDataSetExtJdbc (id=2378)
    bindPosHash= null
    conn= LogicalConnection (id=2145)
    connUser= null
    cursorCols= int[0] (id=2380)
    dsetList= null
    isConsistent= true
    msg= XSUMesg (id=2166)
    ncharSuported= true
    rmdata= OracleResultSetMetaData (id=2381)
    rowCount= 4
    rset= ScrollableResultSet (id=2147)
    close_statement_on_close= false
    m_allRowsCached= false
    m_autoRefetch= true
    m_beginColumnIndex= 0
    m_cache= OracleResultSetCacheImpl (id=2190)
    m_columnCount= 48
    m_conn= T4CConnection (id=2195)
    m_currentRow= 6
    m_lastRefetchSz= 0
    m_metadata= OracleResultSetMetaData (id=2371)
    m_numRowsCached= 6
    m_refetchRowids= null
    m_refetchStmt= null
    m_rset= OracleResultSetImpl (id=2196)
    m_scrollStmt= T4CStatement (id=2146)
    m_type= 1004
    m_update= 1007
    m_usrFetchDirection= 1000
    m_warning= null
    m_wasNull= 0
    rsetFirstTime= false
    rsetIsExt= true
    rsetVal= true
    sdf= SimpleDateFormat (id=2382)
    stmt= null
    tempS= T4CStatement (id=2146)
    dsetIsExt= false
    DTDString= null
    errTag= "ERROR"
    extException= null
    firstXElemNmIdx= 0
    isNull= "TRUE"
    keepCursor= true
    maxRows= 1
    metaHeader= null
    metaType= 0
    miscFlags= 0
    namesValid= true
    noRowsException= false
    notNull= "FALSE"
    nullAttrId= "NULL"
    objClosed= false
    qstring= null
    raiseException= false
    refAttrName= "REFTYPE"
    rootNodeSupplied= false
    rowCountStr= "num"
    rowIdAttrDt= 2
    rowIdColName= null
    rowIdColNum= 0
    rowsetTag= "ROWSET"
    rowTag= "ROW"
    rset= ScrollableResultSet (id=2147)
    rsetIsExt= true
    skipRows= 0
    styleSheetType= null
    styleSheetURI= null
    tagCase= 0
    tim= null
    tns= null
    updateDateFormat= false
    useColumnLabelAsRoot= false
    useNullAttrId= false
    useTypeForCollElemTag= false
    val= OracleScalarName (id=2379)
    xAttrAfterElem= false
    xAttrIdxs= null
    xElemCnt= 48
    encoding= null
    encSet= false
    xslp= null
    xslt= null

  • Improving a simple select query, which uses all rows.

    Hi All,
    Please excuse me if the question is too silly. Below is my code
    SQL> select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
    PL/SQL Release 10.2.0.1.0 - Production
    CORE    10.2.0.1.0      Production
    TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    Elapsed: 00:00:00.07
    SQL> show parameter optim
    NAME                                 TYPE        VALUE
    object_cache_optimal_size            integer     102400
    optimizer_dynamic_sampling           integer     2
    optimizer_features_enable            string      10.2.0.1
    optimizer_index_caching              integer     0
    optimizer_index_cost_adj             integer     100
    optimizer_mode                       string      ALL_ROWS
    optimizer_secure_view_merging        boolean     TRUE
    plsql_optimize_level                 integer     2
    SQL> explain plan for select SUM(decode(transaction_type,'D',txn_amount,0)) payments_reversals,
      2          SUM(decode(transaction_type,'C',txn_amount,0)) payments,primary_card_no,statement_date
      3             from credit_card_pymt_dtls  group by primary_card_no,statement_date;
    Explained.
    SQL> select * from table(dbms_xplan.display);
    PLAN_TABLE_OUTPUT
    Plan hash value: 2801218574
    | Id  | Operation          | Name                  | Rows  | Bytes |TempSpc| Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT   |                       |  1912K|    56M|       | 21466   (3)| 00:04:18 |
    |   1 |  SORT GROUP BY     |                       |  1912K|    56M|   161M| 21466   (3)| 00:04:18 |
    |   2 |   TABLE ACCESS FULL| CREDIT_CARD_PYMT_DTLS |  1912K|    56M|       |  4863   (3)| 00:00:59 |
    9 rows selected.
    SQL> select index_name,index_type
      2  from all_indexes
      3  where table_name = 'CREDIT_CARD_PYMT_DTLS';
    INDEX_NAME                     INDEX_TYPE
    INDX_TRANTYPE                  BITMAP
    INDX_PCARD                     NORMAL
    INDX_PSTATEMENT_DATE           NORMALThe query is using all the records in the CREDIT_CARD_PYMT_DTLS table. Transaction type will be either 'C' or 'D'.
    CREDIT_CARD_PYMT_DTLS has 2 million rows and the qury will output 1.5 million rows. Table statisticas are upto date.
    The query now is taking almost 5 minutes. Is thaere any way to reduce the time ?
    Our DB server has 8 CPUs and 8 GB memory. Is the timing genuine ?
    Thanks in Advance.
    Edited by: user11115924 on Apr 29, 2009 2:43 AM
    All the columns used in the query are already indexed. ( Ofcourse, not only for this query.)

    Hi All,
    Thanks for the helps provided. Expecting it once more..
    My actual query is as below
    select     primary_card_no,base_segment_number,atab.previous_balance,current_balance,intrest_amt_due_this_cycle,total_min_amt_due,total_credit_limit,
              total_purchase_this_cycle,total_cash_trns_this_cycle,available_credit_limit,payments,utilization,payment_ratio,payments_reversals,cash_limit,
              available_cash_limit, description
    from
           select primary_card_no,DECODE(base_segment_number,NULL,primary_card_no,base_segment_number) base_segment_number,
                   SUM(previous_balance) previous_balance,SUM(current_balance) current_balance ,SUM(intrest_amt_due_this_cycle) intrest_amt_due_this_cycle,
                   SUM(total_min_amt_due) total_min_amt_due,SUM(total_credit_limit_all) total_credit_limit,
                   SUM(total_purchase_this_cycle) total_purchase_this_cycle,SUM(total_cash_trns_this_cycle) total_cash_trns_this_cycle,
                   SUM(available_credit_limit) available_credit_limit,SUM(payments) payments,
                   (SUM(NVL(current_balance,0)) / SUM(total_credit_limit_all)) * 100 utilization,
                   (SUM(NVL(payments,0)) / DECODE(SUM(previous_balance),0,NULL,SUM(previous_balance))) * 100 payment_ratio,
                   SUM(payments_reversals) payments_reversals,SUM(cash_limit) cash_limit,SUM(available_cash_limit) available_cash_limit
          from
            ( select a.*,NVL(payments_reversals,0)payments_reversals ,NVL(payments,0) payments
              from
                    (  select primary_card_no,previous_balance,current_balance,intrest_amt_due_this_cycle,total_min_amt_due,total_purchase_this_cycle,
                              total_cash_trns_this_cycle,statement_date,available_credit_limit,cash_limit,available_cash_limit,
                           (case when statement_date <= TO_DATE('301108','ddmmyy') then NULLIF(total_credit_limit,0)
                                      else NULLIF((select credit_limit
                                                from ccm_dbf_chtxn_v0 t1
                                                   where t1.batch_id = '011208'
                                                   and SUBSTR(t1.card_number,4) = a.primary_card_no),0)
                             end) total_credit_limit_all
                     from
                        ( select primary_card_no,previous_balance,current_balance,INTREST_AMT_DUE_THIS_CYCLE,
                                    TOTAL_MIN_AMT_DUE,TOTAL_PURCHASE_THIS_CYCLE,TOTAL_CASH_TRNS_THIS_CYCLE,statement_date,
                                   AVAILABLE_CREDIT_LIMIT,cash_limit,available_cash_limit,total_credit_limit
                          from credit_card_master_all@FGBAPPL_LINK
                        ) a
                     where statement_date between ADD_MONTHS(TRUNC(SYSDATE,'mm'),-6) and  TRUNC(SYSDATE,'mm')-1
                 ) a,
                 ( select SUM(decode(transaction_type,'D',txn_amount,0)) payments_reversals,
                               SUM(decode(transaction_type,'C',txn_amount,0)) payments,primary_card_no,TO_CHAR(statement_date,'MON-RRRR') sdate
                    from credit_card_pymt_dtls 
                    group by primary_card_no,TO_CHAR(statement_date,'MON-RRRR')
                 ) b
             where TO_CHAR(a.statement_date,'MON-RRRR')= b.sdate(+)
               and a.primary_card_no= b.primary_card_no(+)
            ) a,
            (  select SUBSTR(a.card_number,4) card_number,base_segment_number,TO_DATE(account_creation_date,'DDMMYYYY') account_creation_date,
                           a.batch_id, credit_limit credit_limit_current
                from
                       (  select *
                           from ccm_dbf_phtxn_v0
                           where batch_id=  (SELECT to_char(MAX(TO_DATE(SUBSTR(BATCH_ID,1,6),'DDMMRR')),'DDMMRR') FROM CCM_MST_V0)
                        ) a,
                        ( select *
                          from ccm_dbf_chtxn_v0
                          where batch_id=(SELECT to_char(MAX(TO_DATE(SUBSTR(BATCH_ID,1,6),'DDMMRR')),'DDMMRR') FROM CCM_MST_V0)
                        ) b
                where a.card_number=b.card_number
                and TO_NUMBER(ROUND(MONTHS_BETWEEN(SYSDATE,TO_DATE(account_creation_date,'DDMMYYYY')),2)) >=6
                and a.company ='BNK'
            ) b
       where a.primary_card_no = b.card_number
       group by primary_card_no,base_segment_number) atab, card_summary_param btab
    where utilization between utilization_low and utilization_high
    and payment_ratio between  payment_ratio_low and payment_ratio_high
    and SIGN(atab.previous_balance) =btab.previous_balanceWhere I have to put the PARALLEL hint for maximum performance?
    Sorry for asking blindly without doing any R&D. Time is not permitting that...
    Edited by: user11115924 on Apr 29, 2009 5:09 AM
    Sorry for the kiddy aliases.. Query is not written by me..

  • Regular Report Not Returning All Rows

    Greetings,
    On APEX version 4.1.1.00.23 Using latest versions of Chrome and IE. I found some threads that discussed this aspect some, but not to the extent that is helpful to my situation.
    I know it is crazy to have APEX return 40K+ rows on a report, but I have a need to do so. I need to return that many rows from a table so that an APEX page can be opened via Excel and then have an Excel macro run over the report results and import all 40K+ rows into a worksheet. As I said, that's crazy, but the decision isn't mine. :-) We have the macro working and it passes parameters to the APEX page and imports data from the APEX page.
    Also, the report has 14 columns on it, not that many.
    Given the requirement above I have a regular report page that only has the report and 2 page items on it. The page items contain values that are passed via Excel and are then used in the WHERE condition of the report. Using the same WHERE condition, when I run the SQL for the report outside of APEX it returns 46,840 rows. I have the both the Number of Rows and Maximum Row Count settings set to 50000. And, I have the Pagination Scheme set to Row Ranges X to Y of Z (with pagination).
    When I run the page and enter the selection criteria the report only returns 15,500 rows. Yes, that's a lot rows. And, it takes about 5 minutes to populate. But, it doesn't return ALL of the rows. Also, the pagination suggests that all rows were returned because it reads - row(s) 1 to 15500 of 15500. I have changed the pagination and max rows settings a lot to see of it's just a matter of having the correct report setting. I've yet to find a setting that will cause the whole 46840 result set to be returned.
    It may end up that the report selection needs to change in order to return fewer rows. But, regardless of that why isn't APEX returning the complete result set now? And, is there a way to force it to return the complete result set regardless of the size?
    Any suggestions are appreciated.
    Thanks, Tony

    cloaked wrote:
    Thanks for the response. Yup, you're correct. Downloading to a CSV might be better. I've set reports up that way many, many times. I have even developed pages that import from a CSV into APEX using PL/SQL, years before it was an APEX feature. I initially set the report up to allow it to be downloaded, but the user doesn't want it to work that way.
    The worksheet will be used by a lot of people in our accounting department and they want the process to be as simple as possible. Right now Excel opens up the APEX page, logs into the application, passes parameters to it for the month and company, hits the Select button, waits on the report to build, then automatically imports it, and finally closes the page. It is quite slick. Yes, it takes 5 minutes to run, but the user is OK with that given what the automation provides.
    So, in order for the automated import to work properly all 45K rows need to display on one page, without pagination. I currently have pagination on the page simply to determine if APEX is returning all of the rows.A process of this nature might work better using an export: XML or export: CSV report template, which won't go anywhere near pagination. When a page containing a report using these templates is requested APEX sends the report results in XML or CSV format rather than rendering the page. This should be faster, avoid complications with pagination, and be easier to parse in Excel.
    Previous thread along similar lines: +{thread:id=2285213}+

  • Query Results: Retrieve All Rows?

    I was looking for a feature that will allow me to choose to return "all records" to the Query Results window. The current behavior is to fetch 50 records at a time (e.g. fetch 50 records as you scroll through the results = s-l-o-w). What I'd like to do is "Retrieve All Rows" then use to the scroll bar to "smoothly" scroll to the last record. For example, the 8.0.6 version of Query Builder had this functionality and in SQL Developer 3.0, if I right-click on the results. I can choose to "Count Rows...", seems like this would be a perfect place to put a "Retrieve All Rows" option.

    Hi,
    My advice: do something only if there is a business case for it; satisfying your curiosity can get surprisingly expensive.
    You have already read about using Run Statement to execute a SQL statement, then Ctrl-End to auto-scroll to the end. You can try the same for Run Script, but first you will probably need to increase the value of Tools|Preferences|Database|Worksheet|Max rows to print in a script. Of course, taking either of these approaches slows things down due to displaying output and scrolling. Same with SQL*Plus. And, as mentioned previously, Java memory management in SQL Developer can cause slow downs and hangs if the result set is large enough.
    Here is a way to minimize that delay, avoid hangs, and get a more repeatable result:
    1) Save some query to, say, C:\Temp\AllCustomers.sql. For example, "select * from customers;" or "select id from customers;".
    2) Run it from a SQL Developer worksheet using Run Script (F5), or from the SQL*Plus command line, with a script like this:
    set timing on
    set termout off
    spool C:\Temp\AllCustomers.lst
    @C:\Temp\AllCustomers.sql
    spool offEven then you will see that the timing results will vary. Maybe "select *" runs much slower than "select id" because the logical output lines are long and get wrapped into multiple physical output lines in the file. Minimize that by setting linesize to a longer value (but only in SQL*Plus -- it isn't supported in SQL Developer) and repeat the test to see. Maybe SQL*Plus runs it much faster than SQL Developer because one is a command line environment and the other a GUI tool with more overhead. Or maybe the SQL Developer JVM is near its size limit and lots of Java garbage collection is slowing it down. Simple question, complicated answer.
    Regards,
    Gary
    SQL Developer Team
    P.S.: And if by chance you are using a version of SQL Developer so old it does not include the output time in the query result tab's toolbar, using Run Script with set timing on is your only recourse.
    Edited by: gggraham on Oct 27, 2011 4:54 PM

  • BEX Query not dispaying results

    Hi All,
    I think this week am hit with number of issues....as mentioned in my earlier posts am new to SAP BW and having issues.
    Issue:
    We have a BEx query and it is not displaying results(in Web report). Error is "could not find any records for the given selection......... "
    I have checked the Infocube for the given selection in Query and I can display the records where as it is not displaying at all in BEx query results.
    I have reactivated the cube to see whether the data flows through but it didn't work.
    I tried executing query using RSRT and it is not displaying any results.
    I have deleted data in the infocube and loaded it again and it didn't work
    Any help would be much appreciated.
    Cheers
    Sandeep

    Hi Akshay,
    No errors while executing query under RSRT.
    Yes we are using time variants and we have included fical variant under characteristic restrictions.
    Cheers
    sandeep

  • How to pass all rows from a VO to PL/SQL API

    Hi,
    My requirement is to pass all the rows of a View Object (shown on Page as a Table) to PL/SQL API. I am not allowed to pass information row by row using single array (JTF_VARCHAR2_TABLE_200).
    How do we pass multidimensional information to the PL/SQL API. Any pointers to this would be welcome.
    Thanks

    Sumeet,
    sorry for delay in code snippet.
    Here is a sample code assuming you want to send 2 attributes name and desc from your VO rows.
    I wrote the code during weekend and hence i doubt its working ;)
    public oracle.sql.ARRAY getVoArray()
    Connection conn = this.tx.getJdbcConnection();
    OAViewObject vo = (OAViewObject)this.appModule.findViewObject("TestVO");
    try
    ArrayDescriptor descriptor = ArrayDescriptor.createDescriptor
    ("TABLE_OF_BELOW_ROW_TYPE"
    ,conn
    StructDescriptor voRowStructDesc = StructDescriptor.createDescriptor
    ("XXX_TO_BE_SEND_ROW_TYPE"
    ,conn
    TestVORowImpl row = null;
    String name;
         String desc;
    int fetchedRowCount = vo.getFetchedRowCount();
    STRUCT [] finalStruct = new STRUCT[fetchedRowCount];
    Object[] attrField = new Object[1];
    RowSetIterator entityIdIter1 = vo.createRowSetIterator("entityIdIter1");
    if (fetchedRowCount > 0)
    entityIdIter1.setRangeStart(0);
    entityIdIter1.setRangeSize(fetchedRowCount);
    for (int i = 0; i < fetchedRowCount; i++)
    row = (TestVORowImpl )entityIdIter1.getRowAtRangeIndex(i);
    name = (String)row.getName();
              desc = (String)row.getDesc();
    attrField[0] = (String)name;
    finalStruct[i] = new STRUCT(voRowStructDesc, conn, attrField);
    entityIdIter1.closeRowSetIterator();
    oracle.sql.ARRAY yourArray = new oracle.sql.ARRAY(descriptor, conn, finalStruct);
    return yourArray;
    return null;
    catch(java.sql.SQLException ex)
    throw OAException.wrapperException(ex);
    Let me know if you are still having issues.
    --Saroj                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Maybe you are looking for

  • Can I copy pages from a book I am reading on the iPad to the ipad

    I am reading a library book in overdrive is it possible to copy pages from the book to be read on the iPad after the book is returned? Thanks for your response Cin 

  • New Features in CRM5.0 Marketing

    Can anyone tell me what the new features are in CRM5.0 in particular the Marketing part. Or if there is any specific documentation on what the new features are in CRM5.0. I have looked in the sticky at the documentation links in there but none seem t

  • Error during CHECKDB

    Hi Team, I am getting an error message when i peform CHECKDB by scheduling a job in DB13. When i run the command line from AIX server it seems to go fine. The error message is Job started Step 001 started (program RSDBAJOB, variant &0000000000236, us

  • How To select maximum Value in a specifieid field in internal table.

    How To select maximum Value in a specifieid field in internal table?

  • Object class for AUSP table

    Hi Experts, Iam working on change pointers for the Material. In BD52 transaction iam able to enter some fieds for the material. But i need to enter Material Classication, and i found AUSP-ATWRT field. Now, i want to pass this table & field into BD52