Best way to show a hierarchical tree report in APEX 4.2

I have a hierarchical query spanning four levels over two tables.  The query works great and also includes hierarchical sum columns (i.e. the parent shows the sum of all children) using functions.
I'm wondering what the best way to display this data to users is?
At the moment I'm thinking I would have a collection holding my report with an extra 'show' column.  Then I would include HTML to set the correct show/hide values and refresh the report when a node is clicked.  I feel this would probably work but it can't be the best way.
I stripped down my query to the columns needed (no sum columns) and the APEX tree regions work nicely for this.  Is there any alternative jquery plugin or anything that people have experience with that will give me the native 4.2 tree structure whilst also allowing me to display extra columns with links?
If I need to provide any more info just let me know!

The best you can do is to concatenate multiple columns into single with some separator. I have not tested give a try it might resolve your issue.
with data as (
select 'M'              as link_type,
      null            as parent,
      'All Categories' as id,
      'All Categories' as name,
      null            as sub_id
  from demo_product_info
union
select distinct('C')    as link_type,
      'All Categories' as parent,
      category        as id,
      category        as name,
      null            as sub_id
  from demo_product_info
union
select 'P'              as link_type,
      category parent,
      to_char(product_id) id,
      product_name    as name,
      product_id      as sub_id
  from demo_product_info
union
select 'O' as link_type,
      to_char(product_id) as parent,
      null                as id,
      (select c.cust_first_name || ' ' || c.cust_last_name
          from demo_customers c, demo_orders o
        where c.customer_id = o.customer_id
          and o.order_id    = oi.order_id ) || ', ordered'
      ||to_char(oi.quantity) as name,
      order_id as sub_id
  from demo_order_items oi
select case when connect_by_isleaf = 1 then 0
            when level = 1            then 1
            else                          -1
      end    as status,
      level,
      name ||'--->' || parent  as title, ---- This way you can concatenate multiple columns
      case when link_type = 'M' then '#IMAGE_PREFIX#Fndtre11.gif'
              when name = 'Mens' then '#IMAGE_PREFIX#wparea.gif'
              when name = 'Womens' then '#IMAGE_PREFIX#wtpaint.gif'
              when name = 'Accessories' then '#IMAGE_PREFIX#wpaste.gif'
              when link_type = 'P' then '#IMAGE_PREFIX#cartHL.gif'
              when link_type = 'O' then '#IMAGE_PREFIX#Fndtre13.gif'
      else null
      end    as icon,
      id    as value,
      'View' as tooltip,
      null  as link
from data
start with parent is null
connect by prior id = parent
order siblings by name
Br,
Zaif

Similar Messages

  • Best way to develop a BI Publisher Report

    Dear All,
    which is the best way to develop a XML/BI publisher report?
    1) Using a RDF for fetching data using data group
    2) Using a Data Template
    3) Writing PLSQL code
    4) Using BI Publisher Enterprise
    In R12 , all seeded reports are XML using PLSQL coding. Why oracle did not create RDF based XML reports? Are RDF s going to be obsolete??
    Please clear my confusion
    Thanks in Advance
    Raj

    Pl see your duplicate post here - Best way to develop a BI Publisher Report
    Srini

  • Best way to show the following data?

    Hi Experts,
    I am designing a validation solution in java webdynpro.
    I need to process 1000 records against certain logic and need to show the errors in the interface..Each record has more than 30 columns. I would like to get your suggestions on,
    1. How to display 1000 records with nearly 30 columns? A normal table with scrolling is enough or i need to split into 2 or 3 tabs based on some grouping and show these 1000 records?
    2. What would be the best way to show the error messages on these records?, Is it advisable to show the error messages on a tooltip? Is it possible to show a tooltip for each record in a table?
    Any suggestions would be really helpful for my work...
    Thanks in advance..
    Regards,
    Senthil
    Edited by: Senthilkumar.Paulchamy on Jun 23, 2011 9:18 PM

    Hi,
    Depending on your data would use a TableColumnGroup to group your 30 columns under a common header (displaying only the most significant data)
    Expanding the row would then show all 30 columns' data
    To display the errors, I would display the common header rows in bold red to make them stand out from the non-erroneous rows.
    Furthermore, I would add a toggle button, to alternate between 'all records' and 'erroneous records only'
    Best,
    Robin

  • What is the best way to update an ALV tree?

    Hello all of you
    What is the best way to update an ALV tree?
    In my case, by double clicking on a branch, a table is updated and an icon should be updated in the alv tree.
    I use the class CL_SALV_TREE
    Thanks for your help

    Call method REFRESH!

  • Best way to show Reports

    Hi All !
    I am new to this Java developer forum, and trying to find the Best way to Display Reports from the Data base as cristal Reports,
    Is any easy way to implement this in my Java Project?
    with Regards
    vinoth

    Hi,
    This forum is exclusively for questions related to Sun Java Studio Creator. Could you pls post your question in an appropriate forum.
    Thanks,
    RK.

  • Is it possible to create hierarchical tree report (not group tree) CR2008?

    Hi,
    Is it possible to create hierarchical tree kind report using CR 2008(no group tree in the report)?  The report somewhat look like below and a node can have multiple Child and so and so. Is there any magical way either as a chart or any object which supports the below structure.
                                                          Parent1
                                           Child1              Child2             Child3             Child4          Child5
                     Child1A     Child1B      Child1C
        Child1Aa  Child1Ab
    its hierarchical tree  structure and it should be in detail section of the report so that print in paper is possible.
    Please help first of all, can we able to create a report in above structure(each item needs to be surronuded with box and the each last child will contain a table valued data.
    (if I post this thread, it may look like plain text, please consider the above data as a hierarchical tree  structure with child having N number of children)
    Thanks

    Moved from .NET Development - Crystal Reports forum to Crystal Reports Design forum.
    Ludek

  • What is the best way to show/hide n number of columns ?

    Hi,
    I have a dynamic report that I have show/hide columns working using the below code. But when there are 500 or more rows it takes about a minute or more just waiting to see the columns toggle.
    What is the best way to do this?
    // Existing Javascript
    [script language="JavaScript" type="text/javascript"]
    var maxcnt= mymonths.length;
    function hideMaxEarn(){
    for(var j=0;j[maxcnt;j++){
    hideColumn('MON'+mymonths[j],'MAXCOL'+mymonths[j]);
    hideColumn('MON'+mymonths[j],'EARNCOL'+mymonths[j]);
    hideColumn('MON13','MAXCOL13');
    hideColumn('MON13','EARNCOL13');
    function showMaxEarn(){
    for(var j=0;j[maxcnt;j++){
    showColumn('MON'+mymonths[j],'MAXCOL'+mymonths[j]);
    showColumn('MON'+mymonths[j],'EARNCOL'+mymonths[j]);
    showColumn('MON13','MAXCOL13');
    showColumn('MON13','EARNCOL13');
    function getCellIndex(pRow,pCell){ 
    for(var i=0, n=pRow.cells.length;i[n;i++){ 
        if(pRow.cells[i] == pCell) return i;
    function hideColumn(pMon,pCol){
    var l_Cell = $x(pCol);
    var l_Table = html_CascadeUpTill(l_Cell,'TABLE');
    var l_Rows = l_Table.rows;
    l_CellI = getCellIndex(l_Cell.parentNode,l_Cell);
    for (var i=0, n=l_Rows.length;i[n;i++){
        if(i != 0) {
           html_HideElement(l_Rows[i].cells[l_CellI]);
    } else {
    $x(pMon).colSpan = $x(pMon).colSpan - 1;
    function showColumn(pMon,pCol){
    var l_Cell = $x(pCol);
    var l_Table = html_CascadeUpTill(l_Cell,'TABLE');
    var l_Rows = l_Table.rows;
    l_CellI = getCellIndex(l_Cell.parentNode,l_Cell);
    for (var i=0, n=l_Rows.length;i[n;i++){
        if(i != 0) {
           html_ShowElement(l_Rows[i].cells[l_CellI]);
    } else {
    $x(pMon).colSpan = 3;
    return;
    [script]

    Hi Andy,
    Yes, I replaced the code calling the same things in a loop to one loop getting the Table reference once and I build an array of column numbers at the time the report is built so I don't have to get the column number each time....
    it is a couple of seconds faster in about a 30 second response time. It will have to do it for now, no more time unless you see something in this new code...
    Thank you! Bill
    // dynamically built code
    col_nbr_array = new Array();
    col_nbr_array[0] = "1";
    col_nbr_array[1] = "2";
    col_nbr_array[2] = "4";
    col_nbr_array[3] = "5";
    col_nbr_array[4] = "7";
    col_nbr_array[5] = "8";
    col_nbr_array[6] = "10";
    col_nbr_array[7] = "11";
    col_nbr_array[8] = "13";
    col_nbr_array[9] = "14";
    col_nbr_array[10] = "16";
    col_nbr_array[11] = "17";
    col_nbr_array[12] = "19";
    col_nbr_array[13] = "20";
    col_nbr_array[14] = "22";
    col_nbr_array[15] = "23";
    col_nbr_array[16] = "25";
    col_nbr_array[17] = "26";
    col_nbr_array[18] = "28";
    col_nbr_array[19] = "29";
    col_nbr_array[20] = "31";
    col_nbr_array[21] = "32";
    col_nbr_array[22] = "34";
    col_nbr_array[23] = "35";
    col_nbr_array[24] = "37";
    col_nbr_array[25] = "38";
    col_nbr_array[26] = "40";
    col_nbr_array[27] = "41";
    // Static code
    function show_hide_column(do_show) {
    // Set Style, Show/Hide
    var stl;
    var csp;
    if (do_show){
    stl = 'block'
    csp = 3;
    }else{
    stl = 'none';     
    csp = 1;     
    // get rows object
    var l_Rows = document.getElementById('DT_RANGE').rows;
    var totCellNbr1=parseFloat(col_nbr_array[maxcnt-1])+2;
    var totCellNbr2=totCellNbr1 +1;
    var n=l_Rows.length;
    for (var i=0; i[n;i++){
        if(i != 0) { // if not the main header which spans 3 cols when expanded
          // Go through and show/hide each cell
          for(var j=0;j[maxcnt;j++){
              l_Rows[i].cells[col_nbr_array[j]].style.display = stl;
    // Totals
    l_Rows.cells[totCellNbr1].style.display=stl;
    l_Rows[i].cells[totCellNbr2].style.display=stl;
    } else { // row 1 that has Month spelled out - colspan of 3, others has max,earned and score columns for each month.
    var maxhdr = maxcnt/2;
    for(var k=1;k[=maxhdr;k=k+1){
    //alert('Header['+k+']');
    l_Rows[i].cells[k].colSpan=csp;
    // Total column
    //alert('TotHeader['+(maxhdr+1)+']');
    l_Rows[i].cells[maxhdr+1].colSpan=csp;
    [script]

  • What is the best way to explore a hierarchical folder structure?

    Hallo,
    I need to access and navigate a hierarchical folder structure hosted in a MS SQL Server database. In particular there is a root folder containing several folders. Each child-folder contains further nested folders or documents.
    For each item I need to retrieve the folder's (name, path, etc) and the documents (title, author, etc.) details that are retrievable from the DB fields. Afterwards I will use these data to create a semantic web ontology using Jena API.
    My question was about which is the best way to proceed.
    A collegue of mine suggested to use the "WITH" command of SQL Server to create and use a link list to navigate easily the structure, executing just one query rather than several (one for each level of the nested loops). However in this way the solution will work only with the SMQ Server database, while my goal is to achieve a more general solution.
    May someone help me?
    Thank you in advance,
    Francesco

    My goal is to create a documents library ontology achieving, from each element of the hierarchy (folder or document), some data (title, parent, etc.) and use them to "label" the ontology resources.
    I will use a little of both approches in the following way:
    1) I make just ONE query on folder table to get, from each folder, its path (eg. root/fold1/fold2/doc1.pdf), its ID and ParentID and ONE on the Documents table to get the containerID, title, etc.
    2) I create as many Folder objects as the retrieved records and an HashTable, where the KEY = Folder.ParentID value and the VALUE = Vector<Folder>. I add then each object to the Vector relative to the same ParentID. In this way I have an Vector containing all the folders child of the same parent folder and I do the same for an HashTable keeping the documents contained in a specific folder.
    3)I extract from the HashTable the root folder (whose ParentID is always "0" and whose ID is "1") than it is invoked the method appendChild() (see code)
         public static void appendChild(int ID, Resource RES)
              Vector<Folder> currFold = table.get(ID);
              for(int i=0; i<currFold.size(); i++)
                   //Extract the child and crate the relative resource
                   if(table.containsKey(currFold.getID()))
                        appendChild(currFold[i].getID(), Resource newRES);
    In this way I go in depth in the hirarchical structure using a "left most" procedure. I made a test and the output is correct. However, such an approch must be done for about 4 level depth folders (around 30 in total) containing also documents and creating the documents library of a Project. Then I must process around 20 project to achieve for all of them such a documents library representation.
    By the way, I do not have to mantein the HashTable content after I created the docs library ontology. Hence I use just one hashTable for ALL the projects and I flush it after I finish to do the loop for one project in order to save resources.
    My question is: is right my approach or might I improve it in some way?
    Thank you for every suggesion/comment.
    Francesco
    Edited by: paquito81 on May 27, 2008 8:15 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Best way to show movie release date by year under "Movies" section

    I am a proud owner of a new 2nd gen Apple TV. It does everything I hoped. I am using IDentity 2 to capture the movie Metadata and import into a new m4v file. All data is trnsferred into iTunes. The question: What is the best way to have the release year show in Apple TV? I currently have a description, actor, director, time, etc showing. The Metadata is taken from IMDB, so the release date is listed in the video description when I "get info" in iTunes. As you can imagine, I don't want to manually input the release year in every movie file name. Any suggestions?

    No asnswer. I can't find an answer on the web either. How many more years till Apple fixes this?

  • Best way to show a "kiosk type" video done with final cut pro. Any ideas?

    Hi,
    Was hoping to get some pro opinions (no pun intended) on the best way to send my edited final cut vid (png format for super clear text) to 32 inch monitors that will play them in the "store". We have 4 tvs, and they all need to show the video, and the sound (music) accompanying the video. The video is around 8 hours long (bunch of edited video clips to music) and will have to loop somehow. It's much too long for a dvd, as I want to keep the quality primo, so I was considering either a video ipod, or an actual computer. Just the ipod is so mall and frail (lol not really but around the people I work with it would be), and a computer might be overkill. Any ideas or opinions would be highly appreciated.
    Thanks.

    http://www.wdc.com/en/products/index.asp?cat=30
    http://store.apple.com/us/browse/home/shopipod/family/appletv

  • *** Best way to SHOW my HDV footage?

    I need to show my HDV footage the best way possible this weekend. Here's my current set-up and plan. Could anyone let me know if it's a good plan or if they have any suggestions to improve the quality. Ultimately I need to be able to show the best quality possible without incurring much expense beyond what I already have. My main question is whether I should play my project from the timeline in FCP (risky) or what the next best quaality output option would be. For example, would exporting it as a full-quality Quicktime Movie be the best option or burn an "HD-DVD" DVD and play it off my tower. Which would be the best option?
    Equipment:
    Powermac G5 DP 2.7 with 4 gb ram
    32" Philips LCD TV
    The Plan:
    To bring the G5 tower in and play the HDV footage directly to my LCD tv via DVI (out) and HDMI (in). Native resolution of my LCD TV is 1366x768 so it looks better than playing it on most plasmas.
    Thoughts? Suggestions?

    The sequence I just worked on was almost all slow motion, which seems to be rather difficult with HDV and the basic FCP Speed filter. I have been experimenting with lots of Quicktime Movie exports and Compressor settings to get a decent anamorphic SD DVD. Nothing comes anywhere near the Print To Tape of my HDV footage. I'm viewing everything on a Sony 32" HD Plasma. Which by the way is not Native 1080i, as many HD TV's are not. Just got Sony's new SXRD HD TV which is native 1080i, but haven't tested on that yet. (either SD DVD or HDV from camera)
    I don't know how long your sequence is, but dump it over and over to tape and run that. Assuming it's OK to rewind every 60 minutes.

  • Best way to show multiple copies of same data to different users

    Hi,
    I am new to configuring and using Oracle. I have an oracle db installed on a server machine and I loaded it with a set of data. I have multiple users who would all like to access the tables but they need to see unique copies of the data.
    What is my best approach? Should I create a new database instance? If so what is the best way to copy data to the new instance?
    Any help is greatly appreciated.

    Each developer should copy from the 'base' schema to his own the tables he requires to do his work. Give each developer select privileges on the 'base schema' tables so he cannot change them. This way, the developer can refresh his data as needed on his own. Public synonyms for the base schema tables will enable developers to only have to copy tables they wish to modify.
    Creating a separate fully loaded schema for each developer is going to create a never ending load of work for you as developers will be constantly asking you to refresh their schemas. Alternatively, you could create an export of production on a schedule and let the developers do the import to their schema when they wish.
    Basically, these folks are developers and, IMNSHO, should be managing their own development schemas.

  • Hierarchical tree Report

    Hello Experts,
    I am creating a Heirarchical tree Report using class CL_GUI_ALV_TREE.
    For getting the Heirarchical data of my requirement , I am using BAPI CL_GUI_ALV_TREE in which table E_WBS_HIERARCHIE_TABLE contain all of data.
    I am stcuk , how to write the logic to use this data to build a tree, ( Data format in the table is : WBS_Elemant , Project Defination, Up , Down , Left , right).
    Please suggest me the logic or any function module ( Or method) which uses this data to buld a tree. I am using ADD_NODE methos to add a node in the tree.
    Thanks & Regards
    Mohit

    Hi,
    What needs to be done is import the data into a local table and then use that one to display your alv tree.
    Try searching on sdn or google for similar code.
    Manish

  • Best way to show data of multiple lists - List Dashboard

    Hi,
    I am using SP 2013. I have around 10 custom lists, in which users add items. When a item is added a custom Visual studio approval workflow is triggerred.
    I am trying to create a visual webpart (VS 2012) , which will show the items that the logged-in user has created under each of the list. I want to show the data in a list-by-list manner (kind of a dashboard). Each of the list has different kind of columns.
    Which would be ideal way to achieve this? Should it be a dynamic table or a dynamic SPGridView or is there any other way to achieve this?
    There would be multiple entries the user would have added under each list. So a paging would help.
    Thanks

    Hi,
    According to your post, my understanding is that you wanted to display all the items that the logged-in users had created under each of the list in the site.
    I don’t think it’s a good idea to display all the items that the logged-in users had created under each of the list in the site in a visual web part.
    As we all known, different list has different fields, it will be different to display different list fields in a visual web part.
    If you still want to use the visual web part, I recommend you use the common fields that all the lists contained, suach as the Title, Createdy by, etc.
    Then query all the lists in the site by the created by field to compare with the current user.
    As a workaround, I recommend you use a page to display all the items that the logged-in users had created in the site.
    You can create a custom view based on current user for the lists, then add the lists web part in a page with the custom view.
    Now the page would only show the current users items.
    http://go.limeleap.com/community/bid/297846/Custom-List-View-Based-on-Current-User-Using-SharePoint-Designer
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/5e347dea-475e-4b95-8905-0f6e11bab7bf/sharepoint-list-filtering-by-current-user-or-group?forum=sharepointgeneralprevious
    What’s more, you can also use the target audience to achieve it.
    http://lixuan0125.wordpress.com/2012/06/18/audience-targeting-sharepoint-2010/
    Thanks,
    Jason
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Jason Guo
    TechNet Community Support

  • Best way to show webpages in AE

    Hi folks... this is my first post here.
    I am a recent convert to AE having spent most of the last 5yrs glued to Premier.
    I have been asked to create a sequence that shows a webpage on the right and a panel containng text on the left.
    I need to move around the webpage showing points of interest in time with a voiceover.
    I can do this in Premier quite easily but I think AE would make a better job of it.
    Question is can anyone suggest ways to improve the graphics, I'm currently just working with bitmap screen grabs but they are'nt great close up.
    or? is there a completely different/better way of doing this?
    thx

    Open the screen grabs in Photoshop and enlarge the with "Image Size..." Enable "Resample Image" and set it to "nearset Neighbor" and enlarge width and height with 500 per cent.
    Save as a new file and import into AE. You can now get close and keep the screens sharply pixelated.
    If you are outputting for broadcast, add the "Reduce Interlace Flicker" set to at least 1.0 on an Adjustment layer.
    - Jonas Hummelstrand
    http://generalspecialist.com/

Maybe you are looking for

  • When I open a message it shows nothing. Just a blank white screen.

    I've been using Thunderbird for a couple years, this started happening about 2 weeks ago. Inbox shows new/old messages and subjects just fine but if I click on a message it opens as a blank page in a new tab. The same happens in the sent folder and a

  • Sql Error in Select statement when doing subquery

    Hi, I am trying to see what the error is in the subquery part of the select statement. Subquery should be fetching the safety_stock_quantity based on the MAX(effectivity_date). Any suggestions? SELECT kbn.last_update_date,itm.segment1,itm.description

  • Using and emptying Trash...

    I have a few questions about Trash that I can't find answers for (I hope this is the right place for this post). I have many items in my Trash folder, and want to Securely Empty some, but not all of the files in Trash. Can I do this? Is there a way t

  • Copying file without passing bytes

    Hi, I need to be able to copy binary files from a web location to a directory on my local machine. The app needs to do nothing except copy the files. Is there a way of handling this outside the javaVM, ie set up a channel from the weblocation to the

  • Export excel setting Page header once per report not working

    Hi All,       I am having a java web application which creates the predefined template reports in pdf or xls or rpt format. I have a requirement where in case of XLS format, the page header should be displayed ONCE PER REPORT. I have Crystal Reports