Group by in Discoverer

Hi,
I am trying to group by information in Discoverer but results are not coming out as I expect.
Imagine this, we have sales orders, each sales order has many lines (items within the order). I want to group by orders, so each row will represent only the order number (without lines for each item).
To do that I am using the group sort option at the sales order number column, but yet the results are not getting grouped. Please see picture http://s12.postimg.org/b35pe46jx/Capture.png.

Try doing the report in Cross-Tab format.

Similar Messages

  • Why does Discoverer put my custom function into GROUP BY

    To make things clear with simple example:
    I have 10 id's from people (people.id) and sum function on their salary [sum(people.salary)] during a period of time that i set in my parameters.
    The sql looks something like this:
    SELECT PEOPLE.ID
    ,SUM(PEOPLE.SALARY)
    FROM FRS_PEOPLE
    WHERE [MY CONDITIONS]
    GROUP BY PEOPLE.ID
    I registered a function that uses people.id, and some other parameters to calculate something for each people.id!
    I made a calculation:
    MY_FUNCTION(people.id,'xxx','yyy')
    ,so my sql looks like this now:
    SELECT PEOPLE.ID
    ,SUM(PEOPLE.SALARY)
    ,MY_FUNCTION(people.id,':xxx',':yyy')
    FROM FRS_PEOPLE
    WHERE [MY CONDITIONS]
    GROUP BY PEOPLE.ID,MY_FUNCTION(people.id,':xxx',':yyy')
    It runs but never finishes....?!
    When i run my sql in sqlplus i do not put my function into group by, but discoverer does so, despite it already has people.id item in GROUP BY!
    And if i put instead of people.id an actual id it works correctly and does not put my function into group by!
    The sql i am looking for and works correctly is:
    SELECT PEOPLE.ID
    ,SUM(PEOPLE.SALARY)
    ,MY_FUNCTION(people.id,'xxx','yyy')
    FROM FRS_PEOPLE
    WHERE [MY CONDITIONS]
    GROUP BY PEOPLE.ID
    Please someone help!
    My select clause is much more complicated, with many outer joins so i made the above up just to explain to you what my problem is!
    I hope i made my self clear!
    Help would be very appreciated.

    Hi,
    I think there is a problem with your function. That fact that the report completes when an actual id is used must not when a people.id is used suggests that it works when the function is called once with an actual id but not when it is called many times with a people.id.
    If the function is doing complex lookups and calculations to obtain a salary for each people.id then often this type of report will run quicker with the salary calculation is brought into the report SQL using joins etc.
    Tracing the Discoverer session running the report will show you all the SQL processed by the database and the execution plans used. It will show you how often the function is being called and what SQL is being run by the function.
    Rod West

  • Problems in Discoverer Grand Total

    Hi,
    I have a problem regarding group total in discoverer. I have two calculated columns suppose A and B and theier group totals at bottom. Now I have another column C which is B/A. The problem is grand total of C gives the totals of row values for C. Instead of that I want grand total of C = grand total of B/grand total of A.
    How could that be possible?
    Please help.

    You would need to provide more detail about your 3 columns. On your column C total, are you using SUM or CELL SUM? That would be the first thing that I would look at. Certainly Discoverer is tricky about this kind of stuff. I have worked on true data warehouse software where you could define the total cell for column D to be the SUM(Column A) / SUM(Column B). Unfortunately Discoverer is not so straightforward as that.
    John Dickey

  • Function stats_mode on discoverer

    Good morning,
    Im using Oracle Discoverer 10.1.2.1, and I need use the group functions median and stats_mode available on Oracle Database 10g release 2.
    These 2 functions are not defined in Discoverer group functions.
    To use median function, I founded the solution with PERCENTILE_CONT(0.5)WITHIN GROUP(ORDER BY Age).
    Im trying to find a solution to use the a function with same result than stats_mode.
    I tried one solution creating a group function but Discoverer didnt treats it as group function.
    Is there some idea to do this?
    Thanks
    Emerson

    Hi Emerson
    If you can locate the package, presumably owned by SYS, that has thats_mode in it then we can import it into Discoverer Administrator and make it available for the end users. I have to admit that I took a littke look for it recently and could not find the package. Do you have a DBA nearby who can advise or if anyone reading this can tell us where it is I would be very grateful.
    Best wishes
    Michael

  • External Tables using Discoverer

    I am mapping the contents of a complex query to an external table. I am mapping the SUM() of each field to the external table. BUT... when I create a workbook using that complex folder, Discoverer correctly uses the external table but when I look at the actual query that is generated it performs a 'GROUP BY' on the the summary table (i.e my external table) prior to doing the query that I originally wanted.
    This is different than if Discoverer was managing the summary table. A very simple example is:
    External Table Query
    SELECT
    SUM(alias_avar)
    FROM
    (select id, SUM(avar) alias_avar
    FROM
    summarytable
    group by id)
    Discoverer Managed
    Select SUM(avar) from summarytable
    Thank you in advance for helping me with any ideas or workarounds.
    Mike

    Just a word...I have had NO LUCK with Oracle9i external tables accessing network drive with Windows Server 2003 spk1.
    I have read all the tips from Metalink and forums and nothing that works on Windows 2000 or NT work for 2003..Has anyone had any luck with this?
    UNC or mapped letters..The best I could do was GIVE EVERYPERMISSION and create a SUPER users with ALL groups and still then all external tables could do was move it to the error folder with a OS errors saying it could not open the file. I have the same setup locally and it opens fine.
    In fact UNC was the only way I could even touch the files..mapped drive letter did nothing ...

  • User Aggregated Function in Discoverer

    Hi.
    I'm trying to use an "User Aggregated Function" in Discoverer. This function concatenates a varchar field, and I want to use as a max(), min() or count() functions, but Discoverer always write this function in the group block of the query, and the databse generates an error.
    This is the user agrgegated function:
    CREATE OR REPLACE function DDS_UXXIINV.var_agg (input varchar2) return varchar2
    parallel_enable aggregate using agg_t;
    The package agg_t is defined as:
    create or replace type agg_t as object (
    str_agg varchar2(4000),
    static function ODCIAggregateInitialize(sctx in out agg_t)
    return number,
    member function ODCIAggregateIterate (self in out agg_t,
    value in varchar2 )
    return number,
    member function ODCIAggregateTerminate (self in agg_t ,
    return_value out varchar2,
    flags in number )
    return number,
    member function ODCIAggregateMerge(self in out agg_t,
    ctx2 in agg_t )
    return number
    create or replace type body agg_t is
    static function ODCIAggregateInitialize(sctx in out agg_t)
    return number is
    begin
    sctx := agg_t(null);
    return ODCIConst.Success;
    end;
    member function ODCIAggregateIterate(
    self in out agg_t, value in varchar2)
    return number is
    begin
    str_agg := str_agg || value;
    return ODCIConst.Success;
    end;
    member function ODCIAggregateTerminate(self in agg_t,
    return_value out varchar2, flags in number) return number is
    begin
    return_value := str_agg;
    return ODCIConst.Success;
    end;
    member function ODCIAggregateMerge(self in out agg_t,
    ctx2 in agg_t) return number is
    begin
    str_agg := str_agg || ctx2.str_agg;
    return ODCIConst.Success;
    end;
    end;
    When I use this functions (as a calculated field) Discoverer generates this statment:
    select var_agg(field1), field2 form table group by var_agg(field1), field2;
    I want this statement:
    select var_agg(field1), field2 form table group by field2;
    Sometimes Oracle generates a error messages saying that there's a wrong combinations of joins (translated from spainsh)
    Regards
    Óscar Blanco

    Hi,
    Unfortunately, you cannot import user defined group functions into Discoverer, Discoverer does not understand them.
    Rod West

  • Discoverer Custom SQL Report with Group By,Having

    Hi all,
    I'm working with Discoverer 4.1.41.05 and retrieve data from Oracle HRMS.
    I want to create a report based on a custom SQL Folder in Discoverer Administration to solve the following scenario:
    SELECT EMPLOYEE_NUMBER FROM PER_ALL_PEOPLE_F
    MINUS
    SELECT EMPLOYEE_NUMBER FROM PER_ALL_PEOPLE_F,PER_EVENTS, PER_BOOKINGS
    GROUP BY EMPLOYEE_NUMBER
    HAVING SUM(PER_EVENTS.ATTRIBUTE1) >= 10)
    The problem is when I run the sql from SQL*Plus is working fine producing the correct result.
    When I create the Custom Folder and create a Discoverer report based on it I retrieve all employees since the second select statement retrieve no rows!
    Does anyone has any idea how I can solve this problem or if there is another way to create this scenario?
    Any feedback is much appreciated.
    Thanking you in advance.
    Elena

    Hi Elena,
    I think you are missing some joins, you could try something like:
    SELECT EMPLOYEE_NUMBER FROM PER_ALL_PEOPLE_F p
    WHERE NOT EXISTS
    (SELECT NULL
    FROM PER_EVENTS e, PER_BOOKINGS b
    WHERE b.person_id = p.person_id
    AND e.event_id = b.event_id
    GROUP BY b.person_id
    HAVING SUM(e.ATTRIBUTE1) >= 10)
    Rod West

  • How to do Grouping of Workbooks using XSL in Discoverer Viewer?

    Hello Discoverer Experts,
    My question is related to grouping of workbook names using XSL in Discoverer Viewer. This is a sample xml data file which contains 6 workbooks.
    <eul>
         <workbooks>
              <workbook>
                   <wb_name>Purchasing Workbook 1</wb_name>
                   <worksheets>
                        <worksheet>
                             <ws_name>A</ws_name>
                        </worksheet>
                        <worksheet>
                             <ws_name>B</ws_name>
                        </worksheet>
                   </worksheets>
              </workbook>
              <workbook>
                   <wb_name>Purchasing Workbook 2</wb_name>
                   <worksheets>
                        <worksheet>
                             <ws_name>C</ws_name>
                        </worksheet>
                        <worksheet>
                             <ws_name>D</ws_name>
                        </worksheet>
                   </worksheets>
              </workbook>
              <workbook>
                   <wb_name>Manufacturing Workbook 1</wb_name>
                   <worksheets>
                        <worksheet>
                             <ws_name>E</ws_name>
                        </worksheet>
                        <worksheet>
                             <ws_name>F</ws_name>
                        </worksheet>
                   </worksheets>
              </workbook>
              <workbook>
                   <wb_name>Manufacturing Workbook 2</wb_name>
                   <worksheets>
                        <worksheet>
                             <ws_name>G</ws_name>
                        </worksheet>
                        <worksheet>
                             <ws_name>H</ws_name>
                        </worksheet>
                   </worksheets>
              </workbook>
              <workbook>
                   <wb_name>CEO Workbook 1</wb_name>
                   <worksheets>
                        <worksheet>
                             <ws_name>I</ws_name>
                        </worksheet>
                        <worksheet>
                             <ws_name>J</ws_name>
                        </worksheet>
                   </worksheets>
              </workbook>
              <workbook>
                   <wb_name>CEO Workbook 2</wb_name>
                   <worksheets>
                        <worksheet>
                             <ws_name>K</ws_name>
                        </worksheet>
                        <worksheet>
                             <ws_name>L</ws_name>
                        </worksheet>
                   </worksheets>
              </workbook>
         </workbooks>
    </eul>
    The XSL is generating a List of Workbooks in <table> by using <xsl:for-each select="eul/workbooks/workbook">
    <table>
    <tr><td>Purchasing Workbook 1</td></tr>
    <tr><td>Purchasing Workbook 2</td></tr>
    <tr><td>Manufacturing Workbook 1</td></tr>
    <tr><td>Manufacturing Workbook 2</td></tr>
    <tr><td>CEO Workbook 1</td></tr>
    <tr><td>CEO Workbook 2</td></tr>
    </table>
    Now my question is:
    1. The client want to see this report in Groups i.e
    <table>
    <tr><th>Group Name: Purchasing</th></tr>
    <tr><td>Purchasing Workbook 1</td></tr>
    <tr><td>Purchasing Workbook 2</td></tr>
    </table>
    <table>
    <tr><th>Group Name: Manufacturing</th></tr>
    <tr><td>Manufacturing Workbook 1</td></tr>
    <tr><td>Manufacturing Workbook 2</td></tr>
    </table>
    <table>
    <tr><th>Group Name: CEO</th></tr>
    <tr><td>CEO Workbook 1</td></tr>
    <tr><td>CEO Workbook 2</td></tr>
    </table>
    How can I achieve this grouping using XSL ? Has anybody tried customizing the XSL file to achieve grouping of workbooks by name?
    Any help is highly appreciated.
    Thanks in advance.
    Warm Regards,
    Pranav Desai

    Hi Friends..
    This is not the reply.
    I have also some question..
    Some related topic I found on this.
    That's why I am posting the same question here also..
    Dear friends..
    I need help to customize our discoverer viewer.
    We are creating work sheets in arial font size 8.
    But, when it's viewing through discoverer viewer it's coming big size.
    If we saw the source code by right click, it's taking some style sheets where
    the font size is mentioned as 8. not 8px.
    How I can modify the work sheets in viewer.
    Exactly which tag I should modify for this.
    And the other thing is the heading section is coming something as
    jung.
    Like this...
    &nb12.09.52 PM 27-OCT-02; 27-OCT-02 &n12.09.52 PM12.09.52 PM
    From: 01-JAN-2002 To: 30-DEC-2002o Page :1 / 1
    How we will correct this ?
    Please reply me as the earliest.
    With Thanks & Regards,
    Sheeja
    [email protected]

  • Is it possible to achieve Group By....Having functionality in Discoverer?

    Hello All,
    I need to print amount due for each customer when it is negative (less than zero). i.e. sum of all transactions against the customer should be less than zero. This is simple through sql if we write "select sum(amount) group by customer having sum(amount) < 0".
    But I need to do this in discoverer. Now the issue is I need to pass two parameters at runtime. First one will be Date (<= as_of_date) and another one will be having multiple values (in clause).
    If I base my report on underlying report view which uses 'group by... having' sql as described above, I will have to use parameter sheet and use syscontext to pass parameters.
    Instead, it will be easier if i pull in all the data in discoverer report and then use parameters to filter it out. But then is there any way to group on customer and having clause to print only those customers where sum(amount) < 0?
    Anish

    Hi Russ,
    I am new to discoverer so pardon me if I am not able to get you quickly.
    I am sorry, but I did not get you when you say calc1 = SUM( CASE WHEN amount <0 then amount ELSE 0 END).
    May be I was not able to describe you problem. Below is the SQL statement that will give me desired results. I want to achieve same results in Discoverer by getting rid of outer select query with grouping. I will be passing org_id and GL date as parameters.
    select customer_number, name, sum(amount_due) Amount_Due, org_id, Business_Segment
    from
    SELECT hca.account_number customer_number, hp.party_name NAME,
    aps.trx_number, aps.gl_date,
    aps.amount_due_remaining amount_due, aps.class, aps.org_id org_id
    ,hca.attribute3
    FROM apps.ar_payment_schedules_all aps,
    apps.hz_cust_accounts hca,
    apps.hz_parties hp
    WHERE aps.org_id IN (570, 573)
    AND aps.gl_date <= '30-NOV-2008'
    AND aps.class in ('CM','INV','DM')
    AND aps.customer_id = hca.cust_account_id
    AND hca.party_id = hp.party_id
    group by customer_number, name,org_id, Business_Segment
    having sum(amount_due) < 0
    order by 1
    Hope I am able to explain you now.
    Thanks,
    Anish

  • DISCOVERER: grouping different set of data according to hierarchy level

    Hi,
    This is my problem:
    I have a classic hierarchy like the following:
    Region->City->Department->Store name
    In my fact table are stored some measures about product.
    Each product belong to a category (the category is another dimension in the fact table).
    I have to group togheter different set of category dynamically according to the level of hierarchy where user is during drilling operation.
    An example:
    where i am at Region level i have to group the category product 100 and 200
    if i drill down to the City level i have to group the categoty product 300 and 400.
    How can i do this at runtime (ie: during the navigation of the report)
    Thanks in advance,
    The discoverer version is 10.1.2
    P.S.sorry for my bad english

    Hi
    As mentioned above u can create an MP on top of the cubes. But in Report u will have to use only those characteristics which are common between the two cubes or the records will come in 2 rows. Say in ur case u cant use Item No and Doc No. But if u dont have any complex calculations u can use 'Constant selection' to get the records in the same row.
    Regards,
    Aparna

  • Discoverer Summary Adviser and GROUP BY / ROLLUP

    Can anyone answer the following for me?
    1. Does the Discoverer Summary Adviser ever create materialized views using the new ROLLUP function, to create summaries that calculate all the subtotals along all hierarchies and dimensions?
    2. If the Discoverer Summary Adviser cannot create them using GROUP BY and ROLLUP, but I generated them manually or using OEM, would the Discoverer queries ever be eligable for query rewrite, as I presume the SQL generated by Discoverer doesn't use the GROUP BY / ROLLUP feature found in Oracle 9i?
    Any advice gratefully received.
    Mark

    Can anyone answer the following for me?
    1. Does the Discoverer Summary Adviser ever create materialized views using the new ROLLUP function, to create summaries that calculate all the subtotals along all hierarchies and dimensions?
    2. If the Discoverer Summary Adviser cannot create them using GROUP BY and ROLLUP, but I generated them manually or using OEM, would the Discoverer queries ever be eligable for query rewrite, as I presume the SQL generated by Discoverer doesn't use the GROUP BY / ROLLUP feature found in Oracle 9i?
    Any advice gratefully received.
    Mark

  • Discoverer to BiPublisher, how do I get the ' All ' grouping

    I have a discoverer report that is running through BiPublisher for formatting and distribution. It is broken up by Branch via a Page item in discoverer. I would like to show the '<All>' option in BiPublisher.
    Does anybody know how to do this?
    Here is my current grouping in Bipublisher:
    <?for-each-group:/DATA/Disco_-_Week/ROWSET/ROW;./Branch?>
    <?sort:current-group()/Branch;'ascending';data-type='text'?>
    Hopefully that is clear enough for someone to understand.... if you need more information please let me know.
    TIA
    Bryan

    Back from vacation. Can u explain how to move contacts from one addr book on phone to one , i.e "the cloud group". I have a mac I can sink with. But I did not set up a mac addr book or mac email. Essentially, I only want one all inclusive master addr book.When I open the contact icon on phone, I see a few groups; an icloud group, which has most of my contacts, an empty mac group which probably automatically set up when I sinked to new imac computer and another group with about 75 important contacts under my name as a group.
    Thanks,
    Brian, NY

  • Open Pages from Discoverer Report

    Hi,
    Is there a way to invoke a webpage or even better, an oracle function (that links to forms or self-service) from a discoverer report row ?
    for example, I want a report for employees where the person looking at the report will click on the employee name and is taken straight to the person details page for that employee.
    Regards.

    Hi,
    You can create a link to a form function using fnd_run_function.get_run_function_url. You can create a calculation either in a view or using a calculated item in the EUL (you will have to map the get_run_function_url in the EUL to do this). You then set the content type property of the EUL item to FILE so that when the item is selected in the workbook it appears as a hyperlink.
    Most forms in apps except parameters so that you can pass the employee id to the form and the form will open up with the employee record. For example, if you are using a seed HR person form you create a calculation,
    fnd_run_function.get_run_function_url(3494      -- PERWSHRG-404
                                         ,800       -- HR
                                         ,fnd_global.RESP_ID     -- caller's responsibility
                                         ,0        -- Business Group
                                         ,         -- Parameters
         'P_PERSON_ID='||TO_CHAR(person_id, 'fm9999999999999')||
         ' P_EFFECTIVE_DATE='||TO_CHAR(SYSDATE, 'YYYY/MM/DD'))Rod West

  • Discoverer Report parameter based on subquery

    Hi Guys,
    I have following query which i need to convert into discoverer report
    select hpah.EMPLOYEE_NUMBER,hpah.FIRST_NAME,hpah.LAST_NAME,hpah.PERSON_NAME,
    --hpah.JOB_NAME,hpah.ASSIGNMENT_ORGANIZATION_NAME,
    hpah.ASSIGNMENT_TYPE,hpah.USER_ASSIGNMENT_STATUS,
    SUBSTR(pj.name, 1, instr(pj.name, '.', 1, 2) -1) job_code,
    SUBSTR(pj.name, instr(pj.name, '.', 1, 2) + 1) job_title,
    (select haou.ATTRIBUTE1 from hr_all_organization_units haou
    where haou.ORGANIZATION_ID = hpah.ASSIGNMENT_ORGANIZATION_ID ) Function,
    (select haou.ATTRIBUTE2 from hr_all_organization_units haou
    where haou.ORGANIZATION_ID = hpah.ASSIGNMENT_ORGANIZATION_ID ) org_desc,
    SUBSTR(hpah.ASSIGNMENT_ORGANIZATION_NAME, 1, 6) dept_code,
    SUBSTR(hpah.ASSIGNMENT_ORGANIZATION_NAME, 7, LENGTH(hpah.ASSIGNMENT_ORGANIZATION_NAME)) dept_title,
    hpah.GRADE_NAME,hpah.LOCATION_NAME,hpah.SUPERVISOR_NAME,
    hpah.PERSON_START_DATE,hpah.ORIGINAL_DATE_OF_HIRE ,
    hpah.SALARY_BASIS,hpah.BUSINESS_GROUP_ID,hpah.ASSIGNMENT_ID,
    decode( hpah.SALARY_BASIS, 'ANNUAL', ppp.proposed_salary_n,
    'HOURLY', (ppp.proposed_salary_n *2080),
    ppp.proposed_salary_n
    ) salary,
    sysdate run_date
    from
    hrfg_person_assignment_history hpah ,
    per_pay_proposals ppp,
    per_pay_bases ppb,
    per_grades pg,
    per_jobs pj
    where hpah.ASSIGNMENT_ID = ppp.ASSIGNMENT_ID
    and hpah.SALARY_BASIS = ppb.PAY_BASIS
    and hpah.BUSINESS_GROUP_ID = ppb.BUSINESS_GROUP_ID
    and hpah.GRADE_ID = pg.GRADE_ID(+)
    and hpah.JOB_ID = pj.JOB_ID (+)
    --and   hpah.EMPLOYEE_NUMBER = 100779
    and hpah.PERSON_START_DATE IN
    (SELECT MAX(hpah2.PERSON_START_DATE)
    FROM hrfg_person_assignment_history hpah2
    WHERE hpah2.EMPLOYEE_NUMBER = hpah.EMPLOYEE_NUMBER
    AND hpah2.PERSON_START_DATE <= sysdate )
    order by hpah.EMPLOYEE_NUMBER
    i need to have sysdate as parameter in my report. I want data based on the date i provide.
    how can i make this as an parameter?

    Hi Prashant,
    Subqueries are not Supported in Conditions..As of Disco Plus Rel 10.1.2.54.25
    A plausible workaround can be:
    1. Create a View with foll. Query
    create or replace view TEST_VIEW as
    select hpah.EMPLOYEE_NUMBER emp_no,hpah.FIRST_NAME,hpah.LAST_NAME,hpah.PERSON_NAME,
    --hpah.JOB_NAME,hpah.ASSIGNMENT_ORGANIZATION_NAME,
    hpah.ASSIGNMENT_TYPE,hpah.USER_ASSIGNMENT_STATUS,
    SUBSTR(pj.name, 1, instr(pj.name, '.', 1, 2) -1) job_code,
    SUBSTR(pj.name, instr(pj.name, '.', 1, 2) + 1) job_title,
    (select haou.ATTRIBUTE1 from hr_all_organization_units haou
    where haou.ORGANIZATION_ID = hpah.ASSIGNMENT_ORGANIZATION_ID ) Function,
    (select haou.ATTRIBUTE2 from hr_all_organization_units haou
    where haou.ORGANIZATION_ID = hpah.ASSIGNMENT_ORGANIZATION_ID ) org_desc,
    SUBSTR(hpah.ASSIGNMENT_ORGANIZATION_NAME, 1, 6) dept_code,
    SUBSTR(hpah.ASSIGNMENT_ORGANIZATION_NAME, 7, LENGTH(hpah.ASSIGNMENT_ORGANIZATION_NAME)) dept_title,
    hpah.GRADE_NAME,hpah.LOCATION_NAME,hpah.SUPERVISOR_NAME,
    hpah.PERSON_START_DATE,hpah.ORIGINAL_DATE_OF_HIRE ,
    hpah.SALARY_BASIS,hpah.BUSINESS_GROUP_ID,hpah.ASSIGNMENT_ID,
    decode( hpah.SALARY_BASIS, 'ANNUAL', ppp.proposed_salary_n,
    'HOURLY', (ppp.proposed_salary_n *2080),
    ppp.proposed_salary_n
    ) salary,
    sysdate run_date
    from
    hrfg_person_assignment_history hpah ,
    per_pay_proposals ppp,
    per_pay_bases ppb,
    per_grades pg,
    per_jobs pj
    where hpah.ASSIGNMENT_ID = ppp.ASSIGNMENT_ID
    and hpah.SALARY_BASIS = ppb.PAY_BASIS
    and hpah.BUSINESS_GROUP_ID = ppb.BUSINESS_GROUP_ID
    and hpah.GRADE_ID = pg.GRADE_ID(+)
    and hpah.JOB_ID = pj.JOB_ID (+)
    --and hpah.EMPLOYEE_NUMBER = 100779
    order by hpah.EMPLOYEE_NUMBER
    2. Create another table say TEST_TAB
    create table TEST_TAB (emp_no, start_dt) as
    SELECT hpah2.EMPLOYEE_NUMBER , MAX(hpah2.PERSON_START_DATE) PERSON_START_DATE
    FROM hrfg_person_assignment_history hpah2
    GROUP BY hpah2.EMPLOYEE_NUMBER
    3. Add both of them in Disco Admin and create a join between TEST_VIEW.emp_no and TEST_TAB.emp_no
    4. Bring both these Objects in a new report in Disco Plus
    5. Create a New Parameter (Base it on PERSON_START_DATE Col of TEST_TAB)
    6. Choose Option Create Condition with operator <=
    7. Checkmark "Require User to Enter a Value
    8. Execute Report
    I believe this should work. Either ways let me know if it helps or u get another workaround. (This scenario looks quite interesting)
    Thanks,
    Chinmay

  • Discoverer Report  returning ' no data  found '

    Hi  ...
    i  have an issue with one discoverer  report  .
    Discoverer report  name : EDI Price Exception Report.
    when i ran the report  in Discoverer  Desktop edition  It is returning 'No Data Found ' But  i am taken the  Query from admin edition  and tried to  ran in  PL/SQL Developer/TOAD  by setting  Org_id condition
    it's returning Data  . the Desktop Edition of Discoverer for  some specific date  Range  it's giving Data  But  from last month on wards  it's not returning any Data.
    in Discoverer Report  Desktop  it's not retuning the Data from  November to till date
    Oracle  Applications  11i
    Discoverer 4i
    Oracle Data base :9i 
    OS : Windows.
    Attached the Sql  which i used to generate the Report :
    I HAVE USED THE FOLLOWING  :-for initialize the profile options
    EXEC FND_GLOBAL.APPS_INITIALIZE (0,52163,660);
    EXEC APPS.FND_CLIENT_INFO.SET_ORG_CONTEXT(2922);
      SELECT A.CUST_PO_NUMBER,
             A.ORDER_NUMBER,
             A.ORDERED_DATE,
             A.ORDER_TYPE,
             -- C.CUSTOMER_ID,
             C.CUSTOMER_NUMBER,
             C.CUSTOMER_NAME,
             B.LINE_NUMBER,
             B.ORDERED_ITEM,
             MSI.SEGMENT1 ACCO_ITEM,                               -- GRW 20060407
             MSI.DESCRIPTION,
             -- MSI.INVENTORY_ITEM_ID,
             (SELECT MCI.CUSTOMER_ITEM_NUMBER
                FROM MTL_CUSTOMER_ITEMS MCI,
                     MTL_CUSTOMER_ITEM_XREFS MCIX,
                     MTL_SYSTEM_ITEMS_B MSIB
               --  MTL_PARAMETERS          MP
               WHERE     MCI.CUSTOMER_ID = C.CUSTOMER_ID                 --1814924
                     AND MCI.CUSTOMER_ITEM_ID = MCIX.CUSTOMER_ITEM_ID
                     AND MCIX.INVENTORY_ITEM_ID = MSIB.INVENTORY_ITEM_ID
                     AND MSIB.INVENTORY_ITEM_ID = MSI.INVENTORY_ITEM_ID   --869899
                     AND MSIB.ORGANIZATION_ID = MTP.ORGANIZATION_ID --MP.ORGANIZATION_ID
                     AND MTP.ORGANIZATION_CODE = 'BRM'
                     AND MCI.CUSTOMER_ITEM_NUMBER = B.ORDERED_ITEM
                     AND NVL (mci.inactive_flag, 'N') <> 'Y'
                     AND NVL (mcix.inactive_flag, 'N') <> 'Y')
                CUSTOMER_ITEM,
                     XXAB_ITEM_XREFS.GET_GBC_ITEM_NUM (B.ORDERED_ITEM) GBC_ITEM_NUMBER,
             B.ORDERED_QUANTITY,
             B.PRICE_LIST,
             B.UNIT_SELLING_PRICE,
             B.UNIT_LIST_PRICE,
                   TO_NUMBER (B.ATTRIBUTE7) CUST_SENT_PRICE,
             apps.XXAB_CUST_SENT_PRICE_CONV_SO (C.customer_number,
                                                B.ordered_item,
                                                B.header_id,
                                                B.line_number,
                                                B.unit_selling_price,
                                                B.attribute7,
                                                B.pricing_quantity_uom,
                                                B.attribute4)
                CUST_SENT_PRICE_CONVERTED,
             ABS ( (B.UNIT_SELLING_PRICE
                    - apps.XXAB_CUST_SENT_PRICE_CONV_SO (C.customer_number,
                                                         B.ordered_item,
                                                         B.header_id,
                                                         B.line_number,
                                                         B.unit_selling_price,
                                                         B.attribute7,
                                                         B.pricing_quantity_uom,
                                                         B.attribute4)))
                DIFFERENCE,
                      MTP.ORGANIZATION_CODE,
             B.SHIP_TO_LOCATION
        FROM OE_ORDER_HEADERS_V A,
             OE_ORDER_LINES_V B,
             RA_CUSTOMERS C,
             MTL_PARAMETERS MTP,
             MTL_SYSTEM_ITEMS_B MSI
       WHERE     A.HEADER_ID = B.HEADER_ID
             AND A.SOLD_TO_ORG_ID = C.CUSTOMER_ID
             -- Added by Gati on 19-Oct-2012, tkt - INC000000118962
             AND ROUND (TO_NUMBER (apps.XXAB_CUST_SENT_PRICE_CONV_SO (
                                      C.customer_number,
                                      B.ordered_item,
                                      B.header_id,
                                      B.line_number,
                                      B.unit_selling_price,
                                      B.attribute7,
                                      B.pricing_quantity_uom,
                                      B.attribute4)),
                        2) <> B.UNIT_SELLING_PRICE
             --AND ROUND(TO_NUMBER(B.ATTRIBUTE7), 2) <> B.UNIT_SELLING_PRICE
             --AND     a.ship_from_org_id = mtp.organization_id
             AND B.SHIP_FROM_ORG_ID = MTP.ORGANIZATION_ID          -- GRW 20060413
             --AND     a.ship_from_org_id = msi.organization_id
             AND B.SHIP_FROM_ORG_ID = MSI.ORGANIZATION_ID          -- GRW 20060413
             AND B.INVENTORY_ITEM_ID = MSI.INVENTORY_ITEM_ID       -- GRW 20060407
             AND A.ORDER_SOURCE_ID = 6
             AND A.ORG_ID = B.ORG_ID
             AND TO_CHAR (A.ordered_date, 'DD-MON-YYYY') between  '01-NOV-2013' and  '03-NOV-2013'
             and mtP.organization_code='BRM'
                      AND A.ORG_ID = (SELECT HOU.ORGANIZATION_ID
                               FROM HR_OPERATING_UNITS HOU
                              WHERE HOU.NAME = '50 ACCO Canada')
             AND B.cancelled_flag <> 'Y'
             AND B.flow_status_code <> 'CANCELLED'
             AND B.ORDERED_ITEM <> 'INVALID_ITEM'
    ORDER BY a.order_number

    Hi,
    Assuming your initialization matches your discoverer login, it is pretty weird that you get no data.
    I am not sure how you got the SQL but i suggest you trace the session to get the exact SQL ran by the discoverer.
    You may find another condition or join that limits your data.
    Also another thing that you should try is to initial the session by using all the parameters (including the security group as you have in your discoverer login):
    begin
      fnd_global.APPS_INITIALIZE(user_id =>, resp_id =>, resp_appl_id =>, security_group_id =>);
    end

Maybe you are looking for

  • How do I "download" the Overdrive icon to my dock?

    I use the Overdrive app to borrow books from Maryland library systems.  How do I put the Overdrive icon on my dock at the bottom of my home screen?

  • Mac Mini refusing to support res greater than 1280x1024

    Hi, I'm trying to set up a Mac Mini for my family, and have been having trouble getting both XP (via bootcamp) and Leopard to support my 24" monitor's native widescreen resolution of 1920x1200. When I go to the Display setup menu the max res it lets

  • Mounting USB devices in arch guest

    I'm new to virtualbox, but not to linux.  I have been using arch for at least 3 years, so I have some familiarity with it.  I have recently installed arch as a guest OS on virtualbox (on OSX host).  I am having some trouble accessing an attached USB

  • Out-GridView Question

    Hello, I'm wondering if you can control the window size when using Out-GridView? For example: Get-Service | Out-GridView When this is run the window is showing more space than what I need; is it possible to have it shrink the window size to fit the r

  • Problem reading data from oracle database 11g using OleDbDataReader

    Hi everyone I work with Visual Studio 2010 and C# programming language. I have a problem reading data from the oracle database. I created a WPF application with my main Window Xaml and class files and 1 more class called DataFiles. The thing I want i