Interactive report with the hierarchy

Hello

In Apex Oracle 5.1, I tried to use an interactive report to view details of employee based on a hierarchy. I used the query to display data below:

SELECT last_name, employe_id, manager_id, LEVEL

Employees

START WITH employee_id = 100

CONNECT BY PRIOR employee_id = manager_id

Brothers and SŒURS of ORDER BY last_name;

The output was as below:

LAST_NAME EMPLOYEE_ID MANAGER_ID LEVEL

------------------------- ----------- ---------- ----------

King                                100                                                       1

Cambrault                        148                                 100                 2

Bates                              172                                 148                 3

Bloom                             169                                  148                3

Fox                                 170                                  148                3

Kumar                             173                                  148                3

Ozer                                168                                  148               3

Smith                               171                                  148              3

De Haan                           102                                   100             2

Hunold                              103                                   102             3

Austin                               105                                   103             4

Ernst                                 104                                   103             4

Lorentz                              107                                   103             4

Pataballa                           106                                    103            4

Errazuriz                           147                                   100              2

Ande                                 166                                    147             3

Banda                               167                                     147             3

...

Now, I would like to display data based on the connection of employees.

For example (based on above request): If an employee named - Cambrault is the login, only employees under him (Bates, Bloom, Fox, Kumar, Smith, Ozer) and its own contact information should appear in the report.

Please advise.

Kind regards

mebu

Mebu wrote:

Please take a look on the underside of the employees table, employee_id here will be used as a unique identifier for each lines and names of the connection will be with these employe_id. single sign on Option will be used for login purposes.

Really?

SQL > SELECT last_name, employe_id, manager_id, LEVEL

2 FROM employees

3 START WITH employee_id = to_number(:app_user)

4 CONNECT BY PRIOR employee_id = manager_id

5 brothers and SŒURS of ORDER BY last_name;

LAST_NAME EMPLOYEE_ID MANAGER_ID LEVEL

------------------------- ----------- ---------- ----------

Cambrault 148 100 1

Bates 172 148 2

Flowers 2 148 169

Fox                              170        148          2

Kumar 173 148 2

Ozer                             168        148          2

Smith, 2 148 171

Tags: Database

