Is matrix report possible in ABAP?

Hi all,
Is matrix reporting possible in ABAP?If yes,please provide me an example.
Regards,
Praveen

Hi Praveen,
   There is no possibility of matrix reporting in ABAP.
   But we have herarchial reporting in ALV's and can be done thru  the function module:
     REUSE_ALV_HIERARCHICAL_LIST_DISPLAY
Hope this helps you.
Regards,
Chandra Sekhar

Similar Messages

  • SSRS 2005 - Dynamically control the width of columns in Matrix report or Hide any column

    Hi All,
    I just want to hide some column without having white space in Matrix report in SSRS 2005. Although I am aware of that perhaps this feature is not available on SSRS 2005. So, I just want to know if we can handle the width of column dynamically(using expressions)
    in matrix report?
    Please help. Thanks in Advance.
    Regards
    Kumud

    Hi Kumud,
    Based on my test, SSRS is not support column dynamically width. It has property “CanGrow” of text box. If we configure the property to True, it will wraps to next line if needed. In SSRS 2008, we can hide some columns without white space. If possible, I
    recommend you update your SSRS 2005 to SSRS 2008.
    There is a similar issue, you can refer to it.
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/9e6043f1-c458-4540-be59-d37b02feab8a/dynamic-column-width-for-a-report?forum=sqlreportingservices
    Alternatively, I recommend you that submit a wish to the Microsoft Connect at
    https://connect.microsoft.com/SQLServer/Feedback. Your feedback is valuable for us to improve our products and increase the level of service provided.
    Regards,
    Alisa Tang
    Alisa Tang
    TechNet Community Support

  • Master/Master Matrix Report

    May I know is it possible to create a Master/Master matrix report? The example given in the Reports Documentation shows Master/Master Tabular reports only and I have been attempting to create a Matrix one but without success. Thank You.
    Cheers,
    Tan

    I have never come across a two query M:M matrix report. Just out of curiosity, what is your requirement that would make that necessary?
    Metalink provides a couple of different ways to do matrix reports (including the 1 query and 3 query methods) but I haven't seen anything to the effect of what you are describing.
    Regards,
    Steve

  • Convert the matrix report output to excel sheet

    Hi,
    I am using reports 6i and database Oracle Database 10g Enterprise Edition Release 10.2.0.1.0.
    I have to convert the output of matrix report into Excel sheet.
    Is it possible.
    Is there any other way to populate the matrix data to the excel sheet.
    Thanks and regards,
    Ansaf.

    You can generate excel file by setting SYSTEM PARAMETER values as below
    DESFORMAT - DELIMITED
    DESTYPE -FILE
    DESNAME -File Name.XLS
    Although this is not a pure Excel file (Its only a tab delimited file) but you can open this with MSExcel or Open office Calc.
    Regards
    Ahamed Rafeeque Cherkala.

  • Display null rows / columns in matrix report

    Hi,
    Is it possible to display any character ('0' for example) in a matrix report where the entire row or column show no value at all ?
    My matrix shows Row1 and Row2 with values but no Row3 at all like this:
    Column1 Column2 Column3
    Row1 value1 value2 value3
    Row2 value4 value5 value6
    But I would like it to show my rows 3 with '0's :
    Column1 Column2 Column3
    Row1 value1 value2 value3
    Row2 value4 value5 value6
    Row3 0 0 0
    Thank you,
    Denise

    Make your query return 0 with nvl(column, 0) and an outer join, plus some stuff to avoid a double outer join.
    E.g. a sales per product per city:
          City1   City2  City3
    Prod1   10     100    12
    Prod2   25     110   200
    Prod3    0       0     0Could be made like this:
    create table city (c_city  varchar2(10));
    create table prod (p_prod   varchar2(10));
    create table prod_sales (ps_city varchar2(10)
    , ps_prod varchar2(10)
    , ps_sales number);
    <.....insert some values, except voor Prod3 .....>
    SQL> select p_prod, c_city, nvl(ps_sales,0)
      2  from (select c_city, p_prod from city, prod)
      3  ,    prod_sales
      4  where ps_city(+) = c_city
      5  and   ps_prod(+) = p_prod
      6  order by 1,2 ;
    P_PROD     C_CITY     NVL(PS_SALES,0)
    Prod1      City1                   10
    Prod1      City2                  100
    Prod1      City3                   12
    Prod2      City1                   25
    Prod2      City2                  110
    Prod2      City3                  200
    Prod3      City1                    0
    Prod3      City2                    0
    Prod3      City3                    0

  • Matrix report in condensed mode in dot matrix printer

    How can we print a 10g matrix report in condensed mode in dot matrix printer? The dot matrix printer is a Epson LQ 1070+ printer. I am tried using a printer definition file and given printer codes in the report. The printing is not taking place in condensed mode. This method however is working for other reports. Could any one help?
    Regards,
    Jayram
    Edited by: jayramkumars on Feb 6, 2009 12:11 AM

    Hi all,
    This is to inform that I have myself found the solution. It is possible to print matrix report in condensed mode. The method for printing is same as for any other report. The mistake I made was not checking whether the .prt file is getting referred correctly. The DESFORMAT system parameter was getting populated through the calling form. By referring to the correct .prt file the problem got fixed.
    Regards,
    Jayram

  • How can i create a Matrix View or Matrix Report in JDeveloper

    Dear All
    I'm tring to creat an updatable view display (items , customer , quantity)
    The customer must be Distinct
    , And the view column are not fixed (Like the Matrix Reports)
    Example
    customers___________item01___________item02___________item03----------item_N
    dan_________________5_______________10_____________15 -----------
    sara________________12_______________7______________3 -----------
    How can i display that in ADF table ?
    It's Possible to make that view updateable
    Thanks
    Ahmed Galal

    May I suggest that you ask this question in the customer forums in the Business Center at [http://sme.sap.com|http://sme.sap.com]
    Best regards, Christian

  • Matrix Report Limitation

    I am working on a matrix report with 9i Report Builder.
    Normally, a matrix type report would have the layout similar to the following, with column headers (a-e) cross with x, y, z rows.
    \|a b c d e
    x|1 2 3 4 5
    y|6 7 8 9 10
    z|11 12 13 14 15
    Is it possible for me to break the column headers into 2 rows instead of one?
    i.e.the column header should displayed like this:
    a b c
    d e
    and the data row should be displayed like this for x, y, z row respectively:
    1 2 3
    4 5
    How should I do that?

    Hi,
    Just increase the matrix cell to accommodate the desired fields and give horizontal frame as fixed, in such cases
    the frame will automatically wrap.
    Regards
    Melvin.

  • Report Painter or ABAP Query

    Hi,
    I have to create one report with the use of three different Tables. is it possible to create in Report Painter or Report Writer or ABAP Query? or i need to customize that report with ABAPers?
    Can anybody please tell me for Report Painter and Report writer, can i use Two Tables?
    and in ABAP query how i can create the report?
    I'll really appreciate your help.
    Thanks,
    Niki Shah

    Hello Niki
    You create a query based on an info-set. Info sets are special views of a dataset so can be :
    - Table joins ( more than one table)
    - Single tables
    - Logical data bases (view of the database)
    You create a report painter from a library which is based only on  a single totals table.
    Regards
    Javier Reviriego

  • Add zeros to a matrix report

    I'm making a matrix report and the users want to have zeros show where is no data returned. Since there are no fields I can't set the null values to zero. I used the example in the building reports pdf but it covers up the fields that returns numbers. Then I noticed the example bascially just adds the zeros to the end since they are using currency. Is there a way to have a label moveforward only when you want it, or is there another way that I'm missing.

    OK – I can now see that I wasn’t clear enough in my first reply. I have modified your SQL statement (hopefully without syntax errors :-) The job was to get all possible/necessary combinations of EVENT and SEVERITY out of sub query SUBALLROWS (i.e. I only changed sub query SUBALLROWS):
    [All my indentions are gone when I Post the Message, so it looks horrible.]
    SELECT suballrows.event,
    suballrows.severity,
    DECODE(suballrows.severity,'R',1,'A',2,'G',3) AS SEVERITYSORT,
    nvl(count(subnew.severity),0) as SEVERITYTOTAL
    FROM (SELECT severity,
    event
    FROM vw_merger_drill_issue
    WHERE bau_merger = '1'
    AND trunc(current_date-submitdate)<7
    )subnew,
    (SELECT event, -- Cartesian product of event and severity
    severity
    FROM (SELECT DISTINCT event
    FROM vw_merger_drill_issue
    WHERE event IS NOT NULL
    ) subevent,
    (SELECT DISTINCT severity
    FROM vw_merger_drill_issue
    WHERE severity IS NOT NULL
    ) subseverity
    ) suballrows
    WHERE suballrows.event = subnew.event (+)
    AND suballrows.severity = subnew.severity (+)
    GROUP BY suballrows.event,
    suballrows.severity
    ORDER BY Suballrows.Event,
    severitysort;
    Because you more or less execute the same SELECT 3 times, you might get a performance gain by the use of the WITH clause.
    My previously used detail table SALES (the same as your vw_merger_drill_issue view) contains:
    SELECT *
    FROM sales;
    MO REGION AMOUNT
    01 EUROPE 100
    02 EUROPE 50
    02 AMERICA 200
    03 AMERICA 150
    The With clause SQL looks like (and returns every month and region):
    WITH
    subsales AS
    (SELECT month, region, sum( amount) amount
    FROM sales
    GROUP BY month, region
    SELECT suballrows.month,
    suballrows.region,
    nvl( subsales.amount, 0) amount
    FROM subsales,
    (SELECT month, region -- Cartesian product with all possible combinations.
    FROM (SELECT DISTINCT region
    FROM subsales
    ) subregion,
    (SELECT DISTINCT month
    FROM subsales
    ) submonth
    ) suballrows
    WHERE suballrows.month = subsales.month (+)
    AND suballrows.region = subsales.region (+)
    ORDER BY suballrows.month,
    suballrows.region;
    MO REGION AMOUNT
    01 AMERICA 0
    01 EUROPE 100
    02 AMERICA 200
    02 EUROPE 50
    03 AMERICA 150
    03 EUROPE 0
    What your SQL would look like ... something like below. You may decide if it looks OK:
    WITH
    sub_merger_drill_issue AS
    (SELECT event,
    severity,
    count(*) severity_subtotal
    FROM vw_merger_drill_issue
    WHERE bau_merger = '1'
    AND trunc(current_date-submitdate)<7
    AND event IS NOT NULL
    AND severity IS NOT NULL
    SELECT suballrows.event,
    suballrows.severity,
    DECODE(suballrows.severity,'R',1,'A',2,'G',3) AS SEVERITYSORT,
    nvl(SUM(subnew.severity),0) as SEVERITYTOTAL -- count changed to sum because of sub total count in sub_merger_drill_issue.
    FROM sub_merger_drill_issue subnew,
    (SELECT event, -- Cartesian product of event and severity
    severity
    FROM (SELECT DISTINCT event
    FROM sub_merger_drill_issue
    ) subevent,
    (SELECT DISTINCT severity
    FROM sub_merger_drill_issue
    ) subseverity
    ) suballrows
    WHERE suballrows.event = subnew.event (+)
    AND suballrows.severity = subnew.severity (+)
    GROUP BY suballrows.event,
    suballrows.severity
    ORDER BY Suballrows.Event,
    severitysort;

  • Page level totals in a matrix report

    hi all,
    Is it possible to have any kind of page level totals in a matrix report??
    i tried it manually, but it gave me an error as follows,
    REP-1266: Column '<column name>': Page Level columns are not allowed in a Cross Product.
    Thanks
    Martin

    Martin,
    Is one of your report Repeating frames set to break on pages? If so, then go to the data model and create the variables you need inside the group of the repeating frame. If you are doing a summary column, don't forget to set the repeat at: property correctly. Then just carefully add the fields to the layout. The matrix layout can be very difficult to work with so what I do is carefully expand out all the frames so they are not overlapping with the outermost frame being on the very outside. Use the Fill Color setting on the layout to paint the frames so you can see what is sitting on top of what. It may take a few shots to get it right.
    Have you worked with Oracle analytic functions? They can really make your life easy by doing all of the summing at various levels. Also look into GROUPING SETS they are the bomb! Check out the URL below for more info:
    http://orafaq.com/node/55
    Good luck,
    matt

  • ALV Tree Report without using ABAP Objects

    Hi all,
    I want to know the name of a function module to create ALV Tree in SE38 as a report. I am required to create this ALV Tree Report without using ABAP OBJECTS. Can u pls help me as early as possible.

    Hi
    see this link
    http://www.sapdev.co.uk/reporting/alv/alvtree.htm
    *& Report  ZBCALV_TREE
    REPORT  ZBCALV_TREE.
    class cl_gui_column_tree definition load.
    class cl_gui_cfw definition load.
    data tree1  type ref to cl_gui_alv_tree.
    data mr_toolbar type ref to cl_gui_toolbar.
    include <icon>.
    include bcalv_toolbar_event_receiver.
    include bcalv_tree_event_receiver.
    data: toolbar_event_receiver type ref to lcl_toolbar_event_receiver.
    data: gt_VBAK  type VBAK occurs 0,      "Output-Table
          gt_fieldcatalog type lvc_t_fcat, "Fieldcatalog
          ok_code like sy-ucomm.           "OK-Code
    start-of-selection.
    end-of-selection.
      call screen 100.
    *&      Module  STATUS_0100  OUTPUT
          text
    module STATUS_0100 output.
      SET PF-STATUS 'MAIN'.
    if tree1 is initial.
        perform Zinit_tree.
      endif.
      call method cl_gui_cfw=>flush.
    endmodule.                 " STATUS_0100  OUTPUT
    *&      Form  Zinit_tree
          text
    -->  p1        text
    <--  p2        text
    form Zinit_tree .
    perform Zbuild_fieldcatalog.
    create container for alv-tree
    data: l_tree_container_name(30) type c,
            l_custom_container type ref to cl_gui_custom_container.
      l_tree_container_name = 'TREE1'.
    if sy-batch is initial.
        create object l_custom_container
          exporting
                container_name = l_tree_container_name
          exceptions
                cntl_error                  = 1
                cntl_system_error           = 2
                create_error                = 3
                lifetime_error              = 4
                lifetime_dynpro_dynpro_link = 5.
        if sy-subrc <> 0.
          message x208(00) with 'ERROR'.                        "#EC NOTEXT
        endif.
      endif.
    create tree control
      create object tree1
        exporting
            parent              = l_custom_container
            node_selection_mode = cl_gui_column_tree=>node_sel_mode_single
            item_selection      = 'X'
            no_html_header      = ''
            no_toolbar          = ''
        exceptions
            cntl_error                   = 1
            cntl_system_error            = 2
            create_error                 = 3
            lifetime_error               = 4
            illegal_node_selection_mode  = 5
            failed                       = 6
            illegal_column_name          = 7.
      if sy-subrc <> 0.
        message x208(00) with 'ERROR'.                          "#EC NOTEXT
      endif.
    create Hierarchy-header
      data l_hierarchy_header type treev_hhdr.
      perform zbuild_hierarchy_header changing l_hierarchy_header.
    create info-table for html-header
      data: lt_list_commentary type slis_t_listheader,
            l_logo             type sdydo_value.
      perform Zbuild_comment using
                     lt_list_commentary
                     l_logo.
    repid for saving variants
      data: ls_variant type disvariant.
      ls_variant-report = sy-repid.
    create emty tree-control
      call method tree1->set_table_for_first_display
        exporting
          is_hierarchy_header = l_hierarchy_header
          it_list_commentary  = lt_list_commentary
          i_logo              = l_logo
          i_background_id     = 'ALV_BACKGROUND'
          i_save              = 'A'
          is_variant          = ls_variant
        changing
          it_outtab           = gt_VBAK "table must be emty !!
          it_fieldcatalog     = gt_fieldcatalog.
    create hierarchy
      perform Zcreate_hierarchy.
    add own functioncodes to the toolbar
      perform zchange_toolbar.
    register events
      perform zregister_events.
    endform.                    " Zinit_tree
    *&      Form  Zbuild_fieldcatalog
          text
    -->  p1        text
    <--  p2        text
    form Zbuild_fieldcatalog .
    get fieldcatalog
      call function 'LVC_FIELDCATALOG_MERGE'
        exporting
          i_structure_name = 'VBAK'
        changing
          ct_fieldcat      = gt_fieldcatalog.
      sort gt_fieldcatalog by scrtext_l.
    change fieldcatalog
      data: ls_fieldcatalog type lvc_s_fcat.
      loop at gt_fieldcatalog into ls_fieldcatalog.
        case ls_fieldcatalog-fieldname.
          when 'AUART' .
            ls_fieldcatalog-no_out = 'X'.
            ls_fieldcatalog-key    = ''.
        endcase.
        modify gt_fieldcatalog from ls_fieldcatalog.
      endloop.
    endform.                    " Zbuild_fieldcatalog
    *&      Form  zbuild_hierarchy_header
          text
         <--P_L_HIERARCHY_HEADER  text
    form zbuild_hierarchy_header changing
                                   p_hierarchy_header type treev_hhdr.
      p_hierarchy_header-heading = 'Hierarchy Header'.          "#EC NOTEXT
      p_hierarchy_header-tooltip =
                             'This is the Hierarchy Header !'.  "#EC NOTEXT
      p_hierarchy_header-width = 30.
      p_hierarchy_header-width_pix = ''.
    endform.                    " zbuild_hierarchy_header
    *&      Form  Zbuild_comment
          text
         -->P_LT_LIST_COMMENTARY  text
         -->P_L_LOGO  text
    form Zbuild_comment   using
                           pt_list_commentary type slis_t_listheader
                           p_logo             type sdydo_value.
    data: ls_line type slis_listheader.
    LIST HEADING LINE: TYPE H
      clear ls_line.
      ls_line-typ  = 'H'.
    LS_LINE-KEY:  NOT USED FOR THIS TYPE
      ls_line-info = 'ALV-tree-demo: flight-overview'.          "#EC NOTEXT
      append ls_line to pt_list_commentary.
    STATUS LINE: TYPE S
      clear ls_line.
      ls_line-typ  = 'S'.
      ls_line-key  = 'valid until'.                             "#EC NOTEXT
      ls_line-info = 'January 29 1999'.                         "#EC NOTEXT
      append ls_line to pt_list_commentary.
      ls_line-key  = 'time'.
      ls_line-info = '2.00 pm'.                                 "#EC NOTEXT
      append ls_line to pt_list_commentary.
    ACTION LINE: TYPE A
      clear ls_line.
      ls_line-typ  = 'A'.
    LS_LINE-KEY:  NOT USED FOR THIS TYPE
      ls_line-info = 'actual data'.                             "#EC NOTEXT
      append ls_line to pt_list_commentary.
      p_logo = 'ENJOYSAP_LOGO'.
    endform.                    " Zbuild_comment
    *&      Form  Zcreate_hierarchy
          text
    -->  p1        text
    <--  p2        text
    form Zcreate_hierarchy .
    data: ls_vbak type vbak,
          lt_vbak  type vbak occurs 0.
    get data
      select * from vbak into table lt_vbak
                            up to 200 rows .                "#EC CI_NOWHERE
      sort lt_vbak by AUART.
    add data to tree
      data: l_AUART_key type lvc_nkey.
    loop at lt_vbak into ls_vbak.
        on change of ls_vbak-AUART.
          perform Zadd_AUART_line using   ls_vbak
                                  changing l_AUART_key.
        endon.
      endloop.
    calculate totals
      call method tree1->update_calculations.
    this method must be called to send the data to the frontend
      call method tree1->frontend_update.
    endform.                    " Zcreate_hierarchy
    *&      Form  Zadd_AUART_line
          text
         -->P_LS_vbak  text
         -->P_0379   text
         <--P_L_AUART_KEY  text
    form Zadd_AUART_line  using    p_ls_vbak type vbak
                                   p_relat_key type lvc_nkey
                         changing  p_node_key type lvc_nkey.
      data: l_node_text type lvc_value,
            ls_vbak type vbak.
    set item-layout
      data: lt_item_layout type lvc_t_layi,
            ls_item_layout type lvc_s_layi.
      ls_item_layout-t_image = '@3P@'.
      ls_item_layout-fieldname = tree1->c_hierarchy_column_name.
      ls_item_layout-style   =
                            cl_gui_column_tree=>style_intensifd_critical.
      append ls_item_layout to lt_item_layout.
    add node
      l_node_text =  p_ls_vbak-AUART.
      data: ls_node type lvc_s_layn.
      ls_node-n_image   = space.
      ls_node-exp_image = space.
      call method tree1->add_node
        exporting
          i_relat_node_key = p_relat_key
          i_relationship   = cl_gui_column_tree=>relat_last_child
          i_node_text      = l_node_text
          is_outtab_line   = ls_vbak
          is_node_layout   = ls_node
          it_item_layout   = lt_item_layout
        importing
          e_new_node_key   = p_node_key .
    endform.                    " Zadd_AUART_line
    *&      Form  zchange_toolbar
          text
    -->  p1        text
    <--  p2        text
    form zchange_toolbar .
    get toolbar control
      call method tree1->get_toolbar_object
        importing
          er_toolbar = mr_toolbar.
      check not mr_toolbar is initial.
    add seperator to toolbar
      call method mr_toolbar->add_button
        exporting
          fcode     = ''
          icon      = ''
          butn_type = cntb_btype_sep
          text      = ''
          quickinfo = 'This is a Seperator'.                    "#EC NOTEXT
    add Standard Button to toolbar (for Delete Subtree)
      call method mr_toolbar->add_button
        exporting
          fcode     = 'DELETE'
          icon      = '@18@'
          butn_type = cntb_btype_button
          text      = ''
          quickinfo = 'Delete subtree'.                         "#EC NOTEXT
    add Dropdown Button to toolbar (for Insert Line)
      call method mr_toolbar->add_button
        exporting
          fcode     = 'INSERT_LC'
          icon      = '@17@'
          butn_type = cntb_btype_dropdown
          text      = ''
          quickinfo = 'Insert Line'.                            "#EC NOTEXT
    set event-handler for toolbar-control
      create object toolbar_event_receiver.
      set handler toolbar_event_receiver->on_function_selected
                                                          for mr_toolbar.
      set handler toolbar_event_receiver->on_toolbar_dropdown
                                                          for mr_toolbar.
    endform.                    " zchange_toolbar
    *&      Form  zregister_events
          text
    -->  p1        text
    <--  p2        text
    form zregister_events .
    define the events which will be passed to the backend
      data: lt_events type cntl_simple_events,
              l_event type cntl_simple_event.
    define the events which will be passed to the backend
      l_event-eventid = cl_gui_column_tree=>eventid_expand_no_children.
      append l_event to lt_events.
      l_event-eventid = cl_gui_column_tree=>eventid_checkbox_change.
      append l_event to lt_events.
      l_event-eventid = cl_gui_column_tree=>eventid_header_context_men_req.
      append l_event to lt_events.
      l_event-eventid = cl_gui_column_tree=>eventid_node_context_menu_req.
      append l_event to lt_events.
      l_event-eventid = cl_gui_column_tree=>eventid_item_context_menu_req.
      append l_event to lt_events.
      l_event-eventid = cl_gui_column_tree=>eventid_header_click.
      append l_event to lt_events.
      l_event-eventid = cl_gui_column_tree=>eventid_item_keypress.
      append l_event to lt_events.
      call method tree1->set_registered_events
        exporting
          events                    = lt_events
        exceptions
          cntl_error                = 1
          cntl_system_error         = 2
          illegal_event_combination = 3.
      if sy-subrc <> 0.
        message x208(00) with 'ERROR'.                          "#EC NOTEXT
      endif.
    set Handler
      data: l_event_receiver type ref to lcl_tree_event_receiver.
      create object l_event_receiver.
      set handler l_event_receiver->handle_node_ctmenu_request
                                                            for tree1.
      set handler l_event_receiver->handle_node_ctmenu_selected
                                                            for tree1.
      set handler l_event_receiver->handle_item_ctmenu_request
                                                            for tree1.
      set handler l_event_receiver->handle_item_ctmenu_selected
                                                            for tree1.
    endform.                    " zregister_events
    *&      Module  USER_COMMAND_0100  INPUT
          text
    module USER_COMMAND_0100 input.
    ok_code  = sy-ucomm.
    clear sy-ucomm.
    case ok_code.
        when 'EXIT' or 'BACK' or 'CANC'.
          perform Zexit_program.
        when others.
          call method cl_gui_cfw=>dispatch.
      endcase.
      clear ok_code.
      call method cl_gui_cfw=>flush.
    endmodule.                 " USER_COMMAND_0100  INPUT
    *&      Form  Zexit_program
          text
    -->  p1        text
    <--  p2        text
    form Zexit_program .
      call method tree1->free.
      leave program.
    endform.                    " Zexit_program
    <b>Reward if usefull</b>

  • Group matrix report with an hierarchy table???

    Hello,
    I have a big trouble making up a report involving many tables and one of them having a many-to-many recursive relationship. The user has a defined request in having the information grouped.I'll give some more details. I would like to know if you have any ideas in how to structure the report..
    Here are the tables:
    ORG
    (org_id not null,
    org_name not null)
    DNR
    (dnr_id not null,
    org_id not null,
    dnr_age,
    dnr_gender)
    CS
    (cs_id not null,
    dnr_id not null)
    Smpl
    (smpl_id not null,
    dnr_id notnull,
    org_id,
    smpl_tp not null,
    cs_id,
    meth,
    notes)
    Tr_map
    (tr_id not null,
    smpl_prnt not null,
    smpl_chld,
    pos)
    Some data..
    Smpl_id Dnr_id Org_id Smpl_tp Cs_id Meth Notes
    107 101 137 tss a xxxx
    118 112 137 tss ab xxxx
    122 108 25 tss 3768 a xxxx
    123 108 25 tss 3768 ab xxxx
    124 108 25 blk c yyyy
    125 108 25 sld d zzzz
    126 108 25 blk c yyyy
    tr_id Smpl_prnt Smpl_chld Pos
    1 107
    2 118
    3 122
    4 123
    5 124 122 1
    7 125 124 1
    8 126 122 1
    10 125 126 2
    The user wants the data reported as follows:
    Org name
    Dnr_id, dnr_age etc...
    Cs_id
    Smpl_id, Smpl_tp (tss), Meth, Notes
    Smpl_id,smpl_tp(blk), Meth, Notes ...
    Smpl_id, smpl_tp(sld), Meth, Notes...
    Cs_id
    Smpl_id, Smpl_tp (tss), Meth, Notes
    Smpl_id, smpl_tp(blk), Meth,Notes...
    Smpl_id, smpl_tp(sld), Meth, Notes...
    I think the grouped matrix would be the solution but I don't know how to do that with the hierarchy table to show the children and grandchildren as subgroups. Is that possible in a single query? How can I build a group matrix with multiple subgroups?
    Thanks in advance.
    simona
    null

    The example given by Oracle (from the above link) using the following SQL for a matrix report is flawed.
    SELECT DEPTNO, JOB, SUM(SAL)
    FROM EMP
    GROUP BY DEPTNO, JOB
    ORDER BY DEPTNO, JOB
    The SUM function handled by the query restricts you from doing so many things - especially when you want the empty fields to be filled by 0 (by using the Value if Null property).
    If the query is changed to ''SELECT DEPTNO, JOB, SAL FROM EMP' , and use the SUM function in the wizard to build the Matrix cell, then the 'Value if Null' property can be used without any issues.
    This also makes Section 25.6 (Add zeroes in place of blanks) of the documentation a joke.
    Anyway, that's my cents worth....

  • Hwo to create a matrix report in sql Plus

    i want to create matrix report in SQL plus for emp table. how is it possible
    requirement is as following
    Deptno -- Clerk -- Salesman--Manager
    10----------2500---3500--------4500
    20----------2400---3400--------4400
    30----------1400---4400--------5400

    Hi,
    Do a search on this site on
    -'pivot'
    and/or:
    -'stragg'
    and/or:
    -'columns to rows'
    to get many example that will give you ideas.
    Also you forgot to mention this:
    What's the value of the job titles?
    Sum of salary of....?
    edit
    Using my data:
    MHO%xe> select deptno, job, sal from emp order by deptno
      2  /
        DEPTNO JOB              SAL
            10 MANAGER         2450
            10 PRESIDENT       5000
            10 CLERK           1300
            20 ANALYST         3000
            20 CLERK            800
            20 CLERK           1100
            20 ANALYST         3000
            20 MANAGER         2975
            30 MANAGER         2850
            30 SALESMAN        1600
            30 CLERK            950
            30 SALESMAN        1250
            30 SALESMAN        1500
            30 SALESMAN        1250
    14 rijen zijn geselecteerd.I would get:
    MHO%xe> select deptno
      2  ,      sum(decode(job,'CLERK',sal,0)) CLERK
      3  ,      sum(decode(job,'SALESMAN',sal,0)) SALESMAN
      4  ,      sum(decode(job,'MANAGER',sal,0)) MANAGER
      5  from   emp
      6  group by deptno
      7  order by deptno
      8  /
        DEPTNO      CLERK   SALESMAN    MANAGER
            10       1300          0       2450
            20       1900          0       2975
            30        950       5600       2850Edited by: hoek on Oct 17, 2009 3:19 PM

  • Matrix Reports in 6i

    Hello.
    I have a question in regards to matrix reports and matrix with group reports. Is it true that in 6i (and possibly versions beyond 6i) that when you create a matrix with group report with the wizard that the report treats each group as its own matrix report? I have heard this and was wondering if anyone could explain this further? Is this why you cannot achieve grand total sum columns in a matrix with group report?
    If anyone can answer this question could you also provide a way to get around this limitation? My requirement is to sum columns within the matrix at the report level (equivalent of grand total for the report). Can anyone help? Thanks!
    Steve

    yes they are determinable. Gender is the repeating group(so male and female) and the columns inside each gender group are the same (5 different ethnicities).
    I have built the counts inside the SQL to show me the number of each ethnicity in each gender (so two rows one male and one female, and 5 columns, each a different ethnicity). I have a group involved with this, which complicates the issue, so I figured it would be easier to get the totals with the report wizard, but this is not the case. Can I give you any more information that would help?
    Thanks for the response,
    Steve

Maybe you are looking for

  • HT1311 apple id for apps

    my brother hooked my phone up to his computer and now it asks me to sign into his apple id when i try to download an app, how do i change it to mine? i have already signed out and back in but it wil not work

  • Linking to a relative path in FLASH CS6

    I am making a site for a school project.  I am worried once I move onto the next project, someone will move my files and screw up my FLV links.  How do I go about linking my videos with a relative path so the FLVs actually play?

  • IQ770 /771 setting or checking the resolution of a second monitor

    Hi I have a Touchsmart 771 and would like to use a second monitor, I have a spare HP W19 monitor that as far as I can see is the same resolution as the integrated monitor ( 1440x900 60Hz). If I connect this to the external port it seems to work fine

  • Green-colored volume indicators that appear on the LCD screen NOT working

    I have T61 with fresh install Window 7. After Win7 the laptop is VERY fast. The difference is incredible! I was running XP and everything worked perfect, now the green-colored volume indicators that appear on the LCD screen is NOT working. Yes, I did

  • Cs 6 and cs6 trial might both be on my computer-don't want problems when "trial" ends in 30 days.

    I had massive problems getting cs6 (paid version) to install after updating my computer to winows 8. Lots of issues with serial number on Adobe's part. Now, i ran belarc scan, says I have trial version of cs6, with totally different sn then what my p