Matrix Reports and Graphs

I have been trying to add a graph to a matrix report (v. 9.0.2.0.5), with Region (char value) on the x-axis and numerics on the y-axis, but in the picklists, none of the char fields show up. Is there a solution/workaround?
Thanks in advance,
Martin Hoerchner

My work around was to copy my matrix query and put a graph-friendly version(ie: one without all the grouping) of the query in my report along with the matrix query.

Similar Messages

  • Performance monitor reports and graphs don't show all the counters that were captured

    I've run into an odd behavior of performance monitor that I haven't been able to clear up yet: after I run a data collector set, the resulting report only shows a partial list of the counters that I captured, and so does the graph of that report (but different
    items).
    For instance, I chose the following counters for the data collector set:
    \PhysicalDisk(*)\% Idle Time
    \PhysicalDisk(*)\Avg. Disk Queue Length
    \PhysicalDisk(*)\Avg. Disk sec/Read
    \PhysicalDisk(*)\Avg. Disk sec/Write
    When the data collection ends, the report that gets displayed shows all those counters for _Total instance and C:, but then E: only shows % Idle Time and Avg. Disk Queue Length. That's it, the report ends there, even though I also have F: and V: drives on
    this server.
    If I choose to view the graph of this data collection, it only shows those four counters for the _Total instance.
    It took me a while to realize that all the data is being captured, but it's just the display that is truncated. If I view the folder then open the report.html, it actually shows all the data. Same with the graphs. If I select to add counters and add
    all the missing counters, they are displayed.
    I have searched high and low but haven't been able to find more than one post at ServerFault where someone had a similar issue, but no real solution or cause was provided, so I was hoping that someone here might have an idea.
    I also found a variety of articles about missing counters due to registry settings or because the counters needed to be reset, but that's a different issue that doesn't apply in my case. By the way, this is on a windows server 2012 R2 VM (file server).

    Hi SomeAdmin,
    The counter missing often caused by the related registry value is corrupted, please first refer the following related KB then perform a fix then monitor the issue again.
    Event ID 3012 — Performance Counter Loading
    http://technet.microsoft.com/en-us/library/cc775053(v=ws.10).aspx
    More information:
    Overview of Performance Monitoring
    http://technet.microsoft.com/en-us/library/cc958257.aspx
    PerfGuide: Analyzing Poor Disk Response Times
    http://social.technet.microsoft.com/wiki/contents/articles/1516.perfguide-analyzing-poor-disk-response-times.aspx
    Analyzing Storage Performance using the Windows Performance Analysis ToolKit (WPT)
    http://blogs.technet.com/b/robertsmith/archive/2012/02/07/analyzing-storage-performance-using-the-windows-performance-toolkit.aspx
    I’m glad to be of help to you!
    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 Support, contact [email protected]

  • Report and Graph Generation in Swing

    How can I generate Graphs/2D/3D pi charts/ bar charts and formatted reports (e.g. Expence Sheet of a company) in Swing ??

    How can I generate Graphs/2D/3D pi charts/ bar chartsJFreeChart
    and formatted reports (e.g. Expence Sheet of a
    company) in Swing ??JFreeReport
    www.jfree.orrg

  • Report and Graphs

    <p>Hi newcomer to the forum</p><p>Rather than ask for specific help on creating a graph for a vareity of groups over a period with a limit of availablity, are there any sites where I can look to get some graphing help?</p><p> Or is there someone out there looking for a challenge!</p><p>Regards</p><p>Brian.</p>

    Probably your best bet is to use ActiveX and control Word from LabVIEW, this way, you can act as you were using Word directly, automating all the steps to create your report. Look for examples in the developer zone, although there will be more examples relating Excel, that can show you the way to act. If you need to use this intensively, i think NI has created a Word toolokit that you can buy.
    For any particular question, just ask.
    Good luck

  • Regarding Matrix Report Issue in (RTF Template)

    Hi,
    We are developing the new report in XMLP (Matrix Report) and this is new stuff for us in XMLP. we dont have any material to explore about how to apply matrix report concepts in RTF Template.
    We have tried with some xml data with the RTF file but the data is not coming out well..since the mapping we did
    correct in the RTF File but the field VALUE not populating the data and also
    not able see the full table in the pdf output.
    Please help me out why this formatting issue happening with the matrix report format ?..
    Also please provide some notes to understand about how to apply Matrix concepts in the RTF to get perfect output.
    Thanks in Advance.
    Regards
    Prabu

    can you put your simple requirement here.
    like some sample xml, sample out required, and what you have tried.
    winrichman.blogspot.com
    check for crosstab there.you should find something.

  • How to create a matrix report

    Hi all,
    i want to create a matrix report manually by writing the query how can i create it in reports builder 10g
    please give me the details steps or any documentations for this so can i easily create the matrix report and also design
    for the matrix report. Please give me specific examples for creating the matrix report.
    plz give me the detail steps.
    please reply.......

    Have a look at this http://download.oracle.com/docs/cd/E12839_01/bi.1111/b32122/orbr_matrix.htm#g1017642
    -Ammad

  • SSRS Matrix Report

    Please see below matrix report before and after I run. How can I find percentage of below marked fields,
    for example: 1/3=0.33 (%33)  Female(PAs)/Total(PAs)=?
    Erdal Huzmeli

    Hi Erdal,
    According to your description, you have a matrix report and you want to get percentage of two different column in this report. Right?
    In Reporting Service, we can’t just use ReportItem function or aggregation function with scope string to calculation when we are working in a matrix because the columns of matrix are dynamic. So we need to define some functions in custom code and do calculation
    by calling those functions. Your scenario has been tested in our local environment. Here are some steps and screenshots for your reference:
    Add the custom code below into your report:
    Dim Shared Num1 As Integer
    Dim shared Num2 As Integer
    Public Function GetPA(PA as Integer, Type as String) 
    If Type = "Male" Then
       Num1=PA
    ELSE If Type="Female" Then
       Num2=PA
    End If 
    Return PA 
    End Function
    Public Function GetMalePct()
    Return Num1/(Num1+Num2)
    End Function
    Public Function GetFemalePct()
    Return Num2/(Num1+Num2)
    End Function
    Ps: We notice that Total PA=Male PA +Female PA. So we use “Num1+Num2” in the functions that we define in the custom code instead of using “SUM(Fields!PA.Value)” in expression.
    Put the expression below into the PA textbox in Gender group:
    =Code.getPA(SUM(Fields!PA.Value),Fields!Gender.Value)
    Put the expression below Female textbox within Gender Percentage:
    =Code.getFemalePct()
    Put the expression below Male textbox within Gender Percentage:
    =Code.getMalePct()
    Save and preview, the matrix and result looks like below:
    Reference:
    Custom Code and Assembly References in Expressions in Report Designer (SSRS)
    How to calculate the Percent change in a dynamic
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • Grid in matrix report

    I've made a matrix report and I want it to have a grid. I did everything that the document "Building reports" said, but it doesn't work properly. When I open the report - the gird disappears, but if I for example change color lines or fill of the frames/fields - the grid appears again. Hovewer if I save this "new-old" report and open this saved version again I see the grid disappeared again.

    That is not a permanent solution, i cannot give country field a fixed, because country name may go up to 1,2 or 3 lines, so accordingly it should expand.
    Have you guys never faced such a situation in matrix report?

  • 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;

  • Problem in matrix report

    i make a matrix report and the data is arabic
    when i make concurrent pdf or html the arabic is not appear as i want.
    when i try to make a template i can't because the option is table or table/form.
    what is the solution?

    You need to use an outer join in some way. See these similar problems:
    Re: Display null rows / columns in matrix report
    Re: To obtain all the Month details

  • Scramble layout when split a large matrix report in separate PDF page

    Dear All,
    I have large matrix report, and set the destype=cache, desformat=PDF, width=11, height=8.5 (at Main Section property).
    This report running well and resulted PDF file.
    But the problem is in the layout, i got a scramble layout and sometimes there are empty boxes.
    I thinks, this cause of the matrix size exceed the size of section (width & height at Main Section property).
    Anyone have solution for this?
    Thanks before..............

    Must admit that I never saved as txt
    Looks like a bug to me. What is the version of reports?
    Marcos

  • 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

  • Product Order for Matrix Reports [Certification Question]

    [ My Situation ]
    I'm having difficulty understanding the use of a property: a cell's Product Order property, used in Matrix reports by the main cells. Basically, I can't figure out what it does.
    [ What I Think a Matrix Report Is ]
    I understand the matrix report concept like so:
    A matrix report consists of 3 basic components: A category Row, a category Column, and Cells.
    The Row is the result of a query such as "SELECT DISTINCT dept_no FROM emp".
    The Column is like the Row such as "SELECT DISTINCT gender FROM emp".
    A Cell is a summary that coresponds to the queries that formed the Row and the Column, such as:
    SELECT AVG(salary)
    FROM emp
    GROUP BY dept_no, gender
    HAVING dept_no = 10 AND gender = "Female";
    The example above would produce a report where you could see whether males and females tended to have different salaries for various departments.
    [ I Know How the Data Model Works ]
    I understand the Data Model for a matrix report, where the summary fields go, etc.
    [ What I Think Product Order Does ]
    I don't understand what Product Order does for the Cells of a matrix report. It's a list of combinations of the groups in the matrix group from the Data Model. I think it translates to the order of the columns in a query's ORDER BY clause.
    If I reverse the order in which the groups appear in Product Order, I get different results. If my understanding of a matrix report and the Product Order property is correct, the order shouldn't matter.
    What am I misunderstanding?
    Thanks in advance for your help.

    from the online help:
    Description The Product Order property is the order in which
    groups are evaluated in the cross product for a summary.
    Product Order also defines the frequency of a summary, formula,
    or placeholder in a cross product group. That is, the summary,
    formula, or placeholder has one value for each combination of
    values of the groups in its Product Order. Product Order is
    used only for columns owned by cross-product groups. Because a
    cross product relates multiple groups, the groups in the cross
    product could be evaluated in any one of many different orders.
    Therefore, when creating a summary for a cross product, you must
    use Product Order to specify for Report Builder which group
    should be evaluated first, which second, and so on. You must
    also use Product Order to specify the frequency of a summary,
    formula, or placeholder within the cross product.
    Values A valid group combination.
    Applies to summary, formula, and placeholder columns
    Required/Optional required, if the column is a summary or
    formula column belonging to a cross product group.
    regards,
    the oracle reports team --pw                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Line Chart/Graph for a Matrix report in Oracle Reports 10g

    Hello,
    If you have a Matrix report, say Month Name as rows, Year as columns (for example 2007, 2008, 2009) and sum of Sales dollar value as cells...I want a Line Graph which shows Months on the bottom axis and Years represented by lines and the sales value as the trend or data points on the horizontal line...it seems Oracle Reports cannot do this sincethe Chart wizard does not show either the Months or years as selectable fields for either X or Y axis.
    I can easily write a sql which does the pivot and produce the results for Sales by month for last 3 yrs but in this case I would have to provide column alias similar to say CURRENT_YEAR, PRIOR_YEAR, PRIOR_PRIOR_YEAR. Then, the Chart wizard works correctly but the Legend shows the column alias which is not very desirable for an executive level report.
    I was hoping that since a matrix report shows the correct column names, the legends will pull through correctly but I am stuck since the Chart for a matrix report doesn't work as I described above.
    Does anyone know how to do this type of Chart on a Matrix?
    Thanks,
    Manish
    Edited by: mhathi on Jul 15, 2009 1:59 PM

    The way I'd do it is with a 3D-graph, I think you need that otherwise you will not be able to represent it properly ...
    You will need to create another query just for the graph, which will create another group, containing only 3 columns (YEAR, MONTH, SALES), then start your Graph Wizard, then you will see two groups, select the one containing the 3 columns and when asked for the X-axis categories select both YEAR and MONTH, then for Y-axis select SALES.
    That way it should work...

  • Matrix report with dynamic and fixed columns

    Hi all,
    I have a matrix report which has dynamic as well as few fixed columns.
    It is a fixed asset Report in which the sum(cost) in cell should be grouped according to column and row-wise.
    The row consists of the activity such as additions, retirements etc and the dynamic column is the category and other fixed columns such as CIP cost, CWIP cost will be grouped only according to row.
    the actual layout should be like this
                     | category 1 | category 2 | category 3 ...... | CIP cost | CWIP cost
    Additions    | Sum(cost) | Sum(cost)  | Sum(cost)  .......| 1234      | 4500
    retirements | Sum(cost) | Sum(cost)  | Sum(cost)  .......| 1000      | 2500but due to fixed colums in the layout the report builder pushes the fixed colums to the next row with single query i get
                     | category 1 | category 2 | category 3 ...... |
    Additions    | Sum(cost) | Sum(cost)  | Sum(cost)  .......|
                      CIP cost     | CWIP cost
                       1234        | 4500
    retirements | Sum(cost) | Sum(cost)  | Sum(cost)  .......|
                      CIP cost     | CWIP cost
                       1000        | 2500if i try to add those columns alone in a seperate query and then build the report i get the layout like this
                     | category 1 | category 2 | category 3 ...... |
    Additions    | Sum(cost) | Sum(cost)  | Sum(cost)  .......|
    retirements | Sum(cost) | Sum(cost)  | Sum(cost)  .......|
    CIP cost     | CWIP cost
    2234        | 7000This is my query, i have used union to get the row-wise column activity
    /* Formatted on 03-Sep-12 5:23:11 PM (QP5 v5.114.809.3010) */
      SELECT   DISTINCT /*ASSET_ID
                        SUM (cost),
                        SUM (cip_cost),
                        SUM (cip_cost_pk),
                        cat_desc--,sub_cat_desc
                        ,activity
        FROM   (-- cip cost
                SELECT   DISTINCT asset_id,
                                  cost,
                                  ytd_deprn,
                                  deprn_amount,
                                  deprn_reserve acc_deprn,
                                  cost - deprn_reserve net_bk_val,
                                  cip_cost,
                                  cip_cost_pk,
                                  description cat_desc,
                                  fat_desc sub_cat_desc,
                                  activity
                  FROM   (SELECT   DISTINCT
                                   fb.asset_id,
                                   fb.cost,
                                   facc.cost cip_cost,
                                   0 cip_cost_pk,
                                   ds.ytd_deprn,
                                   ds.deprn_reserve,
                                   fc.description,
                                   fat.description fat_desc,
                                   ds.deprn_amount,
                                   DECODE (
                                         facc.asset_type
                                      || '-'
                                      || fc.segment1
                                      || '-'
                                      || di.transtype,
                                         'CIP'
                                      || '-'
                                      || fc.segment1
                                      || '-'
                                      || 'TRANSFER',
                                      'CIP T/F',
                                      'CIP-0012-' || di.transtype,
                                      'Additions Project Khalifa assets',
                                      'CAPITALIZED-' || fc.segment1 || di.transtype,
                                      '0',
                                      'Additions'
                                      activity
                            FROM   fa_books fb,
                                   fa_additions_b fa,
                                   fa_methods fm,
                                   fa_financial_inquiry_cost_v fic,
                                   fa_categories_vl fc,
                                   fa_capitalize_cip_v facc,
                                   fa_additions_tl fat,
                                   fa_deprn_summary ds,
                                   fa_distribution_inquiry_v di
                           WHERE       ds.asset_id = fa.asset_id
                                   AND fb.asset_id = fa.asset_id
                                   AND fb.asset_id = fic.asset_id
                                   AND di.asset_id = fb.asset_id
                                   AND fb.life_in_months = fm.life_in_months
                                   AND fb.book_type_code = ds.book_type_code
                                   AND fb.book_type_code = fic.book_type_code
                                   AND fa.last_update_date >
                                         TO_DATE (
                                               '01'
                                            || 'JAN'
                                            || TO_CHAR (SYSDATE, 'RRRR'),
                                            'DD-MON-RRRR'
                                   AND ds.deprn_run_date =
                                         (SELECT   DISTINCT MAX (deprn_run_date)
                                            FROM   fa_deprn_summary
                                           WHERE   asset_id = fb.asset_id)
                                   AND fic.transaction_header_id_in =
                                         (SELECT   DISTINCT
                                                   MAX (transaction_header_id_in)
                                            FROM   fa_financial_inquiry_cost_v
                                           WHERE   asset_id = fb.asset_id)
                                   AND fb.date_effective =
                                         (SELECT   DISTINCT MAX (date_effective)
                                            FROM   fa_books
                                           WHERE   asset_id = fb.asset_id)
                                   AND di.transaction_header_id =
                                         (SELECT   DISTINCT
                                                   MAX (transaction_header_id)
                                            FROM   fa_distribution_inquiry_v
                                           WHERE   asset_id = fb.asset_id)
                                   AND fa.attribute_category_code =
                                         fc.segment1 || '-' || fc.segment2
                                   AND fc.segment1 <> '0012'
                                   AND fb.asset_id = facc.asset_id
                                   AND fa.asset_id = fat.asset_id
                                   --AND facc.asset_type <> 'CAPITALIZED'
                                   AND fb.deprn_method_code = fm.method_code
                                   AND ds.deprn_source_code <> 'BOOKS'
                                   AND DECODE (
                                         facc.asset_type || '-' || fc.segment1,
                                         'CIP-0012',
                                         'Additions Project Khalifa assets',
                                         'CAPITALIZED-' || fc.segment1,
                                         '0',
                                         'Additions'
                                      ) <> '0'/*ORDER BY fb.asset_id*/
                UNION
                --cip cost pk
                SELECT   DISTINCT asset_id,
                                  cost,
                                  ytd_deprn,
                                  deprn_amount,
                                  deprn_reserve acc_deprn,
                                  cost - deprn_reserve net_bk_val,
                                  cip_cost,
                                  cip_cost_pk,
                                  description cat_desc,
                                  fat_desc sub_cat_desc,
                                  activity
                  FROM   (SELECT   DISTINCT
                                   fb.asset_id,
                                   fb.cost,
                                   0 cip_cost,
                                   facc.cost cip_cost_pk,
                                   ds.ytd_deprn,
                                   ds.deprn_reserve,
                                   fc.description,
                                   fat.description fat_desc,
                                   ds.deprn_amount,
                                   DECODE (
                                         facc.asset_type
                                      || '-'
                                      || fc.segment1
                                      || '-'
                                      || di.transtype,
                                         'CIP'
                                      || '-'
                                      || fc.segment1
                                      || '-'
                                      || 'TRANSFER',
                                      'CIP T/F',
                                      'CIP-0012-' || di.transtype,
                                      'Additions Project Khalifa assets',
                                      'CAPITALIZED-' || fc.segment1 || di.transtype,
                                      '0',
                                      'Additions'
                                      activity
                            FROM   fa_books fb,
                                   fa_additions_b fa,
                                   fa_methods fm,
                                   fa_financial_inquiry_cost_v fic,
                                   fa_categories_vl fc,
                                   fa_capitalize_cip_v facc,
                                   fa_additions_tl fat,
                                   fa_deprn_summary ds,
                                   fa_distribution_inquiry_v di
                           WHERE       ds.asset_id = fa.asset_id
                                   AND fb.asset_id = fa.asset_id
                                   AND fb.asset_id = fic.asset_id
                                   AND di.asset_id = fb.asset_id
                                   AND fb.life_in_months = fm.life_in_months
                                   AND fb.book_type_code = ds.book_type_code
                                   AND fb.book_type_code = fic.book_type_code
                                   AND fa.last_update_date >
                                         TO_DATE (
                                               '01'
                                            || 'JAN'
                                            || TO_CHAR (SYSDATE, 'RRRR'),
                                            'DD-MON-RRRR'
                                   AND ds.deprn_run_date =
                                         (SELECT   DISTINCT MAX (deprn_run_date)
                                            FROM   fa_deprn_summary
                                           WHERE   asset_id = fb.asset_id)
                                   AND fic.transaction_header_id_in =
                                         (SELECT   DISTINCT
                                                   MAX (transaction_header_id_in)
                                            FROM   fa_financial_inquiry_cost_v
                                           WHERE   asset_id = fb.asset_id)
                                   AND fb.date_effective =
                                         (SELECT   DISTINCT MAX (date_effective)
                                            FROM   fa_books
                                           WHERE   asset_id = fb.asset_id)
                                   AND di.transaction_header_id =
                                         (SELECT   DISTINCT
                                                   MAX (transaction_header_id)
                                            FROM   fa_distribution_inquiry_v
                                           WHERE   asset_id = fb.asset_id)
                                   AND fa.attribute_category_code =
                                         fc.segment1 || '-' || fc.segment2
                                   AND fc.segment1 = '0012'
                                   AND fb.asset_id = facc.asset_id
                                   AND fa.asset_id = fat.asset_id
                                   --AND facc.asset_type <> 'CAPITALIZED'
                                   AND fb.deprn_method_code = fm.method_code
                                   AND ds.deprn_source_code <> 'BOOKS'
                                   AND DECODE (
                                         facc.asset_type || '-' || fc.segment1,
                                         'CIP-0012',
                                         'Additions Project Khalifa assets',
                                         'CAPITALIZED-' || fc.segment1,
                                         '0',
                                         'Additions'
                                      ) <> '0'/*ORDER BY fb.asset_id*/
                UNION
                -- Disposal / Transferred / Retired
                (                                                       -- retired
                 SELECT   DISTINCT asset_id,
                                   cost,
                                   ytd_deprn,
                                   deprn_amount,
                                   deprn_reserve acc_deprn,
                                   cost - deprn_reserve net_bk_val,
                                   cip_cost,
                                   cip_cost_pk,
                                   description cat_desc,
                                   fat_desc sub_cat_desc,
                                   activity
                   FROM   (SELECT   DISTINCT
                                    fb.asset_id,
                                    fb.cost,
                                    0 cip_cost,
                                    0 cip_cost_pk,
                                    ds.ytd_deprn,
                                    ds.deprn_reserve,
                                    fc.description,
                                    fat.description fat_desc,
                                    ds.deprn_amount,
                                    'Disposal / Transferred / Retired' activity
                             FROM   fa_books fb,
                                    fa_additions_b fa,
                                    fa_methods fm,
                                    fa_financial_inquiry_cost_v fic,
                                    fa_categories_vl fc,
                                    fa_additions_tl fat,
                                    fa_deprn_summary ds,
                                    fa_mass_ext_retirements_v ret
                            WHERE       ds.asset_id = fa.asset_id
                                    AND fb.asset_id = fa.asset_id
                                    AND fb.asset_id = fic.asset_id
                                    AND fb.life_in_months = fm.life_in_months
                                    AND fb.book_type_code = ds.book_type_code
                                    AND fb.book_type_code = fic.book_type_code
                                    AND fa.last_update_date >
                                          TO_DATE (
                                                '01'
                                             || 'JAN'
                                             || TO_CHAR (SYSDATE, 'RRRR'),
                                             'DD-MON-RRRR'
                                    AND ds.deprn_run_date =
                                          (SELECT   DISTINCT MAX (deprn_run_date)
                                             FROM   fa_deprn_summary
                                            WHERE   asset_id = fb.asset_id)
                                    AND fic.transaction_header_id_in =
                                          (SELECT   DISTINCT
                                                    MAX (transaction_header_id_in)
                                             FROM   fa_financial_inquiry_cost_v
                                            WHERE   asset_id = fb.asset_id)
                                    AND fb.date_effective =
                                          (SELECT   DISTINCT MAX (date_effective)
                                             FROM   fa_books
                                            WHERE   asset_id = fb.asset_id)
                                    AND fa.attribute_category_code =
                                          fc.segment1 || '-' || fc.segment2
                                    AND fb.asset_id = ret.asset_id
                                    AND fa.asset_id = fat.asset_id
                                    AND fb.deprn_method_code = fm.method_code
                                    AND ds.deprn_source_code <> 'BOOKS'/*ORDER BY fb.asset_id*/
                 UNION
                 --transfer
                 SELECT   DISTINCT asset_id,
                                   cost,
                                   ytd_deprn,
                                   deprn_amount,
                                   deprn_reserve acc_deprn,
                                   cost - deprn_reserve net_bk_val,
                                   cip_cost,
                                   cip_cost_pk,
                                   description cat_desc,
                                   fat_desc sub_cat_desc,
                                   activity
                   FROM   (SELECT   DISTINCT
                                    fb.asset_id,
                                    fb.cost,
                                    facc.cost cip_cost,
                                    0 cip_cost_pk,
                                    ds.ytd_deprn,
                                    ds.deprn_reserve,
                                    fc.description,
                                    fat.description fat_desc,
                                    ds.deprn_amount,
                                    'Disposal / Transferred / Retired' activity
                             FROM   fa_books fb,
                                    fa_additions_b fa,
                                    fa_methods fm,
                                    fa_financial_inquiry_cost_v fic,
                                    fa_categories_vl fc,
                                    fa_capitalize_cip_v facc,
                                    fa_additions_tl fat,
                                    fa_deprn_summary ds,
                                    fa_distribution_inquiry_v di
                            WHERE       ds.asset_id = fa.asset_id
                                    AND fb.asset_id = fa.asset_id
                                    AND fb.asset_id = fic.asset_id
                                    AND di.asset_id = fb.asset_id
                                    AND fb.life_in_months = fm.life_in_months
                                    AND fb.book_type_code = ds.book_type_code
                                    AND fb.book_type_code = fic.book_type_code
                                    AND fa.last_update_date >
                                          TO_DATE (
                                                '01'
                                             || 'JAN'
                                             || TO_CHAR (SYSDATE, 'RRRR'),
                                             'DD-MON-RRRR'
                                    AND ds.deprn_run_date =
                                          (SELECT   DISTINCT MAX (deprn_run_date)
                                             FROM   fa_deprn_summary
                                            WHERE   asset_id = fb.asset_id)
                                    AND fic.transaction_header_id_in =
                                          (SELECT   DISTINCT
                                                    MAX (transaction_header_id_in)
                                             FROM   fa_financial_inquiry_cost_v
                                            WHERE   asset_id = fb.asset_id)
                                    AND fb.date_effective =
                                          (SELECT   DISTINCT MAX (date_effective)
                                             FROM   fa_books
                                            WHERE   asset_id = fb.asset_id)
                                    AND di.transaction_header_id =
                                          (SELECT   DISTINCT
                                                    MAX (transaction_header_id)
                                             FROM   fa_distribution_inquiry_v
                                            WHERE   asset_id = fb.asset_id
                                                    AND transtype = 'TRANSFER')
                                    AND fa.attribute_category_code =
                                          fc.segment1 || '-' || fc.segment2
                                    AND fb.asset_id = facc.asset_id
                                    AND fa.asset_id = fat.asset_id
                                    AND facc.asset_type = 'CAPITALIZED'
                                    AND fb.deprn_method_code = fm.method_code
                                    AND ds.deprn_source_code <> 'BOOKS'/*ORDER BY fb.asset_id*/
    GROUP BY   cat_desc, activity                                   
    ORDER BY   activityBrgds,
    Max

    Hi all,
    I have a matrix report which has dynamic as well as few fixed columns.
    It is a fixed asset Report in which the sum(cost) in cell should be grouped according to column and row-wise.
    The row consists of the activity such as additions, retirements etc and the dynamic column is the category and other fixed columns such as CIP cost, CWIP cost will be grouped only according to row.
    the actual layout should be like this
                     | category 1 | category 2 | category 3 ...... | CIP cost | CWIP cost
    Additions    | Sum(cost) | Sum(cost)  | Sum(cost)  .......| 1234      | 4500
    retirements | Sum(cost) | Sum(cost)  | Sum(cost)  .......| 1000      | 2500but due to fixed colums in the layout the report builder pushes the fixed colums to the next row with single query i get
                     | category 1 | category 2 | category 3 ...... |
    Additions    | Sum(cost) | Sum(cost)  | Sum(cost)  .......|
                      CIP cost     | CWIP cost
                       1234        | 4500
    retirements | Sum(cost) | Sum(cost)  | Sum(cost)  .......|
                      CIP cost     | CWIP cost
                       1000        | 2500if i try to add those columns alone in a seperate query and then build the report i get the layout like this
                     | category 1 | category 2 | category 3 ...... |
    Additions    | Sum(cost) | Sum(cost)  | Sum(cost)  .......|
    retirements | Sum(cost) | Sum(cost)  | Sum(cost)  .......|
    CIP cost     | CWIP cost
    2234        | 7000This is my query, i have used union to get the row-wise column activity
    /* Formatted on 03-Sep-12 5:23:11 PM (QP5 v5.114.809.3010) */
      SELECT   DISTINCT /*ASSET_ID
                        SUM (cost),
                        SUM (cip_cost),
                        SUM (cip_cost_pk),
                        cat_desc--,sub_cat_desc
                        ,activity
        FROM   (-- cip cost
                SELECT   DISTINCT asset_id,
                                  cost,
                                  ytd_deprn,
                                  deprn_amount,
                                  deprn_reserve acc_deprn,
                                  cost - deprn_reserve net_bk_val,
                                  cip_cost,
                                  cip_cost_pk,
                                  description cat_desc,
                                  fat_desc sub_cat_desc,
                                  activity
                  FROM   (SELECT   DISTINCT
                                   fb.asset_id,
                                   fb.cost,
                                   facc.cost cip_cost,
                                   0 cip_cost_pk,
                                   ds.ytd_deprn,
                                   ds.deprn_reserve,
                                   fc.description,
                                   fat.description fat_desc,
                                   ds.deprn_amount,
                                   DECODE (
                                         facc.asset_type
                                      || '-'
                                      || fc.segment1
                                      || '-'
                                      || di.transtype,
                                         'CIP'
                                      || '-'
                                      || fc.segment1
                                      || '-'
                                      || 'TRANSFER',
                                      'CIP T/F',
                                      'CIP-0012-' || di.transtype,
                                      'Additions Project Khalifa assets',
                                      'CAPITALIZED-' || fc.segment1 || di.transtype,
                                      '0',
                                      'Additions'
                                      activity
                            FROM   fa_books fb,
                                   fa_additions_b fa,
                                   fa_methods fm,
                                   fa_financial_inquiry_cost_v fic,
                                   fa_categories_vl fc,
                                   fa_capitalize_cip_v facc,
                                   fa_additions_tl fat,
                                   fa_deprn_summary ds,
                                   fa_distribution_inquiry_v di
                           WHERE       ds.asset_id = fa.asset_id
                                   AND fb.asset_id = fa.asset_id
                                   AND fb.asset_id = fic.asset_id
                                   AND di.asset_id = fb.asset_id
                                   AND fb.life_in_months = fm.life_in_months
                                   AND fb.book_type_code = ds.book_type_code
                                   AND fb.book_type_code = fic.book_type_code
                                   AND fa.last_update_date >
                                         TO_DATE (
                                               '01'
                                            || 'JAN'
                                            || TO_CHAR (SYSDATE, 'RRRR'),
                                            'DD-MON-RRRR'
                                   AND ds.deprn_run_date =
                                         (SELECT   DISTINCT MAX (deprn_run_date)
                                            FROM   fa_deprn_summary
                                           WHERE   asset_id = fb.asset_id)
                                   AND fic.transaction_header_id_in =
                                         (SELECT   DISTINCT
                                                   MAX (transaction_header_id_in)
                                            FROM   fa_financial_inquiry_cost_v
                                           WHERE   asset_id = fb.asset_id)
                                   AND fb.date_effective =
                                         (SELECT   DISTINCT MAX (date_effective)
                                            FROM   fa_books
                                           WHERE   asset_id = fb.asset_id)
                                   AND di.transaction_header_id =
                                         (SELECT   DISTINCT
                                                   MAX (transaction_header_id)
                                            FROM   fa_distribution_inquiry_v
                                           WHERE   asset_id = fb.asset_id)
                                   AND fa.attribute_category_code =
                                         fc.segment1 || '-' || fc.segment2
                                   AND fc.segment1 <> '0012'
                                   AND fb.asset_id = facc.asset_id
                                   AND fa.asset_id = fat.asset_id
                                   --AND facc.asset_type <> 'CAPITALIZED'
                                   AND fb.deprn_method_code = fm.method_code
                                   AND ds.deprn_source_code <> 'BOOKS'
                                   AND DECODE (
                                         facc.asset_type || '-' || fc.segment1,
                                         'CIP-0012',
                                         'Additions Project Khalifa assets',
                                         'CAPITALIZED-' || fc.segment1,
                                         '0',
                                         'Additions'
                                      ) <> '0'/*ORDER BY fb.asset_id*/
                UNION
                --cip cost pk
                SELECT   DISTINCT asset_id,
                                  cost,
                                  ytd_deprn,
                                  deprn_amount,
                                  deprn_reserve acc_deprn,
                                  cost - deprn_reserve net_bk_val,
                                  cip_cost,
                                  cip_cost_pk,
                                  description cat_desc,
                                  fat_desc sub_cat_desc,
                                  activity
                  FROM   (SELECT   DISTINCT
                                   fb.asset_id,
                                   fb.cost,
                                   0 cip_cost,
                                   facc.cost cip_cost_pk,
                                   ds.ytd_deprn,
                                   ds.deprn_reserve,
                                   fc.description,
                                   fat.description fat_desc,
                                   ds.deprn_amount,
                                   DECODE (
                                         facc.asset_type
                                      || '-'
                                      || fc.segment1
                                      || '-'
                                      || di.transtype,
                                         'CIP'
                                      || '-'
                                      || fc.segment1
                                      || '-'
                                      || 'TRANSFER',
                                      'CIP T/F',
                                      'CIP-0012-' || di.transtype,
                                      'Additions Project Khalifa assets',
                                      'CAPITALIZED-' || fc.segment1 || di.transtype,
                                      '0',
                                      'Additions'
                                      activity
                            FROM   fa_books fb,
                                   fa_additions_b fa,
                                   fa_methods fm,
                                   fa_financial_inquiry_cost_v fic,
                                   fa_categories_vl fc,
                                   fa_capitalize_cip_v facc,
                                   fa_additions_tl fat,
                                   fa_deprn_summary ds,
                                   fa_distribution_inquiry_v di
                           WHERE       ds.asset_id = fa.asset_id
                                   AND fb.asset_id = fa.asset_id
                                   AND fb.asset_id = fic.asset_id
                                   AND di.asset_id = fb.asset_id
                                   AND fb.life_in_months = fm.life_in_months
                                   AND fb.book_type_code = ds.book_type_code
                                   AND fb.book_type_code = fic.book_type_code
                                   AND fa.last_update_date >
                                         TO_DATE (
                                               '01'
                                            || 'JAN'
                                            || TO_CHAR (SYSDATE, 'RRRR'),
                                            'DD-MON-RRRR'
                                   AND ds.deprn_run_date =
                                         (SELECT   DISTINCT MAX (deprn_run_date)
                                            FROM   fa_deprn_summary
                                           WHERE   asset_id = fb.asset_id)
                                   AND fic.transaction_header_id_in =
                                         (SELECT   DISTINCT
                                                   MAX (transaction_header_id_in)
                                            FROM   fa_financial_inquiry_cost_v
                                           WHERE   asset_id = fb.asset_id)
                                   AND fb.date_effective =
                                         (SELECT   DISTINCT MAX (date_effective)
                                            FROM   fa_books
                                           WHERE   asset_id = fb.asset_id)
                                   AND di.transaction_header_id =
                                         (SELECT   DISTINCT
                                                   MAX (transaction_header_id)
                                            FROM   fa_distribution_inquiry_v
                                           WHERE   asset_id = fb.asset_id)
                                   AND fa.attribute_category_code =
                                         fc.segment1 || '-' || fc.segment2
                                   AND fc.segment1 = '0012'
                                   AND fb.asset_id = facc.asset_id
                                   AND fa.asset_id = fat.asset_id
                                   --AND facc.asset_type <> 'CAPITALIZED'
                                   AND fb.deprn_method_code = fm.method_code
                                   AND ds.deprn_source_code <> 'BOOKS'
                                   AND DECODE (
                                         facc.asset_type || '-' || fc.segment1,
                                         'CIP-0012',
                                         'Additions Project Khalifa assets',
                                         'CAPITALIZED-' || fc.segment1,
                                         '0',
                                         'Additions'
                                      ) <> '0'/*ORDER BY fb.asset_id*/
                UNION
                -- Disposal / Transferred / Retired
                (                                                       -- retired
                 SELECT   DISTINCT asset_id,
                                   cost,
                                   ytd_deprn,
                                   deprn_amount,
                                   deprn_reserve acc_deprn,
                                   cost - deprn_reserve net_bk_val,
                                   cip_cost,
                                   cip_cost_pk,
                                   description cat_desc,
                                   fat_desc sub_cat_desc,
                                   activity
                   FROM   (SELECT   DISTINCT
                                    fb.asset_id,
                                    fb.cost,
                                    0 cip_cost,
                                    0 cip_cost_pk,
                                    ds.ytd_deprn,
                                    ds.deprn_reserve,
                                    fc.description,
                                    fat.description fat_desc,
                                    ds.deprn_amount,
                                    'Disposal / Transferred / Retired' activity
                             FROM   fa_books fb,
                                    fa_additions_b fa,
                                    fa_methods fm,
                                    fa_financial_inquiry_cost_v fic,
                                    fa_categories_vl fc,
                                    fa_additions_tl fat,
                                    fa_deprn_summary ds,
                                    fa_mass_ext_retirements_v ret
                            WHERE       ds.asset_id = fa.asset_id
                                    AND fb.asset_id = fa.asset_id
                                    AND fb.asset_id = fic.asset_id
                                    AND fb.life_in_months = fm.life_in_months
                                    AND fb.book_type_code = ds.book_type_code
                                    AND fb.book_type_code = fic.book_type_code
                                    AND fa.last_update_date >
                                          TO_DATE (
                                                '01'
                                             || 'JAN'
                                             || TO_CHAR (SYSDATE, 'RRRR'),
                                             'DD-MON-RRRR'
                                    AND ds.deprn_run_date =
                                          (SELECT   DISTINCT MAX (deprn_run_date)
                                             FROM   fa_deprn_summary
                                            WHERE   asset_id = fb.asset_id)
                                    AND fic.transaction_header_id_in =
                                          (SELECT   DISTINCT
                                                    MAX (transaction_header_id_in)
                                             FROM   fa_financial_inquiry_cost_v
                                            WHERE   asset_id = fb.asset_id)
                                    AND fb.date_effective =
                                          (SELECT   DISTINCT MAX (date_effective)
                                             FROM   fa_books
                                            WHERE   asset_id = fb.asset_id)
                                    AND fa.attribute_category_code =
                                          fc.segment1 || '-' || fc.segment2
                                    AND fb.asset_id = ret.asset_id
                                    AND fa.asset_id = fat.asset_id
                                    AND fb.deprn_method_code = fm.method_code
                                    AND ds.deprn_source_code <> 'BOOKS'/*ORDER BY fb.asset_id*/
                 UNION
                 --transfer
                 SELECT   DISTINCT asset_id,
                                   cost,
                                   ytd_deprn,
                                   deprn_amount,
                                   deprn_reserve acc_deprn,
                                   cost - deprn_reserve net_bk_val,
                                   cip_cost,
                                   cip_cost_pk,
                                   description cat_desc,
                                   fat_desc sub_cat_desc,
                                   activity
                   FROM   (SELECT   DISTINCT
                                    fb.asset_id,
                                    fb.cost,
                                    facc.cost cip_cost,
                                    0 cip_cost_pk,
                                    ds.ytd_deprn,
                                    ds.deprn_reserve,
                                    fc.description,
                                    fat.description fat_desc,
                                    ds.deprn_amount,
                                    'Disposal / Transferred / Retired' activity
                             FROM   fa_books fb,
                                    fa_additions_b fa,
                                    fa_methods fm,
                                    fa_financial_inquiry_cost_v fic,
                                    fa_categories_vl fc,
                                    fa_capitalize_cip_v facc,
                                    fa_additions_tl fat,
                                    fa_deprn_summary ds,
                                    fa_distribution_inquiry_v di
                            WHERE       ds.asset_id = fa.asset_id
                                    AND fb.asset_id = fa.asset_id
                                    AND fb.asset_id = fic.asset_id
                                    AND di.asset_id = fb.asset_id
                                    AND fb.life_in_months = fm.life_in_months
                                    AND fb.book_type_code = ds.book_type_code
                                    AND fb.book_type_code = fic.book_type_code
                                    AND fa.last_update_date >
                                          TO_DATE (
                                                '01'
                                             || 'JAN'
                                             || TO_CHAR (SYSDATE, 'RRRR'),
                                             'DD-MON-RRRR'
                                    AND ds.deprn_run_date =
                                          (SELECT   DISTINCT MAX (deprn_run_date)
                                             FROM   fa_deprn_summary
                                            WHERE   asset_id = fb.asset_id)
                                    AND fic.transaction_header_id_in =
                                          (SELECT   DISTINCT
                                                    MAX (transaction_header_id_in)
                                             FROM   fa_financial_inquiry_cost_v
                                            WHERE   asset_id = fb.asset_id)
                                    AND fb.date_effective =
                                          (SELECT   DISTINCT MAX (date_effective)
                                             FROM   fa_books
                                            WHERE   asset_id = fb.asset_id)
                                    AND di.transaction_header_id =
                                          (SELECT   DISTINCT
                                                    MAX (transaction_header_id)
                                             FROM   fa_distribution_inquiry_v
                                            WHERE   asset_id = fb.asset_id
                                                    AND transtype = 'TRANSFER')
                                    AND fa.attribute_category_code =
                                          fc.segment1 || '-' || fc.segment2
                                    AND fb.asset_id = facc.asset_id
                                    AND fa.asset_id = fat.asset_id
                                    AND facc.asset_type = 'CAPITALIZED'
                                    AND fb.deprn_method_code = fm.method_code
                                    AND ds.deprn_source_code <> 'BOOKS'/*ORDER BY fb.asset_id*/
    GROUP BY   cat_desc, activity                                   
    ORDER BY   activityBrgds,
    Max

Maybe you are looking for