Similar Questions

  • Interactive report with the subreport Details on the same page

    Hi all

    I am fairly new to APEX, sorry if my question is too obvious. I use Apex 4.0.2 on top of Oracle 11.2.

    I have an interactive report that lists the contents of a table. Since there are a lot of columns in this table I would like the report to only show that some identifier columns and all of the currently selected folder is displayed using another report in a separate area on the same page.

    The 'link' on the interactive report column is almost that, except that he jumps on another page; I would just like to have a subreport, updated with the data that is selected instead of a new page is displayed. Does anyone know how to do?

    Thanks for your help,
    Chris

    Chris,

    This looks like what I usually do in my referential data.

    I use the wizard to create the "report."

    I make sure that the two regions (the form and report) will be created on the same page number

    so I check/change the order of regions (second report in the first place, form)

    then I put in the form to display in the column 2

    Kind regards
    Richard

    P.S., the report shows only enough columns to recognize records. the screen displays all records

  • Is - this too ambitious? Tabular no-show with interactive report in the subregion, showing the latest entries.

    Is this too much to expect in Apex 5.01?

    I have an application which records people entering an area.

    The idea is to scan badges and save time and the date of that entry.

    This is accomplished with a simple form based on the table of the newspaper.

    In a subregion of the form, I would have an interactive report that shows to all those who have entered sort by date and time entry descendant who visited today is obvious.

    I join the attendant to be able to use the interactive report to be able to select a particular line that could be recovered and placed in the main form to change (a bit like the model of interactive report with a link to a form where updates can be made.)

    I can create the report form and the subregion and that seems to work very well for journal entries, but I don't have a clue as to how I would go on the use of the report for access to update data in the form section.

    I would be eternally grateful if someone could point me in the right direction!

    Is this something that is hard to do in Apex?

    Thank you!

    Mason

    Masong says:

    Is this too much to expect in Apex 5.01?

    I have an application which records people entering an area.

    The idea is to scan badges and save time and the date of that entry.

    This is accomplished with a simple form based on the table of the newspaper.

    In a subregion of the form, I would have an interactive report that shows to all those who have entered sort by date and time entry descendant who visited today is obvious.

    I join the attendant to be able to use the interactive report to be able to select a particular line that could be recovered and placed in the main form to change (a bit like the model of interactive report with a link to a form where updates can be made.)

    I can create the report form and the subregion and that seems to work very well for journal entries, but I don't have a clue as to how I would go on the use of the report for access to update data in the form section.

    I would be eternally grateful if someone could point me in the right direction!

    Is this something that is hard to do in Apex?

    Not at all. Try to use the wizard to create a Page to create a form on a Table with report based on the table of the newspaper (choose Normal for page mode and Interactive for the implementation of the report). When finished, separate report and pages of form will have been generated. Go to the report page and copy the region interactive report on the page of the form. The report page can then be deleted if it is not required.

  • What is the best way to view an interactive report with 20 columns

    Hello

    I have an interactive report, given the number of columns (about 20).
    What is the best way to view this report... by default to scroll horizontally to see all the columns.
    I want to avoid horizontal scrolling.

    Thank you
    Deepak

    Hello Deepak,

    You mean apart using a smaller font size or a larger screen?
    You can think to combine / wrapping columns (so more data in a column).
    Or hide some less important data and show only on request.

    Greetings,
    Roel
    http://roelhartman.blogspot.com/
    You can reward this response in marking it as useful or Correct ;-)

  • Mix of traditional and interactive reports fails the process of RESETTING of PAGINATION.

    I have a tab page where I got 3 different reports REPORT_A (classic), REPORT_B (interactive) and REPORT_C (CLASSIC) in alphabetical order. I have a page to reset pagination process that will always draw (without condition) when you visit the page with the tab.


    Reset pagination process that exists in the front scene of the header is set to fire but not to reset the interactive report. It affects the subsequent classic report REPORT_C as well. The REPORT_A would be reset paging very well since it exists before the interactive report. Is this a bug in apex?

    I created an application of demonstration of test with specific steps to reproduce the problem. The steps are on the demo site itself.

    http://Apex.Oracle.com/pls/Apex/f?p=56638
    SUP: testuser
    P: password

    Apex Version: 4.2.4.00.08

    In my real application I wish a dropdownlist control on the page based on which I would like to filter the data. The dropdownlist control will have a corresponding branch of after-submit who will absolutely perfect pagination to reset & RIR. But when we visit Web site by tab the above problem would break the page.

    I tried the solutions like gReport.search ('SEARCH') but that will only set the interactive report, not the classic REPORT_C. It's just a hack anyway.

    Any ideas. ?

    Hello

    Create before that the process header on page 12 that calls APEX_UTIL. IR_RESET

    Kind regards
    Jari

  • Interactive report with Null columns

    I have a user who wants to export an interactive report, and there need to some columns will appear on export so that he can fill the data later (there is an intermediate step, while we work on getting all the data they need in the database). I created the report query, and there are a handful of columns null or empty (to keep the correct order for export). When I try to add this query to the APEX, in an interactive report, I get an "ORA-00001: unique constraint (APEX_040000.WWV_FLOW_WORKSHEET_COLUMNS_UK2) violated" error.

    Googling autour shows me that this happens because of the columns the same name, and the solution is to provide aliases for all columns. My report has alias on all columns, but I can't yet create an interactive report. I tried to change the columns null of empty strings, as well as encompassing the alias in double - quotes, but nothing works. However, I can use my original query to create a standard report, but due to export, this is not ideal.

    I was able to create the interactive report with a null and then edited the source column of the report to add to the others. This had to be done one at a time, given that you are trying to add several null columns at the same time gives the same error even once. Unfortunately, when I try and you run the page, I get a ' ORA-20001: get_dbms_sql_cursor error ORA-00918: column ambiguously defined "error.

    My original query:
    select customer.customer_name as customer,
           project.name as project_name,        
           trunc(project.estimated_end_dt) as due_date, 
           project_status.project_status_desc as status, 
           null as revenue, 
           project.baseline_effort as baseline_hours,
           null as projected_cost,
           null as est_gain_loss, 
           project.actual_hours as actual_hours,
           project.estimated_hours as projected_hours,
           null as projected_cost, 
           null as projected_gain_loss, 
           null as roi       
        from project, 
             customer
      where customer.customer_id = project.customer_id
      and project.inactive_ind = 0
      and project.customer_id is not null
      and project.estimated_end_dt >= :DTP_P50_STARTDT
      and project.estimated_end_dt <= :DTP_P50_ENDDT
    order by customer.customer_name, 
             project.estimated_end_dt;             
    Can someone tell me a way to create an interactive report with multiple null columns?

    Hi shimmoril,

    The problem is probably that you have two columns aliased as 'projected_cost' (columns 7 and 11).

    Hope this helps,
    John

    If you find this information useful, please indicate the 'useful' or 'correct' post so that others benefit. *

  • Bug? Interactive report includes the column excluded research

    Apex 3.1

    I've created an interactive report with a query that includes a 'expensive' column (a function call). To improve performance, I want to exclude this search/filter column.

    I unchecked everything under "allow users to"... (filter) on the column attributes page. The column is no longer in the drop-down list under the microscope in the interactive report, but the column ("element_groups" in my example below) is always included in the SQL that is generated when the user makes a search via the "All columns" option (default):
    select 
           "CMPCODE",
           "CODE",
           "NAME",
           "SNAME",
           "ACCOUNTTYPE",
           "ELEMENT_GROUPS",
           count(*) over () as apxws_row_cnt
     from (
    select  *  from (
    select ae.cmpcode, ae.code, ae.name, ae.sname, ae.accounttype,
      string_util_pkg.join_str (cursor(select distinct grpcode from accounting_element_group where cmpcode = ae.cmpcode and code = ae.code order by 1), ',') as element_groups
    from accounting_element ae
    where ae.elmlevel = :p852_elmlevel
    )  r
    where ((instr(upper("CMPCODE"),upper(:APXWS_SEARCH_STRING_1)) > 0
        or instr(upper("CODE"),upper(:APXWS_SEARCH_STRING_1)) > 0
        or instr(upper("NAME"),upper(:APXWS_SEARCH_STRING_1)) > 0
        or instr(upper("SNAME"),upper(:APXWS_SEARCH_STRING_1)) > 0
        or instr(upper("ACCOUNTTYPE"),upper(:APXWS_SEARCH_STRING_1)) > 0
        or instr(upper("ELEMENT_GROUPS"),upper(:APXWS_SEARCH_STRING_1)) > 0
    ))
    ) r where rownum <= to_number(:APXWS_MAX_ROW_CNT) 
     order by "CMPCODE","NAME","CODE"
    In my view, the column should be excluded from "All columns" research when the column was set to prevent the user from filtering on it.

    The same problem is reported here: interactive - report no research on all columns

    Is this a bug? Fixed some 3.2 Apex? Apex 4? No work around?

    -Morten

    http://ORA-00001.blogspot.com

    Hello

    Yes, it is a known problem.
    It seems that it is fixed on the Apex 4.0.2.00.06
    http://www.Oracle.com/technetwork/developer-tools/Apex/application-express/402-patch-189110.html#CHDIHDIB

    Kind regards
    Jari

  • How to display data in an interactive report on the form field?

    Hello

    I've created an interactive report with its form (goal to create and edit).
    Then, I created a new project with its early date and email id that is assigned to the project.
    When I clicked on the edit button, it opens the edit form and displays the same date, I entered but email id is not displayed.
    Instead, it shows the default value of the e-mail ID LOV, which is "- select Email ID -"
    How can I view the identification of email that I entered?

    Thank you
    Guy

    Hello Guy,.

    To discuss your design: why not store the PM_PERSON ID in the PROJECT table? Now, you store addresses several times (in PM_PERSON and in many PROJECT files), what happens if the email address change... (purely hypothetical, of course)...
    And create a foreign key between the PROJECTS and PM_PERSON also...

    Greetings,
    Roel
    http://roelhartman.blogspot.com/
    You can reward this response in marking it as useful or Correct ;-)

  • Add a folder of files with the hierarchy to the installer

    Hi all

    Have a folder of files that can be read by the app.  This folder has a hierarchy of other records and contains xml files.

    I just want to include this file and all files with the hierarchy with installer and add to the Application directory.

    I don't want to have to manually create this folder hierarchy in generator installation and add each xml file.

    Is it possible to simply add files with the hierarchy folder the installer?

    Thank you.

    You should be able to do this if you add the folder of your project as a folder automatic settlement. If you right click on my computer in the directory of your project and select Add > folder (automatic settlement) will include the folder and subfolders. Now when you go to build an installer and click on the Source Files tab you can add all of the folder and its subfolders. Note, you are not able to do it with normal files or instant capture. I hope this helps.

  • New reports with the Version 15.1

    With version 15.1, we have several new reports, including status report list grouping all individual status reports into a single report with the colors for the selected values of the keys.  It is an impressive report (as well as other added to 15.1).  Take the time to view the reports again.

    Where does he find one this version 15.1 report? I only find a project status report in global reports-> list of reports and there is no color as your example shows.

  • working with the hierarchy

    Hello

    I work with the hierarchy (using start with and plug by front) in order to built a 'tree' of jobs in the application.

    For each job, the hirarchy start with LEVEL 1 to the level "n".

    In the example below, I built the hirarchy for job number 34461, with 4 levels.

    Of curse, I have hundreds of jobs, but for simplicity I shows that the values of a job.

    I need your advice with the following problem:

    In the case wherever one of the lines return "bz" in mach_name column, I need to return ALL of the hirarchy work (in the example below - all 11 lines)

    where "bz" value didn't exists column mach_name - no lines related to the specific job should be returned.

    Please notify.

    < code >

    SQL > fixed line 300

    SQL > with all_data as (SELECT X.JOB_NAME, x.joid, LEVEL,

    x.box_joid,

    mach_name

    OF AEDBADMIN.ujo_job x, AEDBADMIN.ujo_job_tree j

    WHERE X.JOID = J.JOID

    START WITH J.PARENT_JOID = 34461

    CONNECT PRIOR X.JOID = J.PARENT_JOID)

    Select all_data.*

    of all_data;

    JOID'ART BOX_JOID LEVEL MACH_NAME JOB_NAME

    ------------------------------------ ---------- ---------- ---------- ----------

    Ys_Crm_Inv_Push_Load_Ctrl_tr_BOX 31596 1 34461

    Ys_Crm_Inv_Push_Load_Ctrl_tr 31605 2 31596

    Ys_Crm_Inv_BOX 31586 3 31605

    Ys_Crm_Inv 31587 4 31586 bz

    Auto Ys_Crm_Inv_OK 31588 4 31586

    E_Push_Trx_BOX 31594 3 31605

    E_Push_Trx 31595 4 31594 cr

    E_Push_Trx_OK 31597 4 31594 auto

    Ys_Crm_Load_Cntrl_tr_BOX 31599 3 31605

    Ys_Crm_Load_Cntrl_tr 31600 4 31599 bz

    Ys_Crm_Load_Cntrl_tr_OK 31602 4 31599 auto

    11 selected lines.

    < code >

    Thank you

    SELECT DISTINCT *.

    de)

    SELECT mytest.*

    , COUNTY (CASE

    WHEN mach_name = "bz".

    THEN 1

    END

    ) ON (SCORE OF CONNECT_BY_ROOT joid'art) AS good_cnt

    sys_connect_by_path(joid,'/')

    OF mytest

    START WITH lvl = 1

    CONNECT BY box_joid = PRIOR joid'art

    ) t

    ORDER BY road;

  • Does SOUL used in combination with the hierarchy of position for purchase requisitions

    Hello

    We use the hierarchy of position for purchase requisitions.

    Can we use management engine approval in combination with the hierarchy of existing post for purchase requisitions for workflow routing more flexible?

    Kind regards

    Natalia

    Hi Natalia,

    Using hierarchy Position in the SOUL is supported only in R12, please refer to the following document:

    Using SOUL, creating approval routing at a certain Position in the hierarchy of Position HR [ID 1501433.1]

    Hope this helps,

    Please, if this response has answered/solved your question/query, please mark it as correct or useful to facilitate the correct answers to the members of the community.

  • How to move the form of interactive report on the left side to the right?

    the Apex 4:
    I write application in Hebrew, so I need to put in the page template dir = "RTL".
    all report and button and point moving to the right, but
    the stay of interactive report on the left side of the page (instead of right).

    Does anyone have an idea how to change the location?

    Thank you
    Return on investment

    Hello

    For the research on the copy of the side section right hand following the report in your HTML page header is on.

    
    

    Graham

  • Report with the items on the page

    Hi all

    I use APEX 4.0.3 and I would create a report where I could have editable page elements it contains. My goal was to have for example a variable number with its features displayed in the report and the power column choose a second from a selection list to associate with the first.

    In summary, I need to have a selection list in the report, and I need to know how to access the value of this element in each of the train.

    Thank you
    Mike

    You will need to loop.

    Find out "paintings of SEO, SEO of the values in a sequence to process" sections in the following documents.
    This should give you a fair idea.

    http://download.Oracle.com/docs/CD/E10513_01/doc/apirefs.310/e12855/apex_app.htm

    For example, if you have a report with the following query

    SELECT APEX_ITEM. Text(1,column_name) FROM myTable;

    and if you have 10 rows in the table, then 10 items of text will appear on your page.
    Given that we gave the ID (p_idx) as a 1, we can refer these elements of text using G_F01 picture. (If its 2 then G_F02 etc. we can have up to 50 dynamic element on one page)

    G_F01. COUNTY gives us "number of items".
    G_F01 (i) gives us the value of i ^ e ^ text value of the element.

    It may be useful

    Kind regards
    Hari

  • Report with the query with union and parameters

    Hello

    We have an obligation to create a report with the request, which is the union and parameters.

    I intend to create a database for the report based on a query. But the problem here is that the way to pass parameters in the query.

    Request is something like that

    Select x.a, x.b, x.c
    x
    where x.year =: para1
    and x.status = 'A '.
    Union of all the
    Select x.a, x.b, x.c
    x
    where x.year =: para1 - 1
    and (x.status = 'c' and x.date =: para2 or x.status = 'I' and x.date < =: para2)

    Here x.year in the first select statement must be equal to: para1 and second select statement, it should be: para - 1.

    How this requirement can be achieved?

    Client don't want to separate worksheet, a parameter and another for the actual data that I tried with sys_context and it worked. But the client wants the result in a single sheet only... So I need to change their approach.

    Help, please.

    Thank you

    Hello
    Another option is to convert the request so that you will have the items from the selection
    for example on the query you provided that you can use:

    Select 'Curr' rec_type, x.a, x.b, x.c, x.year, x.date, x.status
    x
    where x.status = "A".
    Union of all the
    Select 'Prev' rec_type, x.a, x.b, x.c, x.year, x.date, x.status
    x
    where x.status in ('c', 'I')

    then, in the workbook, you will be able to create conditions such as:
    rec_type = 'Curr' and year =: para1

    rec_type = 'Prev' and year =: para1-1
    rec_type = 'Prev' and (status = 'c' and date =: para2 or status = 'I' and date)<=>

    Tamir

Maybe you are looking for

  • Loss of sound

    I just installed windows 7 on my compaq presario sr1819uk pc that had originally xp.when of windows that I start my pc from sleep mode, the audio does not work and I get the message that it is there no sound on my pc, similarly when I go into Device

  • Rage 128 ultra vga free download

    I deleted ultra rage of my programs on my windows 2000 computer. where can I go to get it back?

  • HP Officejet 7612 large format: HP7612 will not print after change of router

    I just changed my router a router Orange Virgin Wireless printing was good before but now do not print. The printer wireless network test results show all works well, but it will not be printed All advice welcome

  • Recovery of dv6 - 7043 missing software HP Pavilion cl

    I recently had my hard drive crash, so I just replaced. I used the 64 bit Windows 7 disc for my OS and loaded the missing drivers (thank you beautiful people) to make it functional. Miss me programs HP keys to everything IE: beats, fingerprint reader

  • Why my C4780 scanner started scanning colored on the top of each document long lines?

    I have cleaned the ink cartridges; installed new cartridges; realigned; restarted; Downloaded the new driver; driver and firmware update; Finally, ask for help.  When scanning (not not when printing) it scans documents, and when you view the scan on