PIVOT table in SQL?

Hello,
I have a table with 3 columns, where person_id is unique id.
<person_id> <event_type> <number_events>
1. I need to transform this into a table with <person_id> <event_type1> <event_type2>.... <event_type-n>
And under each column I need to fill the number_events for each event_type for that person_id
2. Next step is to use that table and convert the same into % of number_events under each event_type, as % of total number_events for each id_member
Thanks

1. I need to transform this into a table with <person_id> <event_type1> <event_type2>.... <event_type-n>Problem as a SQL projection cannot be of an-unknown-number-of-columns-we-will-figure-it-out-at-run-time. Unless you use some funky PL/SQL coding to create an Advance SQL Data Type that sports a RTTI interface. And this is typically t0o complex for the "normal" PL/SQL developer that almost never use Advance SQL Data Types to create SQL classes, never mind using OCI calls to define PL/SQL methods for RTTI interfaces.
You can of course have a column that is a collection - and a collection can contain any number of elements.
Example:
SQL> -- create a collection type of strings
SQL> create or replace type TStrings as table of varchar2(4000);
  2  /                                                         
Type created.
SQL>
SQL> col TYPE format a15
SQL> col NAME_LIST format a100
SQL>                         
SQL> -- now perform a pivot using a collection where
SQL> -- the collection can be 1..n                 
SQL> select                                        
  2          t.object_type as "TYPE",              
  3          cast(   multiset(                     
  4                          select object_name from user_objects n where n.object_type = t.object_type
  5                  )                                                                                
  6                  as TStrings                                                                      
  7          ) as "NAME_LIST",                                                                        
  8          count(*) as "TOTAL"                                                                      
  9  from       user_objects t                                                                        
10  group by                                                                                         
11          t.object_type                                                                            
12  order by 1                                                                                       
13  /                                                                                                
TYPE            NAME_LIST                                                                                                 TOTAL
FUNCTION        TSTRINGS('TESTPIPE', 'TO_TMINOR', 'TO_SUB', 'AUTHENTICATE', 'CHECKSUM', 'FOOPIPE', 'WEBBROWSER', 'PR         19
                EVENTDELETE', 'GETSTAT', 'GETHOSTNAME', 'FOOFUNC', 'TOKENISE', 'DYNAMICFUNCTION', 'STATS', 'POP3', '          
                CALC', 'VPDBPOLICY', 'LISTTONUMBERS', 'TCPPING')                                                              
INDEX           TSTRINGS('SYS_C0046436', 'SYS_C0046439', 'SYS_IOT_TOP_125320', 'SYS_IOT_TOP_125322', 'SYS_IOT_TOP_12         23
                5324', 'SYS_IOT_TOP_125327', 'PK_STUFF', 'SYS_C0055439', 'SYS_C0076868', 'PATIENT_PK', 'SYS_C0055021          
                ', 'INPATIENT_PK', 'SYS_C0055023', 'BED_PK', 'PK_TAB11', 'PK_ROUTERS', 'SYS_C0055202', 'PK_FOO_TAB',
                 'PK_FOO_UPDATE', 'PK_SERIALISE', 'SYS_C0058353', 'PK_EMP', 'PK_ANYCHART_TEMPLATES')
LIBRARY         TSTRINGS('LIBC')                                                                                              1
LOB             TSTRINGS('SYS_LOB0000125313C00031$$', 'SYS_LOB0000153382C00007$$', 'SYS_LOB0000141150C00002$$', 'SYS          6
                 _LOB0000205530C00001$$', 'SYS_LOB0000197183C00002$$', 'SYS_LOB0000209404C00002$$')

Similar Messages

  • Rows To Columns Or Pivot Table with SQL Model over two tables

    hi @all
    oracle 10.2.0.4
    i have following situation
    table_1
    t1_id   t1_name
    1      reggie
    table_2
    t2_id   t2_t1_id   t2_start_date   t2_end_date
    1      1      01.01.2008      31.03.2008
    2      1      01.06.2008      31.07.2008
    cardinality from table_1 to table_2 is one to many
    now i need this
    t1_name   t2_start_date_1   t2_end_date_1   t2_start_date_2   t2_end_date_2   t2_start_date_x   t2_end_date_x
    reggie      01.01.2008      31.03.2008      01.06.2008      31.07.2008
    i think the max occurrence of start/enddate can be 15
    can somebody help

    Hello,
    One way, assuming 15 is the maximum:
    SELECT t1.name,
            t2.t2_start_date t2_start_date_1,   t2.t2_end_date t2_end_date_1,
            LEAD(t2.t2_start_date,1) OVER (PARTITION BY t2.t2_t1_id ORDER BY t2.t2_start_date) t2_start_date_2,
            LEAD(t2.t2_end_date,1) OVER (PARTITION BY t2.t2_t1_id ORDER BY t2.t2_end_date)t2_end_date_2,
            LEAD(t2.t2_start_date,2) OVER (PARTITION BY t2.t2_t1_id ORDER BY t2.t2_start_date)t2_start_date_3,
            LEAD(t2.t2_end_date,2) OVER (PARTITION BY t2.t2_t1_id ORDER BY t2.t2_end_date)t2_end_date_3,
            LEAD(t2.t2_start_date,3) OVER (PARTITION BY t2.t2_t1_id ORDER BY t2.t2_start_date)t2_start_date_4,
            LEAD(t2.t2_end_date,3) OVER (PARTITION BY t2.t2_t1_id ORDER BY t2.t2_end_date)t2_end_date_4,
            LEAD(t2.t2_start_date,4) OVER (PARTITION BY t2.t2_t1_id ORDER BY t2.t2_start_date)t2_start_date_5,
            LEAD(t2.t2_end_date,4) OVER (PARTITION BY t2.t2_t1_id ORDER BY t2.t2_end_date)t2_end_date_5,
            LEAD(t2.t2_start_date,5) OVER (PARTITION BY t2.t2_t1_id ORDER BY t2.t2_start_date)t2_start_date_6,
            LEAD(t2.t2_end_date,5) OVER (PARTITION BY t2.t2_t1_id ORDER BY t2.t2_end_date)t2_end_date_6,
            LEAD(t2.t2_start_date,6) OVER (PARTITION BY t2.t2_t1_id ORDER BY t2.t2_start_date)t2_start_date_7,
            LEAD(t2.t2_end_date,6) OVER (PARTITION BY t2.t2_t1_id ORDER BY t2.t2_end_date)t2_end_date_7,
            LEAD(t2.t2_start_date,7) OVER (PARTITION BY t2.t2_t1_id ORDER BY t2.t2_start_date)t2_start_date_8,
            LEAD(t2.t2_end_date,7) OVER (PARTITION BY t2.t2_t1_id ORDER BY t2.t2_end_date)t2_end_date_8,
            LEAD(t2.t2_start_date,8) OVER (PARTITION BY t2.t2_t1_id ORDER BY t2.t2_start_date)t2_start_date_9,
            LEAD(t2.t2_end_date,8) OVER (PARTITION BY t2.t2_t1_id ORDER BY t2.t2_end_date)t2_end_date_9,
            LEAD(t2.t2_start_date,9) OVER (PARTITION BY t2.t2_t1_id ORDER BY t2.t2_start_date)t2_start_date_10,
            LEAD(t2.t2_end_date,9) OVER (PARTITION BY t2.t2_t1_id ORDER BY t2.t2_end_date)t2_end_date_10,
            LEAD(t2.t2_start_date,10) OVER (PARTITION BY t2.t2_t1_id ORDER BY t2.t2_start_date)t2_start_date_11,
            LEAD(t2.t2_end_date,10) OVER (PARTITION BY t2.t2_t1_id ORDER BY t2.t2_end_date)t2_end_date_11,
            LEAD(t2.t2_start_date,11) OVER (PARTITION BY t2.t2_t1_id ORDER BY t2.t2_start_date)t2_start_date_12,
            LEAD(t2.t2_end_date,11) OVER (PARTITION BY t2.t2_t1_id ORDER BY t2.t2_end_date)t2_end_date_12,
            LEAD(t2.t2_start_date,12) OVER (PARTITION BY t2.t2_t1_id ORDER BY t2.t2_start_date)t2_start_date_13,
            LEAD(t2.t2_end_date,12) OVER (PARTITION BY t2.t2_t1_id ORDER BY t2.t2_end_date)t2_end_date_13,
            LEAD(t2.t2_start_date,13) OVER (PARTITION BY t2.t2_t1_id ORDER BY t2.t2_start_date)t2_start_date_14,
            LEAD(t2.t2_end_date,13) OVER (PARTITION BY t2.t2_t1_id ORDER BY t2.t2_end_date)t2_end_date_14,
            LEAD(t2.t2_start_date,14)  OVER (PARTITION BY t2.t2_t1_id ORDER BY t2.t2_start_date) t2_start_date_15,        
            LEAD(t2.t2_end_date,14) OVER (PARTITION BY t2.t2_t1_id ORDER BY t2.t2_end_date) t2_end_date_15
      FROM table_1 t1
      JOIN table_2 t2 ON (t1.t1_id = t2.t2_t1_id)
    WHERE (t2.t2_start_date,   t2.t2_end_date) IN (
      SELECT MIN(t2_start_date), MIN(t2_end_date)
        FROM  table_2 t22
      WHERE t2.t2_id = t22.t2_id);
    Edit
    Fixed incomplete code

  • Implementing Pivot Table like functionality using SQL

    Dear All,
    Please access a online document:
    http://docs.google.com/View?docid=dhntd3vh_0gmwgmq
    A 'query-output' is given.
    I have pasted this output in Excel and using it's Pivot table feature
    obtained an output given as 'Expected-Output' in the document.
    How can I achieve this using SQL?
    Any guidelines are most welcome.
    -Sameer

    See if this implementation could satisfy your needings.
         CREATE THE A TABLE WITH ESSENTIAL INFORMATION
    CREATE TABLE THINGS (
         WHO     VARCHAR2(32) NOT NULL,
         WHAT VARCHAR2(32) NOT NULL,
         NUM NUMBER
         FILLING THE ESSENTIAL INFORMATION
    INSERT INTO THINGS VALUES ('AFAS','TRANSACTION',4);
    INSERT INTO THINGS VALUES ('FAS-AP','TRANSACTION',2);
    INSERT INTO THINGS VALUES ('FAS-AR','TRANSACTION',2);               
    INSERT INTO THINGS VALUES ('FAS-GL','MASTER',3);
    INSERT INTO THINGS VALUES ('FAS-GL','REPORT',5);
    INSERT INTO THINGS VALUES ('INTERNATIONAL CARGO','MASTER',1);
    INSERT INTO THINGS VALUES ('INTERNATIONAL CARGO','REPORT',2);
    INSERT INTO THINGS VALUES ('INTERNATIONAL CARGO','TRANSACTION',9);
    INSERT INTO THINGS VALUES ('PACKAGE EXPRESS','INTELLIVIEW REPORT',1);
    INSERT INTO THINGS VALUES ('PACKAGE EXPRESS','MASTER',4);
    INSERT INTO THINGS VALUES ('PACKAGE EXPRESS','TRANSACTION',76);
    INSERT INTO THINGS VALUES ('PACKAGE EXPRESS','UTILITIES',1);
    INSERT INTO THINGS VALUES ('WAREHOUSE','REPORT',1);
    INSERT INTO THINGS VALUES ('WAREHOUSE','TRANSACTION',9);
         CREATE A TABLE FOR THE FULL CORRISPONDENCE
    CREATE TABLE THINGS2 AS
         SELECT A.WHO,B.WHAT, 0 NUM
         FROM (
              SELECT DISTINCT WHO
              FROM THINGS
         ) A, (
              SELECT DISTINCT WHAT
              FROM THINGS
         )B;
         SET THE RIGHT VALUES ON EACH ROW
    UPDATE THINGS2 A
    SET NUM = (
         SELECT NVL(SUM(NUM),0)
         FROM THINGS B
         WHERE ( A.WHO = B.WHO )
              AND ( A.WHAT = B.WHAT )
         SHOW THE FULL TABLE ( FULL BECAUSE IT CONTAINS THE FULL JOIN BETWEEN "WHO" AND "WHAT" )
    SELECT *
    FROM THINGS2
         RETRIVE THE EXPECTED OUTPUT
    SELECT A.WHO,"TRANSACTION","MASTER","INTELLIVIEW REPORT","UTILITIES"
    FROM (
         SELECT WHO,NUM "TRANSACTION"
         FROM THINGS2
         WHERE WHAT = 'TRANSACTION'
    ) A,(
         SELECT WHO,NUM "MASTER"
         FROM THINGS2
         WHERE WHAT = 'MASTER'
         ) B,(
         SELECT WHO,NUM "REPORT"
         FROM THINGS2
         WHERE WHAT = 'REPORT'
         ) C,(
         SELECT WHO,NUM "INTELLIVIEW REPORT"
         FROM THINGS2
         WHERE WHAT = 'INTELLIVIEW REPORT'
         ) D,(
         SELECT WHO,NUM "UTILITIES"
         FROM THINGS2
         WHERE WHAT = 'UTILITIES'
         ) E
    WHERE ( A.WHO = B.WHO )
         AND ( A.WHO = C.WHO )
         AND ( A.WHO = D.WHO )
         AND ( A.WHO = E.WHO );
    Ps.
    Could anybody tell me how is it possible to indent text on the board of this forum?
    Bye Alessandro

  • Change connection from SQL to SSAS for power pivot table

    Hi,
    I have created a power pivot table using MDX query from SSAS. I also created multiple pivot table and other complex reports using this power pivot table. Now I should use a different cube which has almost different columns than the old cube. It would be
    a hassle now to simply change the query and hence redoing the entire report due to column name changes. I was hoping to use the SQL OPENQUERY using linked server to get data from SSAS using MDX to SQL so that I can alias the column names to old. The problem
    now is I cannot change the connection for existing power pivot table to a different provide (sql) from SSAS. Is there anyway I can do this?
    Please let me know if there is any other way that would save me from re-doing the entire report.
    Thanks

    Unfortunately, you can't just repoint the connection currently - you will need to rebuild it. I've run into this myself not too long ago, and the team is aware of the requirement.
    John

  • How to update ADF VO object to refresh the data in ADF Pivot table

    I need to know how to update the View object so that the date in pivot table is refreshed/updated/filtered.
    here are the steps I performed to create ADF pivot table application using VO at design time.
    1) created a collection in a Data Control (ViewObject in an ApplicationModule) that provides the values I wanted to use for row and column labels as well the cell values (Used the SQL query)
    2) Dragged this collection to the page in which wanted to create the pivot table
    3) In the pivot table data binding editor specified the characteristics of the rows (which attribute(s) should be displayed in header), the columns (likewise) and the cells.
    Now, I have a requirement to update/filter the data in pivot table on click of check box and my question is how to I update the View object so that the date in pivot table is refreshed/updated/filtered.
    I have got this solution from one of the contact in which a WHERE clause on an underlying VO is updated based upon input from a Slider control. In essence, the value of the control is sent to a backing bean, and then the backing bean uses this input to call the "filterVO" method on the corresponding AppModule:
    but, I'm getting "operationBinding" object as NULL in following code. Please let me know what's wrong.
    here is the code
    Our slider component will look like
    <af:selectBooleanCheckbox label="Unit" value="#{PivotTableBean.dataValue}"
    autoSubmit="true" />
    The setDataValue() method in the backing bean will get a handle to AM and will execute the "filterVO" method in that, which takes the NumberRange as the input parameter.
    public void setDataValue(boolean value) {
    DataValue = value;
    BindingContainer bindings = getBindings();
    OperationBinding operationBinding = (OperationBinding)bindings.getOperationBinding("filterVO");
    Object result = operationBinding.execute();
    The filterVO method in the AMImpl.java will get the true or false and set the where Clause for the VO query to show values.
    public void filterVO(boolean value) {
    if (value != null) {
    ViewObjectImpl ibVO = getVO1();
    ibVO.setWhereClause("PRODUCT_TOTAL_REVENUE(+) where rownum < 10");
    ibVO.executeQuery();
    }

    Did you define a filterVO action in your pagedef.xml file?
    You might want to read on how to access service method from a JSF Web Application in the ADF Developer Guide for 10.1.3 chapter 8.5

  • Check if refreshing data in pivot table was finished

    Hello guys, 
    This is my first post here so forgive if I'm asking in wrong place. 
    Maybe you can help me or give me some hint how can I check if data in pivot tables refresh event was finished.
    So I'm using excel plugin that allows to load excel spread sheets from external source e.g application server,
    in this reports there are define some pivot tables with olap connections. When report is opened data is automatically refreshed,
    what I'm trying to do is somehow check if this refresh was finished and start manipulating data in c# but I'm not able to check
    if refresh was finished or it's still going.
    I found that query table has refreshing flag which indicates if some query is running. But I'm not able to get to querytable object or  to listobjects object, I'm using excel 2013 and only when I added sql database connection to sheet there was value
    in listobject object but still querytable was empty, 
    What I'm doing wrong ? 
    public void refrestTest()
    Excel.Sheets test= excelApp.ActiveWorkbook.Worksheets;
    foreach (Excel.Worksheet displayWorksheet in test)
    if (displayWorksheet.ListObjects.Count > 0)
    var pp1 = displayWorksheet.ListObjects.get_Item(1).QueryTable.Refreshing;

    Hi,
    This is the forum to discuss questions and feedback for Microsoft Excel, I'll move your question to the MSDN forum for Excel
    http://social.msdn.microsoft.com/Forums/en-US/home?forum=exceldev&filter=alltypes&sort=lastpostdesc
    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.
    George Zhao
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • Removing (blank) from Pivot Tables Populated from Data Connection

    It took me a long while to fix this one (and a long time to search, because it's a funny one to try to use boolean logic for) and I thought I would share because I've seen a score of folks out there looking for this.
    If you have a pivot table with blank values in the row/column area instead of values, Excel automatically populates the cell with (blank).  The word blank shows up in any cell that doesn't have a value, but what if you don't want all those ugly (blank)
    values showing up in your report?
    If you're pulling the data from an outside source, like a SQL server (in my case from the Project Server Reporting database) then you can't just change the source data, so you seem pretty stuck.
    My coworker and I came up with the following fix:
    Select the entire sheet.  Use conditional formatting to find all cells that contain the text (blank).  Then for the format, go to "Number" and "Custom".  In the custom field, enter ;;;.  Apply the conditional formatting and those pesky
    (blank) values turn into real blanks.  This even works when copying pasting the data into another sheet or application.  And if the value changes the next time you refresh your data, the new data appears.
    I found this very valuable in my reporting and just wanted to put it out there for the rest of the community.

    Hi,
    Thank you for sharing your experience and post here.

  • Pivot Table - Calculate Variance - Hidden Fields?

    I need some help adding a target value field inside a pivot table in excel.
    Here is what my current pivot table looks like.
    Regions                  1 year - Actual              1 year - Target??               
    Difference
                       (April 2013 to MArch 2014)                                          
     (Target - Actual)?     
    Region1                $6,355,696.75
    Region2                $6,775,309.87
    Region3                $2,230,424.76
    Regions expand into managers which in turn expand to consultants.
    What I want to do is add a column for target values of the 3 different regions and then create another calculated field that will show the difference between the target and actual values.
    Can this be done without writing any stored procedures in SQL? I want to do this in excel itself.
    The target values are not calculated so can we store them in hidden fields or something in the pivot or excel?

    1. Click anywhere in Pivot and go to Options tab > Formulas > Calculated Field.
    2. Create a calculated field called Target (whatever name your choose). If your target is say 7000000, put this value in Formula field. You may put it with or without =
    3. Now after this, you can once again create a new Calculated Field. Let's say this is Variance. If you variance is Target - Actual, put this as =Target-Actual in Calculated Field.
    4. Your pivot will have whatever you wanted.

  • Excel Pivot Table with Date Hierarchies - query performance degradation

    For the sake of this explanation, I’m going to try and keep it simple. Slicing the data by additional dimensions only makes the issue worse. I’ll keep this description to one fact table and three dimensions. Also, I’m fairly new to SSAS Tabular; I’ve worked
    with SSAS Multidimensional in the past.
    We’ve got a fact table that keeps track of bill pay payments made over time. Currently, we only have about six months of data, with the fact row count at just under 900,000 rows. The grain is daily.
    There is an Account dimension (approx. 460,000 rows), with details about the individual making a payment.
    There is a Payment Category dimension (approx.. 35,000 rows), which essentially groups various Payees into groups which we like to report on: Automobile Loan, Mortgage, Insurance, etc.
    There is the requisite Date dimension  (exactly 62093 rows-more days than we need?), which allows visibility as to what is being paid when.
    Using this DW model, I’ve created a SSAS BISM Tabular model, from which Excel 2010 is ultimately used to perform some analysis, using Pivot Tables. In the tabular model, for easier navigation (doing what I’ve always done in SSAS MultiDimensional), I’ve created
    several Date Hierarchies, Year-Month, Year-Quarter-Month, etc.
    There are currently only two measures defined in the Tabular model: one for the “Sum of PaymentAmount”; one for the “PaymentsProcessed”.
    OK, in Excel 2010, using a Pivot Table, drag the “Sum of PaymentAmount” measure to the Values section, next to/under the PivotTable Field List. Not too exciting, just the grand total of all Payments, for all time.
    Drag the “YearMonth” hierarchy (from the Date dimension) to the “Column Labels” section. After expanding the year hierarchy to see the months, now the totals are for each of the months, for which we have data, for June through November, 2013.
    Drag the “PaymentCategory” (from the Payment Categories dimension) to the “Report Filter” section. Filter accordingly: We just want to see the monthly totals for “Automobile Loans”.
    Now, some details. Drag the “AccountSK” (hiding the actual account numbers) to the “Row Labels” section. This shows all accounts that have made Automobile Loan payments over the last six months, showing the actual payment amounts.
    So far, so good. Remember, I’m using a Date Hierarchy here, in this case “YearMonth”
    Now, if any of the other attributes on the Account dimension table, say “CreditScore”, or “LongName”, are subsequently dragged over to the “Row Lables” section, under the “AccountSK”, the results will never come back, before timing out or by giving up and
    pressing ESCape!
    If this exact scenario is done by removing the Date Hierarchy, “YearMonth” from the “Column Labels” and replace it with “Year” and “MonthName” attributes from the Date dimension, these fields not being in any sort of hierarchy, adding an additional “Account”
    attribute does not cause any substantial delay.
    What I’m trying to find out is why is this happening? Is there anything I can do as a work around, other than what I’ve done by not using a Date Hierarchy? Is this a known issue with DAX and the query conversion to MDX? Something else?
    I’ve done a SQL Profiler trace, but I’m not sure at this point what it all means. In the MDX query there is a CrossJoin involved. There are also numerous VertiPaq Scans which seems to be going through each and every AccountSK in the Account dimension, not
    just the ones filtered, to get an additional attribute (About 3,600 accounts which are “Automobile Loan” payments.).
    Any thoughts?
    Thanks! Happy Holidays!
    AAO

    Thanks for your reply Marco. I've been reading your book, too, getting into Tabular.
    I've set up the Excel Pivot Table using either the Year/MonthName levels, or the YearMonth hierarchy and then adding the additional attribute for the CreditScore.
    Incidentally, when using the YearMonth hierarchy and adding the CreditScore, all is well, if the Year has not been "opened". When this is done, I suspect the same thing is going on.
    From SQL Profiler, each of the individual MDX queries below (formatted a bit for readability).
    Thanks!
    // MDX query using separate Year and MonthName levels, NO hierarchy.
    SELECT 
    NON EMPTY 
    Hierarchize(
    DrilldownMember(
    CrossJoin(
    {[Date].[Year].[All],[Date].[Year].[Year].AllMembers}, 
    {([Date].[MonthName].[All])}
    ,[Date].[Year].[Year].AllMembers, [Date].[MonthName]
    DIMENSION PROPERTIES PARENT_UNIQUE_NAME,HIERARCHY_UNIQUE_NAME 
    ON COLUMNS, 
    NON EMPTY 
    Hierarchize(
    DrilldownMember(
    CrossJoin(
    {[Accounts].[AccountSK].[All],[Accounts].[AccountSK].[AccountSK].AllMembers}, 
    {([Accounts].[CreditScore].[All])}
    ,[Accounts].[AccountSK].[AccountSK].AllMembers, [Accounts].[CreditScore]
    DIMENSION PROPERTIES PARENT_UNIQUE_NAME,HIERARCHY_UNIQUE_NAME 
    ON ROWS  
    FROM [PscuPrototype] 
    WHERE ([PaymentCategories].[PaymentCategory].&[Automobile Loan],[Measures].[Sum of PaymentAmount]) 
    CELL PROPERTIES VALUE, FORMAT_STRING, LANGUAGE, BACK_COLOR, FORE_COLOR, FONT_FLAGS
    // MDX query using separate YearMonth hierarchy (Year, MonthName).
    SELECT 
    NON EMPTY 
    Hierarchize(
    DrilldownMember(
    {{DrilldownLevel({[Date].[YearMonth].[All]},,,INCLUDE_CALC_MEMBERS)}}, 
    {[Date].[YearMonth].[Year].&[2013]},,,INCLUDE_CALC_MEMBERS
    DIMENSION PROPERTIES PARENT_UNIQUE_NAME,HIERARCHY_UNIQUE_NAME 
    ON COLUMNS,
    NON EMPTY 
    Hierarchize(
    DrilldownMember(
    CrossJoin(
    {[Accounts].[AccountSK].[All],[Accounts].[AccountSK].[AccountSK].AllMembers}, 
    {([Accounts].[CreditScore].[All])}
    ,[Accounts].[AccountSK].[AccountSK].AllMembers, [Accounts].[CreditScore]
    DIMENSION PROPERTIES PARENT_UNIQUE_NAME,HIERARCHY_UNIQUE_NAME 
    ON ROWS  
    FROM [PscuPrototype] 
    WHERE ([PaymentCategories].[PaymentCategory].&[Automobile Loan],[Measures].[Sum of PaymentAmount]) 
    CELL PROPERTIES VALUE, FORMAT_STRING, LANGUAGE, BACK_COLOR, FORE_COLOR, FONT_FLAGS
    AAO

  • Pivot and dynamic SQL

    Hi Team,
    I need to write a SQL to cater the requirements. Below is my requirements:
    pagename fieldname fieldvalue account_number consumerID
    AFAccountUpdate ArrangementsBroken dfsdff 1234 1234
    AFAccountUpdate ArrangementsBroken1 dfsdff 1234 1234
    AFAccountUpdate ArrangementsBroken2 dfsdff 1234 1234
    AFAccountUpdate ArrangementsBroken2 dfsdff 12345 12345
    AFAccountUpdate ArrangementsBroken1 addf 12345 12345
    Create table test_pivot_dynamic
    pagename varchar(200),
    fieldname Varchar(200),
    fieldvalue varchar(500),
    N9_Router_Account_Number bigint,
    TC_Debt_Item_Reference bigint
    --Input
    insert into test_pivot_dynamic Values('AFAccountUpdate','ArrangementsBroken','addf',1234,1234)
    insert into test_pivot_dynamic Values('AFAccountUpdate','ArrangementsBroken1','dfsdff',1234,1234)
    insert into test_pivot_dynamic Values('AFAccountUpdate','ArrangementsBroken2','fder',1234,1234)
    insert into test_pivot_dynamic Values('AFAccountUpdate','ArrangementsBroken2','dfdfs',12345,12345)
    insert into test_pivot_dynamic Values('AFAccountUpdate','ArrangementsBroken1','dfdwe',12345,12345)
    insert into test_pivot_dynamic Values('AFAccountUpdate1','Arrangements','addf',1234,1234)
    insert into test_pivot_dynamic Values('AFAccountUpdate1','Test1','dfsdff',1234,1234)
    --Expected output:
    Select 1234,1234,'AFAccountUpdate','ArrangementsBroken','addf','ArrangementsBroken1','dfsdff','ArrangementsBroken2','fder','ArrangementsBroken2','fder'
    Select 12345,12345,'AFAccountUpdate','ArrangementsBroken','addf','ArrangementsBroken1','dfdwe','ArrangementsBroken2','dfdfs'
    Select 1234,1234,'AFAccountUpdate1','Arrangements','addf','Test1','dfsdff'
    so basically we have to pivot and dynamic sql and insert the expected output to a common table which will have all the required fields
    Thanks,Ram.
    Please don't forget to Marked as Answer if my post solved your problem and use Vote As Helpful if a post was useful. It will helpful to other users.

    This should give you what you're looking for
    SELECT N9_Router_Account_Number,TC_Debt_Item_Reference,PageName,
    MAX(CASE WHEN SEQ = 1 THEN fieldname END) AS fieldname1,
    MAX(CASE WHEN SEQ = 1 THEN fieldvalue END) AS fieldvalue1,
    MAX(CASE WHEN SEQ = 2 THEN fieldname END) AS fieldname2,
    MAX(CASE WHEN SEQ = 2 THEN fieldvalue END) AS fieldvalue2,
    MAX(CASE WHEN SEQ = 3 THEN fieldname END) AS fieldname3,
    MAX(CASE WHEN SEQ = 3 THEN fieldvalue END) AS fieldvalue3,
    MAX(CASE WHEN SEQ = 4 THEN fieldname END) AS fieldname4,
    MAX(CASE WHEN SEQ = 4 THEN fieldvalue END) AS fieldvalue4
    FROM
    SELECT *,ROW_NUMBER() OVER (PARTITION BY N9_Router_Account_Number,TC_Debt_Item_Reference,PageName ORDER BY PageName) AS SEQ,*
    FROM test_pivot_dynamic
    )t
    GROUP BY N9_Router_Account_Number,TC_Debt_Item_Reference,PageName
    To make it dynamic see
     http://www.beyondrelational.com/modules/2/blogs/70/posts/10791/dynamic-crosstab-with-multiple-pivot-columns.aspx
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Data is not coming in pivot table

    Hi,
    i made a request using some measures,month (time) and some other columns but data is not coming when i m working on pivot table though its working in case of table and graph.
    please help me out..
    thanks

    Hi,
    well data is populating in tables and chart in Oracle BI and i also executed the same query in sql server 2005 and got the desired result.
    the reason to show the results into pivot table is -- i want to show the result(measures) with time dimension and some other dimensions so i have to use this pivot table or if u have some other solution please let me know...
    thanks
    Edited by: user629711 on Nov 20, 2008 11:42 PM

  • BI Publisher Template Builder for Word 10.1.3.4.1 and Creating Pivot Table

    I'm new to BI (XML) Publisher and Pivot Tables.  I have XDO Engine version 5.6.3 and Template builder 10.1.3.4.1.  I creates a Word 2010 RTF template containing a pivot table.  When I preview in Word, it displays.  When I execute the Concurrent Request in Oracle 11, it ends with an error.
    I see this error in the log.  I'm assuming I forgot to do something or did it incorrectly.
    Caused by: oracle.xdo.parser.v2.XPathException: Namespace prefix 'crosstab' used but not declared.
    What am I doing incorrectly?  How do I resolve?
    The log follows:
    [8/20/13 1:17:19 AM] [main] Starting GSF service with concurrent process id = 276776.
    [8/20/13 1:17:19 AM] [main] Initialization Parameters: oracle.apps.fnd.cp.opp.OPPServiceThread:2:0:max_threads=5
    [8/20/13 1:17:20 AM] [Thread-21] Service thread starting up.
    [8/20/13 1:17:20 AM] [Thread-22] Service thread starting up.
    [8/20/13 7:51:58 AM] [OPPServiceThread0] Post-processing request 50656205.
    [8/20/13 7:51:58 AM] [276776:RT50656205] Executing post-processing actions for request 50656205.
    [8/20/13 7:51:58 AM] [276776:RT50656205] Starting XML Publisher post-processing action.
    [8/20/13 7:51:58 AM] [276776:RT50656205]
    Template code: Test_Head_Count
    Template app:  CPER
    Language:      en
    Territory:     00
    Output type:   null
    [082013_075159593][][EXCEPTION] [DEBUG] ------- Preferences defined PreferenceStore -------
    [082013_075159594][][EXCEPTION] [DEBUG] ------- Environment variables stored in EnvironmentStore -------
    [082013_075159594][][EXCEPTION] [DEBUG]  [FND_JDBC_IDLE_THRESHOLD.LOW]:[-1]
    [082013_075159594][][EXCEPTION] [DEBUG]  [SECURITY_GROUP_ID]:[0]
    [082013_075159595][][EXCEPTION] [DEBUG]  [FND_JDBC_BUFFER_DECAY_INTERVAL]:[300]
    [082013_075159595][][EXCEPTION] [DEBUG]  [NLS_CHARACTERSET]:[UTF8]
    [082013_075159596][][EXCEPTION] [DEBUG]  [RESP_APPL_ID]:[-1]
    [082013_075159596][][EXCEPTION] [DEBUG]  [NLS_LANGUAGE]:[AMERICAN]
    [082013_075159596][][EXCEPTION] [DEBUG]  [FND_JDBC_BUFFER_MIN]:[1]
    [082013_075159596][][EXCEPTION] [DEBUG]  [FND_JDBC_BUFFER_MAX]:[2]
    [082013_075159596][][EXCEPTION] [DEBUG]  [NLS_NUMERIC_CHARACTERS]:[.,]
    [082013_075159596][][EXCEPTION] [DEBUG]  [APPS_JDBC_URL]:[jdbc:oracle:thin:@(DESCRIPTION=(LOAD_BALANCE=YES)(FAILOVER=YES)(ADDRESS_LIST=(ADDRESS=(PROTOCOL=tcp)(HOST=dtw-oadevdb.nasa.cpwr.corp)(PORT=1554)))(CONNECT_DATA=(SERVICE_NAME=udv1)))]
    [082013_075159596][][EXCEPTION] [DEBUG]  [RESP_ID]:[-1]
    [082013_075159596][][EXCEPTION] [DEBUG]  [FND_MAX_JDBC_CONNECTIONS]:[500]
    [082013_075159596][][EXCEPTION] [DEBUG]  [FND_JDBC_USABLE_CHECK]:[false]
    [082013_075159596][][EXCEPTION] [DEBUG]  [USER_ID]:[-1]
    [082013_075159596][][EXCEPTION] [DEBUG]  [NLS_TERRITORY]:[AMERICA]
    [082013_075159596][][EXCEPTION] [DEBUG]  [FND_JDBC_PLSQL_RESET]:[false]
    [082013_075159596][][EXCEPTION] [DEBUG]  [FND_JDBC_CONTEXT_CHECK]:[true]
    [082013_075159597][][EXCEPTION] [DEBUG]  [NLS_DATE_FORMAT]:[DD-MON-RR]
    [082013_075159597][][EXCEPTION] [DEBUG]  [FND_JDBC_BUFFER_DECAY_SIZE]:[5]
    [082013_075159597][][EXCEPTION] [DEBUG]  [FND_JDBC_IDLE_THRESHOLD.HIGH]:[-1]
    [082013_075159597][][EXCEPTION] [DEBUG]  [NLS_SORT]:[BINARY]
    [082013_075159597][][EXCEPTION] [DEBUG]  [NLS_DATE_LANGUAGE]:[AMERICAN]
    [082013_075159597][][EXCEPTION] [DEBUG]  [LOGIN_ID]:[-1]
    [082013_075159597][][EXCEPTION] [DEBUG] ------- Properties stored in Java System Properties -------
    [082013_075159597][][EXCEPTION] [DEBUG]  [APPLTMP]:[/oracle/appl/udv1comn/temp]
    [082013_075159597][][EXCEPTION] [DEBUG]  [java.runtime.name]:[Java(TM) SE Runtime Environment]
    [082013_075159597][][EXCEPTION] [DEBUG]  [sun.boot.library.path]:[/oracle/appl/jdk1.6.0_24/jre/lib/sparc]
    [082013_075159597][][EXCEPTION] [DEBUG]  [java.vm.version]:[19.1-b02]
    [082013_075159597][][EXCEPTION] [DEBUG]  [OVERRIDE_DBC]:[true]
    [082013_075159598][][EXCEPTION] [DEBUG]  [dbcfile]:[/oracle/appl/udv1appl/fnd/11.5.0/secure/dtw-oadevdb_udv1.dbc]
    [082013_075159598][][EXCEPTION] [DEBUG]  [java.vm.vendor]:[Sun Microsystems Inc.]
    [082013_075159598][][EXCEPTION] [DEBUG]  [java.vendor.url]:[http://java.sun.com/]
    [082013_075159598][][EXCEPTION] [DEBUG]  [path.separator]:[:]
    [082013_075159598][][EXCEPTION] [DEBUG]  [APPLCSF]:[/oracle/appl/udv1comn/admin]
    [082013_075159598][][EXCEPTION] [DEBUG]  [java.vm.name]:[Java HotSpot(TM) Server VM]
    [082013_075159598][][EXCEPTION] [DEBUG]  [file.encoding.pkg]:[sun.io]
    [082013_075159598][][EXCEPTION] [DEBUG]  [sun.java.launcher]:[SUN_STANDARD]
    [082013_075159598][][EXCEPTION] [DEBUG]  [sun.os.patch.level]:[unknown]
    [082013_075159598][][EXCEPTION] [DEBUG]  [java.vm.specification.name]:[Java Virtual Machine Specification]
    [082013_075159598][][EXCEPTION] [DEBUG]  [user.dir]:[/oracle/appl/udv1comn/admin/log/udv1_dtw-oadevdb]
    [082013_075159598][][EXCEPTION] [DEBUG]  [java.runtime.version]:[1.6.0_24-b07]
    [082013_075159598][][EXCEPTION] [DEBUG]  [java.awt.graphicsenv]:[sun.awt.X11GraphicsEnvironment]
    [082013_075159599][][EXCEPTION] [DEBUG]  [java.endorsed.dirs]:[/oracle/appl/jdk1.6.0_24/jre/lib/endorsed]
    [082013_075159599][][EXCEPTION] [DEBUG]  [os.arch]:[sparc]
    [082013_075159599][][EXCEPTION] [DEBUG]  [JTFDBCFILE]:[/oracle/appl/udv1appl/fnd/11.5.0/secure/dtw-oadevdb_udv1.dbc]
    [082013_075159599][][EXCEPTION] [DEBUG]  [java.io.tmpdir]:[/var/tmp/]
    [082013_075159599][][EXCEPTION] [DEBUG]  [line.separator]:[
    [082013_075159599][][EXCEPTION] [DEBUG]  [java.vm.specification.vendor]:[Sun Microsystems Inc.]
    [082013_075159599][][EXCEPTION] [DEBUG]  [os.name]:[SunOS]
    [082013_075159599][][EXCEPTION] [DEBUG]  [FND_JDBC_BUFFER_MIN]:[1]
    [082013_075159599][][EXCEPTION] [DEBUG]  [cpid]:[276776]
    [082013_075159599][][EXCEPTION] [DEBUG]  [sun.jnu.encoding]:[ISO646-US]
    [082013_075159599][][EXCEPTION] [DEBUG]  [java.library.path]:[/oracle/appl/jdk1.6.0_24/jre/lib/sparc/server:/oracle/appl/jdk1.6.0_24/jre/lib/sparc:/oracle/appl/jdk1.6.0_24/jre/../lib/sparc:/oracle/appl/udv1ora/iAS/lib:/oracle/appl/udv1ora/8.0.6/network/jre11/lib/sparc/native_threads:/oracle/appl/udv1appl/cz/11.5.0/bin:/oracle/appl/udv1ora/8.0.6/lib:/usr/dt/lib:/usr/openwin/lib:/usr/jdk/packages/lib/sparc:/lib:/usr/lib]
    [082013_075159599][][EXCEPTION] [DEBUG]  [java.specification.name]:[Java Platform API Specification]
    [082013_075159599][][EXCEPTION] [DEBUG]  [java.class.version]:[50.0]
    [082013_075159600][][EXCEPTION] [DEBUG]  [sun.management.compiler]:[HotSpot Tiered Compilers]
    [082013_075159600][][EXCEPTION] [DEBUG]  [os.version]:[5.10]
    [082013_075159600][][EXCEPTION] [DEBUG]  [LONG_RUNNING_JVM]:[true]
    [082013_075159600][][EXCEPTION] [DEBUG]  [user.home]:[/oracle/home/applmgr]
    [082013_075159600][][EXCEPTION] [DEBUG]  [user.timezone]:[US/Eastern]
    [082013_075159600][][EXCEPTION] [DEBUG]  [java.awt.printerjob]:[sun.print.PSPrinterJob]
    [082013_075159600][][EXCEPTION] [DEBUG]  [file.encoding]:[ISO646-US]
    [082013_075159600][][EXCEPTION] [DEBUG]  [java.specification.version]:[1.6]
    [082013_075159600][][EXCEPTION] [DEBUG]  [CACHEMODE]:[DISTRIBUTED]
    [082013_075159600][][EXCEPTION] [DEBUG]  [java.class.path]:[/oracle/appl/j2sdk1624/jre/lib/rt.jar:/oracle/appl/j2sdk1624/lib/dt.jar:/oracle/appl/j2sdk1624/lib/tools.jar:/oracle/appl/j2sdk1624/jre/lib/charsets.jar:/oracle/appl/udv1comn/java/appsborg2.zip:/oracle/appl/udv1ora/8.0.6/forms60/java:/oracle/appl/udv1comn/java]
    [082013_075159600][][EXCEPTION] [DEBUG]  [user.name]:[applmgr]
    [082013_075159600][][EXCEPTION] [DEBUG]  [DBCFILE]:[/oracle/appl/udv1appl/fnd/11.5.0/secure/dtw-oadevdb_udv1.dbc]
    [082013_075159601][][EXCEPTION] [DEBUG]  [java.vm.specification.version]:[1.0]
    [082013_075159601][][EXCEPTION] [DEBUG]  [java.home]:[/oracle/appl/jdk1.6.0_24/jre]
    [082013_075159601][][EXCEPTION] [DEBUG]  [sun.arch.data.model]:[32]
    [082013_075159601][][EXCEPTION] [DEBUG]  [user.language]:[en]
    [082013_075159601][][EXCEPTION] [DEBUG]  [java.specification.vendor]:[Sun Microsystems Inc.]
    [082013_075159601][][EXCEPTION] [DEBUG]  [java.vm.info]:[mixed mode]
    [082013_075159601][][EXCEPTION] [DEBUG]  [logfile]:[/oracle/appl/udv1comn/admin/log/udv1_dtw-oadevdb/FNDOPP276776.txt]
    [082013_075159601][][EXCEPTION] [DEBUG]  [java.version]:[1.6.0_24]
    [082013_075159601][][EXCEPTION] [DEBUG]  [java.ext.dirs]:[/oracle/appl/jdk1.6.0_24/jre/lib/ext:/usr/jdk/packages/lib/ext]
    [082013_075159601][][EXCEPTION] [DEBUG]  [sun.boot.class.path]:[/oracle/appl/jdk1.6.0_24/jre/lib/resources.jar:/oracle/appl/jdk1.6.0_24/jre/lib/rt.jar:/oracle/appl/jdk1.6.0_24/jre/lib/sunrsasign.jar:/oracle/appl/jdk1.6.0_24/jre/lib/jsse.jar:/oracle/appl/jdk1.6.0_24/jre/lib/jce.jar:/oracle/appl/jdk1.6.0_24/jre/lib/charsets.jar:/oracle/appl/jdk1.6.0_24/jre/lib/modules/jdk.boot.jar:/oracle/appl/jdk1.6.0_24/jre/classes]
    [082013_075159601][][EXCEPTION] [DEBUG]  [java.vendor]:[Sun Microsystems Inc.]
    [082013_075159601][][EXCEPTION] [DEBUG]  [FND_JDBC_BUFFER_MAX]:[2]
    [082013_075159601][][EXCEPTION] [DEBUG]  [file.separator]:[/]
    [082013_075159602][][EXCEPTION] [DEBUG]  [java.vendor.url.bug]:[http://java.sun.com/cgi-bin/bugreport.cgi]
    [082013_075159602][][EXCEPTION] [DEBUG]  [sun.io.unicode.encoding]:[UnicodeBig]
    [082013_075159602][][EXCEPTION] [DEBUG]  [sun.cpu.endian]:[big]
    [082013_075159602][][EXCEPTION] [DEBUG]  [APPLOUT]:[out/udv1_dtw-oadevdb]
    [082013_075159602][][EXCEPTION] [DEBUG]  [sun.cpu.isalist]:[]
    BI Beans Graph version [3.1.0.82]
    Tue Aug 20 07:52:06 EDT 2013 PROBLEM: In oracle.dss.graph.Graph::createLocalGridDataSource: no column labels: column index 0
    Tue Aug 20 07:52:06 EDT 2013 TRACE: In oracle.dss.graph.GraphModelAdapter::setSupportedDataLayerFlags (): Current DataSource does not support requested type: MetadataMap.METADATA_DRILLSTATE
    Tue Aug 20 07:52:06 EDT 2013 TRACE: In oracle.dss.graph.GraphModelAdapter::setSupportedDataLayerFlags (): Current DataSource does not support requested type: MetadataMap.METADATA_VALUE
    Tue Aug 20 07:52:06 EDT 2013 TRACE: In oracle.dss.graph.GraphModelAdapter::setSupportedDataLayerFlags (): Current DataSource does not support requested type: LayerMetadata.LAYER_METADATA_NAME
    Tue Aug 20 07:52:06 EDT 2013 PROBLEM: In oracle.dss.graph.BILabelLayout::logTruncatedError: legend text truncated
    BI Beans Graph version [3.1.0.82]
    Tue Aug 20 07:52:07 EDT 2013 PROBLEM: In oracle.dss.graph.Graph::createLocalGridDataSource: no column labels: column index 0
    Tue Aug 20 07:52:07 EDT 2013 TRACE: In oracle.dss.graph.GraphModelAdapter::setSupportedDataLayerFlags (): Current DataSource does not support requested type: MetadataMap.METADATA_DRILLSTATE
    Tue Aug 20 07:52:07 EDT 2013 TRACE: In oracle.dss.graph.GraphModelAdapter::setSupportedDataLayerFlags (): Current DataSource does not support requested type: MetadataMap.METADATA_VALUE
    Tue Aug 20 07:52:07 EDT 2013 TRACE: In oracle.dss.graph.GraphModelAdapter::setSupportedDataLayerFlags (): Current DataSource does not support requested type: LayerMetadata.LAYER_METADATA_NAME
    Tue Aug 20 07:52:07 EDT 2013 PROBLEM: In oracle.dss.graph.BILabelLayout::logTruncatedError: legend text truncated
    BI Beans Graph version [3.1.0.82]
    Tue Aug 20 07:52:07 EDT 2013 PROBLEM: In oracle.dss.graph.Graph::createLocalGridDataSource: no column labels: column index 0
    Tue Aug 20 07:52:07 EDT 2013 TRACE: In oracle.dss.graph.GraphModelAdapter::setSupportedDataLayerFlags (): Current DataSource does not support requested type: MetadataMap.METADATA_DRILLSTATE
    Tue Aug 20 07:52:07 EDT 2013 TRACE: In oracle.dss.graph.GraphModelAdapter::setSupportedDataLayerFlags (): Current DataSource does not support requested type: MetadataMap.METADATA_VALUE
    Tue Aug 20 07:52:07 EDT 2013 TRACE: In oracle.dss.graph.GraphModelAdapter::setSupportedDataLayerFlags (): Current DataSource does not support requested type: LayerMetadata.LAYER_METADATA_NAME
    BI Beans Graph version [3.1.0.82]
    Tue Aug 20 07:52:08 EDT 2013 TRACE: In oracle.dss.graph.GraphModelAdapter::setSupportedDataLayerFlags (): Current DataSource does not support requested type: MetadataMap.METADATA_DRILLSTATE
    Tue Aug 20 07:52:08 EDT 2013 TRACE: In oracle.dss.graph.GraphModelAdapter::setSupportedDataLayerFlags (): Current DataSource does not support requested type: MetadataMap.METADATA_VALUE
    Tue Aug 20 07:52:08 EDT 2013 TRACE: In oracle.dss.graph.GraphModelAdapter::setSupportedDataLayerFlags (): Current DataSource does not support requested type: LayerMetadata.LAYER_METADATA_NAME
    BI Beans Graph version [3.1.0.82]
    Tue Aug 20 07:52:08 EDT 2013 TRACE: In oracle.dss.graph.GraphModelAdapter::setSupportedDataLayerFlags (): Current DataSource does not support requested type: MetadataMap.METADATA_DRILLSTATE
    Tue Aug 20 07:52:08 EDT 2013 TRACE: In oracle.dss.graph.GraphModelAdapter::setSupportedDataLayerFlags (): Current DataSource does not support requested type: MetadataMap.METADATA_VALUE
    Tue Aug 20 07:52:08 EDT 2013 TRACE: In oracle.dss.graph.GraphModelAdapter::setSupportedDataLayerFlags (): Current DataSource does not support requested type: LayerMetadata.LAYER_METADATA_NAME
    [8/20/13 7:52:17 AM] [UNEXPECTED] [276776:RT50656205] java.sql.SQLException: ORA-01400: cannot insert NULL into ("APPLSYS"."FND_CONC_REQ_OUTPUTS"."FILE_TYPE")
      at oracle.apps.fnd.cp.opp.XMLPublisherProcessor.updateOutputTable(XMLPublisherProcessor.java:516)
      at oracle.apps.fnd.cp.opp.XMLPublisherProcessor.process(XMLPublisherProcessor.java:329)
      at oracle.apps.fnd.cp.opp.OPPRequestThread.run(OPPRequestThread.java:157)
    [8/20/13 7:52:17 AM] [276776:RT50656205] Completed post-processing actions for request 50656205.
    [8/20/13 8:46:00 AM] [OPPServiceThread1] Post-processing request 50656325.
    [8/20/13 8:46:00 AM] [276776:RT50656325] Executing post-processing actions for request 50656325.
    [8/20/13 8:46:00 AM] [276776:RT50656325] Starting XML Publisher post-processing action.
    [8/20/13 8:46:00 AM] [276776:RT50656325]
    Template code: Test_Head_Count
    Template app:  CPER
    Language:      en
    Territory:     00
    Output type:   null
    [8/20/13 8:46:01 AM] [UNEXPECTED] [276776:RT50656325] java.lang.reflect.InvocationTargetException
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at oracle.apps.xdo.common.xml.XSLT10gR1.invokeNewXSLStylesheet(XSLT10gR1.java:607)
      at oracle.apps.xdo.common.xml.XSLT10gR1.transform(XSLT10gR1.java:235)
      at oracle.apps.xdo.common.xml.XSLTWrapper.transform(XSLTWrapper.java:182)
      at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:1044)
      at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:997)
      at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:212)
      at oracle.apps.xdo.template.FOProcessor.createFO(FOProcessor.java:1665)
      at oracle.apps.xdo.template.FOProcessor.generate(FOProcessor.java:975)
      at oracle.apps.xdo.oa.schema.server.TemplateHelper.runProcessTemplate(TemplateHelper.java:5926)
      at oracle.apps.xdo.oa.schema.server.TemplateHelper.processTemplate(TemplateHelper.java:3458)
      at oracle.apps.xdo.oa.schema.server.TemplateHelper.processTemplate(TemplateHelper.java:3547)
      at oracle.apps.fnd.cp.opp.XMLPublisherProcessor.process(XMLPublisherProcessor.java:290)
      at oracle.apps.fnd.cp.opp.OPPRequestThread.run(OPPRequestThread.java:157)
    Caused by: oracle.xdo.parser.v2.XPathException: Namespace prefix 'crosstab' used but not declared.
      at oracle.xdo.parser.v2.XSLProcessor.reportException(XSLProcessor.java:806)
      at oracle.xdo.parser.v2.XSLProcessor.newXSLStylesheet(XSLProcessor.java:571)
      ... 17 more
    [8/20/13 8:46:01 AM] [276776:RT50656325] Completed post-processing actions for request 50656325.
    [8/20/13 9:15:08 AM] [OPPServiceThread0] Post-processing request 50656367.
    [8/20/13 9:15:08 AM] [276776:RT50656367] Executing post-processing actions for request 50656367.
    [8/20/13 9:15:08 AM] [276776:RT50656367] Starting XML Publisher post-processing action.
    [8/20/13 9:15:08 AM] [276776:RT50656367]
    Template code: Test_Head_Count
    Template app:  CPER
    Language:      en
    Territory:     00
    Output type:   PDF
    [8/20/13 9:15:09 AM] [UNEXPECTED] [276776:RT50656367] java.lang.reflect.InvocationTargetException
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at oracle.apps.xdo.common.xml.XSLT10gR1.invokeNewXSLStylesheet(XSLT10gR1.java:607)
      at oracle.apps.xdo.common.xml.XSLT10gR1.transform(XSLT10gR1.java:235)
      at oracle.apps.xdo.common.xml.XSLTWrapper.transform(XSLTWrapper.java:182)
      at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:1044)
      at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:997)
      at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:212)
      at oracle.apps.xdo.template.FOProcessor.createFO(FOProcessor.java:1665)
      at oracle.apps.xdo.template.FOProcessor.generate(FOProcessor.java:975)
      at oracle.apps.xdo.oa.schema.server.TemplateHelper.runProcessTemplate(TemplateHelper.java:5926)
      at oracle.apps.xdo.oa.schema.server.TemplateHelper.processTemplate(TemplateHelper.java:3458)
      at oracle.apps.xdo.oa.schema.server.TemplateHelper.processTemplate(TemplateHelper.java:3547)
      at oracle.apps.fnd.cp.opp.XMLPublisherProcessor.process(XMLPublisherProcessor.java:290)
      at oracle.apps.fnd.cp.opp.OPPRequestThread.run(OPPRequestThread.java:157)
    Caused by: oracle.xdo.parser.v2.XPathException: Namespace prefix 'crosstab' used but not declared.
      at oracle.xdo.parser.v2.XSLProcessor.reportException(XSLProcessor.java:806)
      at oracle.xdo.parser.v2.XSLProcessor.newXSLStylesheet(XSLProcessor.java:571)
      ... 17 more
    [8/20/13 9:15:09 AM] [276776:RT50656367] Completed post-processing actions for request 50656367.
    [8/20/13 9:17:06 AM] [OPPServiceThread0] Post-processing request 50656369.
    [8/20/13 9:17:06 AM] [276776:RT50656369] Executing post-processing actions for request 50656369.
    [8/20/13 9:17:06 AM] [276776:RT50656369] Starting XML Publisher post-processing action.
    [8/20/13 9:17:06 AM] [276776:RT50656369]
    Template code: Test_Head_Count
    Template app:  CPER
    Language:      en
    Territory:     00
    Output type:   PDF
    [8/20/13 9:17:07 AM] [UNEXPECTED] [276776:RT50656369] java.lang.reflect.InvocationTargetException
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at oracle.apps.xdo.common.xml.XSLT10gR1.invokeNewXSLStylesheet(XSLT10gR1.java:607)
      at oracle.apps.xdo.common.xml.XSLT10gR1.transform(XSLT10gR1.java:235)
      at oracle.apps.xdo.common.xml.XSLTWrapper.transform(XSLTWrapper.java:182)
      at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:1044)
      at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:997)
      at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:212)
      at oracle.apps.xdo.template.FOProcessor.createFO(FOProcessor.java:1665)
      at oracle.apps.xdo.template.FOProcessor.generate(FOProcessor.java:975)
      at oracle.apps.xdo.oa.schema.server.TemplateHelper.runProcessTemplate(TemplateHelper.java:5926)
      at oracle.apps.xdo.oa.schema.server.TemplateHelper.processTemplate(TemplateHelper.java:3458)
      at oracle.apps.xdo.oa.schema.server.TemplateHelper.processTemplate(TemplateHelper.java:3547)
      at oracle.apps.fnd.cp.opp.XMLPublisherProcessor.process(XMLPublisherProcessor.java:290)
      at oracle.apps.fnd.cp.opp.OPPRequestThread.run(OPPRequestThread.java:157)
    Caused by: oracle.xdo.parser.v2.XPathException: Namespace prefix 'crosstab' used but not declared.
      at oracle.xdo.parser.v2.XSLProcessor.reportException(XSLProcessor.java:806)
      at oracle.xdo.parser.v2.XSLProcessor.newXSLStylesheet(XSLProcessor.java:571)
      ... 17 more
    [8/20/13 9:17:07 AM] [276776:RT50656369] Completed post-processing actions for request 50656369.
    [8/20/13 9:22:38 AM] [OPPServiceThread1] Post-processing request 50656370.
    [8/20/13 9:22:38 AM] [276776:RT50656370] Executing post-processing actions for request 50656370.
    [8/20/13 9:22:38 AM] [276776:RT50656370] Starting XML Publisher post-processing action.
    [8/20/13 9:22:38 AM] [276776:RT50656370]
    Template code: Test_Head_Count
    Template app:  CPER
    Language:      en
    Territory:     00
    Output type:   PDF
    [8/20/13 9:22:38 AM] [UNEXPECTED] [276776:RT50656370] java.lang.reflect.InvocationTargetException
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at oracle.apps.xdo.common.xml.XSLT10gR1.invokeNewXSLStylesheet(XSLT10gR1.java:607)
      at oracle.apps.xdo.common.xml.XSLT10gR1.transform(XSLT10gR1.java:235)
      at oracle.apps.xdo.common.xml.XSLTWrapper.transform(XSLTWrapper.java:182)
      at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:1044)
      at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:997)
      at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:212)
      at oracle.apps.xdo.template.FOProcessor.createFO(FOProcessor.java:1665)
      at oracle.apps.xdo.template.FOProcessor.generate(FOProcessor.java:975)
      at oracle.apps.xdo.oa.schema.server.TemplateHelper.runProcessTemplate(TemplateHelper.java:5926)
      at oracle.apps.xdo.oa.schema.server.TemplateHelper.processTemplate(TemplateHelper.java:3458)
      at oracle.apps.xdo.oa.schema.server.TemplateHelper.processTemplate(TemplateHelper.java:3547)
      at oracle.apps.fnd.cp.opp.XMLPublisherProcessor.process(XMLPublisherProcessor.java:290)
      at oracle.apps.fnd.cp.opp.OPPRequestThread.run(OPPRequestThread.java:157)
    Caused by: oracle.xdo.parser.v2.XPathException: Namespace prefix 'crosstab' used but not declared.
      at oracle.xdo.parser.v2.XSLProcessor.reportException(XSLProcessor.java:806)
      at oracle.xdo.parser.v2.XSLProcessor.newXSLStylesheet(XSLProcessor.java:571)
      ... 17 more
    [8/20/13 9:22:38 AM] [276776:RT50656370] Completed post-processing actions for request 50656370.
    [8/20/13 9:24:46 AM] [OPPServiceThread0] Post-processing request 50656371.
    [8/20/13 9:24:46 AM] [276776:RT50656371] Executing post-processing actions for request 50656371.
    [8/20/13 9:24:46 AM] [276776:RT50656371] Starting XML Publisher post-processing action.
    [8/20/13 9:24:46 AM] [276776:RT50656371]
    Template code: Test_Head_Count
    Template app:  CPER
    Language:      en
    Territory:     00
    Output type:   PDF
    BI Beans Graph version [3.1.0.82]
    Tue Aug 20 09:24:46 EDT 2013 PROBLEM: In oracle.dss.graph.Graph::createLocalGridDataSource: no column labels: column index 0
    Tue Aug 20 09:24:46 EDT 2013 TRACE: In oracle.dss.graph.GraphModelAdapter::setSupportedDataLayerFlags (): Current DataSource does not support requested type: MetadataMap.METADATA_DRILLSTATE
    Tue Aug 20 09:24:46 EDT 2013 TRACE: In oracle.dss.graph.GraphModelAdapter::setSupportedDataLayerFlags (): Current DataSource does not support requested type: MetadataMap.METADATA_VALUE
    Tue Aug 20 09:24:46 EDT 2013 TRACE: In oracle.dss.graph.GraphModelAdapter::setSupportedDataLayerFlags (): Current DataSource does not support requested type: LayerMetadata.LAYER_METADATA_NAME
    Tue Aug 20 09:24:46 EDT 2013 PROBLEM: In oracle.dss.graph.BILabelLayout::logTruncatedError: legend text truncated
    BI Beans Graph version [3.1.0.82]
    Tue Aug 20 09:24:46 EDT 2013 PROBLEM: In oracle.dss.graph.Graph::createLocalGridDataSource: no column labels: column index 0
    Tue Aug 20 09:24:46 EDT 2013 TRACE: In oracle.dss.graph.GraphModelAdapter::setSupportedDataLayerFlags (): Current DataSource does not support requested type: MetadataMap.METADATA_DRILLSTATE
    Tue Aug 20 09:24:46 EDT 2013 TRACE: In oracle.dss.graph.GraphModelAdapter::setSupportedDataLayerFlags (): Current DataSource does not support requested type: MetadataMap.METADATA_VALUE
    Tue Aug 20 09:24:46 EDT 2013 TRACE: In oracle.dss.graph.GraphModelAdapter::setSupportedDataLayerFlags (): Current DataSource does not support requested type: LayerMetadata.LAYER_METADATA_NAME
    Tue Aug 20 09:24:46 EDT 2013 PROBLEM: In oracle.dss.graph.BILabelLayout::logTruncatedError: legend text truncated
    BI Beans Graph version [3.1.0.82]
    Tue Aug 20 09:24:46 EDT 2013 PROBLEM: In oracle.dss.graph.Graph::createLocalGridDataSource: no column labels: column index 0
    Tue Aug 20 09:24:46 EDT 2013 TRACE: In oracle.dss.graph.GraphModelAdapter::setSupportedDataLayerFlags (): Current DataSource does not support requested type: MetadataMap.METADATA_DRILLSTATE
    Tue Aug 20 09:24:46 EDT 2013 TRACE: In oracle.dss.graph.GraphModelAdapter::setSupportedDataLayerFlags (): Current DataSource does not support requested type: MetadataMap.METADATA_VALUE
    Tue Aug 20 09:24:46 EDT 2013 TRACE: In oracle.dss.graph.GraphModelAdapter::setSupportedDataLayerFlags (): Current DataSource does not support requested type: LayerMetadata.LAYER_METADATA_NAME
    BI Beans Graph version [3.1.0.82]
    Tue Aug 20 09:24:47 EDT 2013 TRACE: In oracle.dss.graph.GraphModelAdapter::setSupportedDataLayerFlags (): Current DataSource does not support requested type: MetadataMap.METADATA_DRILLSTATE
    Tue Aug 20 09:24:47 EDT 2013 TRACE: In oracle.dss.graph.GraphModelAdapter::setSupportedDataLayerFlags (): Current DataSource does not support requested type: MetadataMap.METADATA_VALUE
    Tue Aug 20 09:24:47 EDT 2013 TRACE: In oracle.dss.graph.GraphModelAdapter::setSupportedDataLayerFlags (): Current DataSource does not support requested type: LayerMetadata.LAYER_METADATA_NAME
    BI Beans Graph version [3.1.0.82]
    Tue Aug 20 09:24:47 EDT 2013 TRACE: In oracle.dss.graph.GraphModelAdapter::setSupportedDataLayerFlags (): Current DataSource does not support requested type: MetadataMap.METADATA_DRILLSTATE
    Tue Aug 20 09:24:47 EDT 2013 TRACE: In oracle.dss.graph.GraphModelAdapter::setSupportedDataLayerFlags (): Current DataSource does not support requested type: MetadataMap.METADATA_VALUE
    Tue Aug 20 09:24:47 EDT 2013 TRACE: In oracle.dss.graph.GraphModelAdapter::setSupportedDataLayerFlags (): Current DataSource does not support requested type: LayerMetadata.LAYER_METADATA_NAME
    [8/20/13 9:24:54 AM] [276776:RT50656371] XML Publisher post-processing action complete.
    [8/20/13 9:24:54 AM] [276776:RT50656371] Completed post-processing actions for request 50656371.
    [8/20/13 9:46:48 AM] [OPPServiceThread1] Post-processing request 50656374.
    [8/20/13 9:46:48 AM] [276776:RT50656374] Executing post-processing actions for request 50656374.
    [8/20/13 9:46:48 AM] [276776:RT50656374] Starting XML Publisher post-processing action.
    [8/20/13 9:46:48 AM] [276776:RT50656374]
    Template code: Test_Head_Count
    Template app:  CPER
    Language:      en
    Territory:     00
    Output type:   PDF
    [8/20/13 9:46:48 AM] [UNEXPECTED] [276776:RT50656374] java.lang.reflect.InvocationTargetException
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at oracle.apps.xdo.common.xml.XSLT10gR1.invokeNewXSLStylesheet(XSLT10gR1.java:607)
      at oracle.apps.xdo.common.xml.XSLT10gR1.transform(XSLT10gR1.java:235)
      at oracle.apps.xdo.common.xml.XSLTWrapper.transform(XSLTWrapper.java:182)
      at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:1044)
      at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:997)
      at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:212)
      at oracle.apps.xdo.template.FOProcessor.createFO(FOProcessor.java:1665)
      at oracle.apps.xdo.template.FOProcessor.generate(FOProcessor.java:975)
      at oracle.apps.xdo.oa.schema.server.TemplateHelper.runProcessTemplate(TemplateHelper.java:5926)
      at oracle.apps.xdo.oa.schema.server.TemplateHelper.processTemplate(TemplateHelper.java:3458)
      at oracle.apps.xdo.oa.schema.server.TemplateHelper.processTemplate(TemplateHelper.java:3547)
      at oracle.apps.fnd.cp.opp.XMLPublisherProcessor.process(XMLPublisherProcessor.java:290)
      at oracle.apps.fnd.cp.opp.OPPRequestThread.run(OPPRequestThread.java:157)
    Caused by: oracle.xdo.parser.v2.XPathException: Namespace prefix 'crosstab' used but not declared.
      at oracle.xdo.parser.v2.XSLProcessor.reportException(XSLProcessor.java:806)
      at oracle.xdo.parser.v2.XSLProcessor.newXSLStylesheet(XSLProcessor.java:571)
      ... 17 more
    [8/20/13 9:46:48 AM] [276776:RT50656374] Completed post-processing actions for request 50656374.
    [8/20/13 10:08:16 AM] [OPPServiceThread0] Post-processing request 50656386.
    [8/20/13 10:08:16 AM] [276776:RT50656386] Executing post-processing actions for request 50656386.
    [8/20/13 10:08:16 AM] [276776:RT50656386] Starting XML Publisher post-processing action.
    [8/20/13 10:08:16 AM] [276776:RT50656386]
    Template code: Test_Head_Count
    Template app:  CPER
    Language:      en
    Territory:     00
    Output type:   PDF
    [8/20/13 10:08:16 AM] [UNEXPECTED] [276776:RT50656386] java.lang.reflect.InvocationTargetException
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at oracle.apps.xdo.common.xml.XSLT10gR1.invokeNewXSLStylesheet(XSLT10gR1.java:607)
      at oracle.apps.xdo.common.xml.XSLT10gR1.transform(XSLT10gR1.java:235)
      at oracle.apps.xdo.common.xml.XSLTWrapper.transform(XSLTWrapper.java:182)
      at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:1044)
      at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:997)
      at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:212)
      at oracle.apps.xdo.template.FOProcessor.createFO(FOProcessor.java:1665)
      at oracle.apps.xdo.template.FOProcessor.generate(FOProcessor.java:975)
      at oracle.apps.xdo.oa.schema.server.TemplateHelper.runProcessTemplate(TemplateHelper.java:5926)
      at oracle.apps.xdo.oa.schema.server.TemplateHelper.processTemplate(TemplateHelper.java:3458)
      at oracle.apps.xdo.oa.schema.server.TemplateHelper.processTemplate(TemplateHelper.java:3547)
      at oracle.apps.fnd.cp.opp.XMLPublisherProcessor.process(XMLPublisherProcessor.java:290)
      at oracle.apps.fnd.cp.opp.OPPRequestThread.run(OPPRequestThread.java:157)
    Caused by: oracle.xdo.parser.v2.XPathException: Namespace prefix 'crosstab' used but not declared.
      at oracle.xdo.parser.v2.XSLProcessor.reportException(XSLProcessor.java:806)
      at oracle.xdo.parser.v2.XSLProcessor.newXSLStylesheet(XSLProcessor.java:571)
      ... 17 more
    [8/20/13 10:08:16 AM] [276776:RT50656386] Completed post-processing actions for request 50656386.
    [8/20/13 10:13:49 AM] [OPPServiceThread0] Post-processing request 50656387.
    [8/20/13 10:13:49 AM] [276776:RT50656387] Executing post-processing actions for request 50656387.
    [8/20/13 10:13:49 AM] [276776:RT50656387] Starting XML Publisher post-processing action.
    [8/20/13 10:13:49 AM] [276776:RT50656387]
    Template code: Test_Head_Count
    Template app:  CPER
    Language:      en
    Territory:     00
    Output type:   PDF
    BI Beans Graph version [3.1.0.82]
    Tue Aug 20 10:13:49 EDT 2013 PROBLEM: In oracle.dss.graph.Graph::createLocalGridDataSource: no column labels: column index 0
    Tue Aug 20 10:13:49 EDT 2013 TRACE: In oracle.dss.graph.GraphModelAdapter::setSupportedDataLayerFlags (): Current DataSource does not support requested type: MetadataMap.METADATA_DRILLSTATE
    Tue Aug 20 10:13:49 EDT 2013 TRACE: In oracle.dss.graph.GraphModelAdapter::setSupportedDataLayerFlags (): Current DataSource does not support requested type: MetadataMap.METADATA_VALUE
    Tue Aug 20 10:13:49 EDT 2013 TRACE: In oracle.dss.graph.GraphModelAdapter::setSupportedDataLayerFlags (): Current DataSource does not support requested type: LayerMetadata.LAYER_METADATA_NAME
    Tue Aug 20 10:13:49 EDT 2013 PROBLEM: In oracle.dss.graph.BILabelLayout::logTruncatedError: legend text truncated
    BI Beans Graph version [3.1.0.82]
    Tue Aug 20 10:13:49 EDT 2013 PROBLEM: In oracle.dss.graph.Graph::createLocalGridDataSource: no column labels: column index 0
    Tue Aug 20 10:13:49 EDT 2013 TRACE: In oracle.dss.graph.GraphModelAdapter::setSupportedDataLayerFlags (): Current DataSource does not support requested type: MetadataMap.METADATA_DRILLSTATE
    Tue Aug 20 10:13:49 EDT 2013 TRACE: In oracle.dss.graph.GraphModelAdapter::setSupportedDataLayerFlags (): Current DataSource does not support requested type: MetadataMap.METADATA_VALUE
    Tue Aug 20 10:13:49 EDT 2013 TRACE: In oracle.dss.graph.GraphModelAdapter::setSupportedDataLayerFlags (): Current DataSource does not support requested type: LayerMetadata.LAYER_METADATA_NAME
    Tue Aug 20 10:13:49 EDT 2013 PROBLEM: In oracle.dss.graph.BILabelLayout::logTruncatedError: legend text truncated
    BI Beans Graph version [3.1.0.82]
    Tue Aug 20 10:13:50 EDT 2013 PROBLEM: In oracle.dss.graph.Graph::createLocalGridDataSource: no column labels: column index 0
    Tue Aug 20 10:13:50 EDT 2013 TRACE: In oracle.dss.graph.GraphModelAdapter::setSupportedDataLayerFlags (): Current DataSource does not support requested type: MetadataMap.METADATA_DRILLSTATE
    Tue Aug 20 10:13:50 EDT 2013 TRACE: In oracle.dss.graph.GraphModelAdapter::setSupportedDataLayerFlags (): Current DataSource does not support requested type: MetadataMap.METADATA_VALUE
    Tue Aug 20 10:13:50 EDT 2013 TRACE: In oracle.dss.graph.GraphModelAdapter::setSupportedDataLayerFlags (): Current DataSource does not support requested type: LayerMetadata.LAYER_METADATA_NAME
    BI Beans Graph version [3.1.0.82]
    Tue Aug 20 10:13:50 EDT 2013 TRACE: In oracle.dss.graph.GraphModelAdapter::setSupportedDataLayerFlags (): Current DataSource does not support requested type: MetadataMap.METADATA_DRILLSTATE
    Tue Aug 20 10:13:50 EDT 2013 TRACE: In oracle.dss.graph.GraphModelAdapter::setSupportedDataLayerFlags (): Current DataSource does not support requested type: MetadataMap.METADATA_VALUE
    Tue Aug 20 10:13:50 EDT 2013 TRACE: In oracle.dss.graph.GraphModelAdapter::setSupportedDataLayerFlags (): Current DataSource does not support requested type: LayerMetadata.LAYER_METADATA_NAME
    BI Beans Graph version [3.1.0.82]
    Tue Aug 20 10:13:50 EDT 2013 TRACE: In oracle.dss.graph.GraphModelAdapter::setSupportedDataLayerFlags (): Current DataSource does not support requested type: MetadataMap.METADATA_DRILLSTATE
    Tue Aug 20 10:13:50 EDT 2013 TRACE: In oracle.dss.graph.GraphModelAdapter::setSupportedDataLayerFlags (): Current DataSource does not support requested type: MetadataMap.METADATA_VALUE
    Tue Aug 20 10:13:50 EDT 2013 TRACE: In oracle.dss.graph.GraphModelAdapter::setSupportedDataLayerFlags (): Current DataSource does not support requested type: LayerMetadata.LAYER_METADATA_NAME
    [8/20/13 10:13:57 AM] [276776:RT50656387] XML Publisher post-processing action complete.
    [8/20/13 10:13:57 AM] [276776:RT50656387] Completed post-processing actions for request 50656387.
    [8/20/13 1:19:36 PM] [OPPServiceThread1] Post-processing request 50656411.
    [8/20/13 1:19:37 PM] [276776:RT50656411] Executing post-processing actions for request 50656411.
    [8/20/13 1:19:37 PM] [276776:RT50656411] Starting XML Publisher post-processing action.
    [8/20/13 1:19:37 PM] [276776:RT50656411]
    Template code: Test_Head_Count
    Template app:  CPER
    Language:      en
    Territory:     00
    Output type:   PDF
    [8/20/13 1:19:37 PM] [UNEXPECTED] [276776:RT50656411] java.lang.reflect.InvocationTargetException
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at oracle.apps.xdo.common.xml.XSLT10gR1.invokeNewXSLStylesheet(XSLT10gR1.java:607)
      at oracle.apps.xdo.common.xml.XSLT10gR1.transform(XSLT10gR1.java:235)
      at oracle.apps.xdo.common.xml.XSLTWrapper.transform(XSLTWrapper.java:182)
      at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:1044)
      at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:997)
      at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:212)
      at oracle.apps.xdo.template.FOProcessor.createFO(FOProcessor.java:1665)
      at oracle.apps.xdo.template.FOProcessor.generate(FOProcessor.java:975)
      at oracle.apps.xdo.oa.schema.server.TemplateHelper.runProcessTemplate(TemplateHelper.java:5926)
      at oracle.apps.xdo.oa.schema.server.TemplateHelper.processTemplate(TemplateHelper.java:3458)
      at oracle.apps.xdo.oa.schema.server.TemplateHelper.processTemplate(TemplateHelper.java:3547)
      at oracle.apps.fnd.cp.opp.XMLPublisherProcessor.process(XMLPublisherProcessor.java:290)
      at oracle.apps.fnd.cp.opp.OPPRequestThread.run(OPPRequestThread.java:157)
    Caused by: oracle.xdo.parser.v2.XPathException: Namespace prefix 'crosstab' used but not declared.
      at oracle.xdo.parser.v2.XSLProcessor.reportException(XSLProcessor.java:806)
      at oracle.xdo.parser.v2.XSLProcessor.newXSLStylesheet(XSLProcessor.java:571)
      ... 17 more
    [8/20/13 1:19:37 PM] [276776:RT50656411] Completed post-processing actions for request 50656411.
    [8/20/13 1:36:00 PM] [OPPServiceThread1] Post-processing request 50656414.
    [8/20/13 1:36:00 PM] [276776:RT50656414] Executing post-processing actions for request 50656414.
    [8/20/13 1:36:00 PM] [276776:RT50656414] Starting XML Publisher post-processing action.
    [8/20/13 1:36:00 PM] [276776:RT50656414]
    Template code: Test_Head_Count
    Template app:  CPER
    Language:      en
    Territory:     00
    Output type:   PDF
    [8/20/13 1:36:00 PM] [UNEXPECTED] [276776:RT50656414] java.lang.reflect.InvocationTargetException
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at oracle.apps.xdo.common.xml.XSLT10gR1.invokeNewXSLStylesheet(XSLT10gR1.java:607)
      at oracle.apps.xdo.common.xml.XSLT10gR1.transform(XSLT10gR1.java:235)
      at oracle.apps.xdo.common.xml.XSLTWrapper.transform(XSLTWrapper.java:182)
      at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:1044)
      at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:997)
      at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:212)
      at oracle.apps.xdo.template.FOProcessor.createFO(FOProcessor.java:1665)
      at oracle.apps.xdo.template.FOProcessor.generate(FOProcessor.java:975)
      at oracle.apps.xdo.oa.schema.server.TemplateHelper.runProcessTemplate(TemplateHelper.java:5926)
      at oracle.apps.xdo.oa.schema.server.TemplateHelper.processTemplate(TemplateHelper.java:3458)
      at oracle.apps.xdo.oa.schema.server.TemplateHelper.processTemplate(TemplateHelper.java:3547)
      at oracle.apps.fnd.cp.opp.XMLPublisherProcessor.process(XMLPublisherProcessor.java:290)
      at oracle.apps.fnd.cp.opp.OPPRequestThread.run(OPPRequestThread.java:157)
    Caused by: oracle.xdo.parser.v2.XPathException: Namespace prefix 'crosstab' used but not declared.
      at oracle.xdo.parser.v2.XSLProcessor.reportException(XSLProcessor.java:806)
      at oracle.xdo.parser.v2.XSLProcessor.newXSLStylesheet(XSLProcessor.java:571)
      ... 17 more
    [8/20/13 1:36:00 PM] [276776:RT50656414] Completed post-processing actions for request 50656414.
    [email protected]

    To make it work,
    inside the if condition add a form field,
    and add the following inside that
    <fo:block keep-with-previous='always' break-after='page'/>
    or
    <xsl:attribute name="break-after" xdofo:ctx="incontext">page</xsl:attribute>it should give u a new page.

  • Power Query; How do I reference a Power Pivot table from a Power Query query

    Hi,
    It's pretty awesome how you can define Extract Transform and Load processes within Power Query without having to type in a single line of code. However how do I reference a Power Pivot table from a Power Query query to avoid me repeatedly accessing
    the same data source (CSV) file with a view to increasing performance?
    We are aware of the reference sub menu option with Power Query. However the new query created by the "reference" option still seems to refresh data from the data source (CSV) rather than just referencing the base query. Is this understanding
    correct? There does seem to be a lot of hard disk activity when re-running the new query which is based on a base query rather than a data source.  So we were hoping the new query would just need to reference the base query in memory rather than rescanning
    the hard disk. Is there any way to ensure that the reference query just rescans the base query in memory?
    Kind Regards,
    Kieran.
    Kieran Patrick Wood http://www.innovativebusinessintelligence.com http://uk.linkedin.com/in/kieranpatrickwood http://kieranwood.wordpress.com/

    Hi Kieran,
    This sounds like something to be suggested for a future release. At the present time, Power Query will always re-run the entire Power Query query when refreshed. The Reference feature is analogous to a SQL view whereby the underlying query is always re-executed
    when it's queried, or in this case refreshed. Even something like using the Power Query cache to minimise the amount of data re-read from the disk would be helpful for performance but the cache is only used for the preview data and stored locally.
    It would be a good idea to suggest this feature to the Power BI team via the feedback smiley face.
    Regards,
    Michael Amadi
    Please use the 'Mark as answer' link to mark a post that answers your question. If you find a reply helpful, please remember to vote it as helpful :)
    Website: http://www.nimblelearn.com, Twitter:
    @nimblelearn
    Hi Michael, 
    Glad to hear from you about this.  And thanks to Kieran for bringing a very good valid point to debate. Will be glad to see this in future release. 
    - please mark correct answers

  • How to export the created Pivot table by using Power Pivot into separate excel file in the same format?

    Hi PowerPivot experts,
    I have created more than 60 pivot tables in multiple sheets by using PowerPivot work book. now i want delivery all the pivot table in excel document to my end user by email.
    I want send only the Pivot tables which i created using PowerPivot data model instead of sending the whole model file since its very heavy.
    I have tried with export option in Excel 97-2003, its works fine but not getting exact pivot format which i created and its displays as value.
    My aim to send pivot table that i created format but not whole file with source data.
    I would be really grateful if advise me to fix it out.

    Hi Robert,
    I don't think it is a good idea to deliver all PivotTable report to end user via E-mail, and SQL Server PowerPivot for Excel doesn't support to deliver PivotTable report to end user without PowerPivot data inside in the data model. For example, I suppose
    we create a PivotTable to display the SalesAmount of US in pervious years(eg:2012, 2013, 2014), how can we dynamic show the value based on end user selection without PowerPivot data model data(The PivotTable report don't have data source)?
    So, one workaround that we can create a shared folder to store all of PowerPivot report for all of end user in the domain environment, and then inform end users to copy the PowerPivot reports what they want via E-mail.
    If the end users aren't in domain environment, we can implement the VPN soltion to achieve this.
    Regards,
    Elvis Long
    TechNet Community Support

  • TSQL query to calculate Count / Sum grouping by date on a Pivot Table

    Hi All
    I need help to group the pivot table output to group by dates and sum/count the values. I have a table like shown below.
    Date
    Student 
    Subject
    Hunt
    Marks
    18/02/2014
    Sam 
    Maths
    1
    20
    18/02/2014
    Sam 
    Maths
    1
    10
    18/02/2014
    Sam 
    Maths
    2
    30
    18/02/2014
    Luke
    Science
    1
    50
    17/02/2014
    Sam 
    Maths
    2
    50
    17/02/2014
    Luke
    Science
    2
    60
    16/02/2014
    Luke
    Science
    2
    20
    16/02/2014
    Luke
    Science
    3
    20
    I want to Group by dates and move the Hunt to columns calculating their counts and sum their marks too. Like given below.
    I wrote a pivot query like below but If i group it with dates and calculate the total marks it throws aggregate errors.
    Create Table Student_Log ([Date] datetime ,Student varchar (20), Subject varchar (20) ,Hunt int ,Marks int )
    Go
    INSERT INTO Student_Log ([Date],Student, [Subject],Hunt,Marks) VALUES('2014-02-18 15:00:00.000','Sam ','Maths','1','20')
    INSERT INTO Student_Log ([Date],Student, [Subject],Hunt,Marks) VALUES('2014-02-18 15:00:00.000','Sam ','Maths','1','10')
    INSERT INTO Student_Log ([Date],Student, [Subject],Hunt,Marks) VALUES('2014-02-18 15:00:00.000','Sam ','Maths','2','30')
    INSERT INTO Student_Log ([Date],Student, [Subject],Hunt,Marks) VALUES('2014-02-18 15:00:00.000','Luke','Science','1','50')
    INSERT INTO Student_Log ([Date],Student, [Subject],Hunt,Marks) VALUES('2014-02-17 15:00:00.000','Sam ','Maths','2','50')
    INSERT INTO Student_Log ([Date],Student, [Subject],Hunt,Marks) VALUES('2014-02-17 15:00:00.000','Luke','Science','2','60')
    INSERT INTO Student_Log ([Date],Student, [Subject],Hunt,Marks) VALUES('2014-02-16 15:00:00.000','Luke','Science','2','20')
    INSERT INTO Student_Log ([Date],Student, [Subject],Hunt,Marks) VALUES('2014-02-16 15:00:00.000','Luke','Science','3','20')
    Go
    select * from Student_Log
    select [DATE] , [Student], [Subject] ,[1],[2],[3],[4],Total =([1]+[2]+[3]+[4])
    from
    ( select [Date], [Student], [Subject],[Hunt],[Marks] from Student_Log
    )x
    pivot
    count ( [Hunt]) for [Hunt]
    in ([1],[2],[3],[4])
    )p
    order by [Date] desc
    I have done this far only. More than this I need to enhance it with the Percentage of Hunts for each Student.
    ie like below table.
    On 18th Sam in Maths he had 2 rows on 1st hunt  and 1 row on 2nd hunt. So On the Pivot table is it possible to represent it on percentage using the Total Attempts column.
    Thanks a lot in advance.
    Its runnung in SQL 2000 Server.

    Create Table Student_Log ([Date] datetime ,Student varchar (20), Subject varchar (20) ,Hunt int ,Marks int )
    Go
    INSERT INTO Student_Log ([Date],Student, [Subject],Hunt,Marks) VALUES('2014-02-18 15:00:00.000','Sam ','Maths','1','20')
    INSERT INTO Student_Log ([Date],Student, [Subject],Hunt,Marks) VALUES('2014-02-18 15:00:00.000','Sam ','Maths','1','10')
    INSERT INTO Student_Log ([Date],Student, [Subject],Hunt,Marks) VALUES('2014-02-18 15:00:00.000','Sam ','Maths','2','30')
    INSERT INTO Student_Log ([Date],Student, [Subject],Hunt,Marks) VALUES('2014-02-18 15:00:00.000','Luke','Science','1','50')
    INSERT INTO Student_Log ([Date],Student, [Subject],Hunt,Marks) VALUES('2014-02-17 15:00:00.000','Sam ','Maths','2','50')
    INSERT INTO Student_Log ([Date],Student, [Subject],Hunt,Marks) VALUES('2014-02-17 15:00:00.000','Luke','Science','2','60')
    INSERT INTO Student_Log ([Date],Student, [Subject],Hunt,Marks) VALUES('2014-02-16 15:00:00.000','Luke','Science','2','20')
    INSERT INTO Student_Log ([Date],Student, [Subject],Hunt,Marks) VALUES('2014-02-16 15:00:00.000','Luke','Science','3','20')
    Go
    select * from Student_Log
    ;with mycte as
    Select [Date], [Student], [Subject] ,
    Count(CASE WHEN [Hunt]=1 Then Hunt End) as Hunt1,
    Count(CASE WHEN [Hunt]=2 Then Hunt End) as Hunt2,
    Count(CASE WHEN [Hunt]=3 Then Hunt End) as Hunt3,
    Count(CASE WHEN [Hunt]=4 Then Hunt End) as Hunt4,
    Count(CASE WHEN [Hunt]=1 Then Hunt End)
    +Count(CASE WHEN [Hunt]=2 Then Hunt End)
    +Count(CASE WHEN [Hunt]=3 Then Hunt End)+
    +Count(CASE WHEN [Hunt]=4 Then Hunt End) as Total,
    ISNULL(SUM(CASE WHEN [Hunt]=1 Then Marks End),0) as Mark1,
    ISNULL(SUM(CASE WHEN [Hunt]=2 Then Marks End),0) as Mark2,
    ISNULL(SUM(CASE WHEN [Hunt]=3 Then Marks End),0) as Mark3,
    ISNULL(SUM(CASE WHEN [Hunt]=4 Then Marks End),0) as Mark4
    from Student_Log
    Group By [Date], [Student], [Subject]
    Select [Date], [Student], [Subject]
    , Cast(Hunt1*1./Total*100 as int) as [1]
    , Cast(Hunt2*1./Total*100 as int) as [2]
    ,Cast(Hunt3*1./Total*100 as int) as [3]
    ,Cast(Hunt4*1./Total*100 as int) as [4]
    ,Total,Marks=( Mark1+Mark2+Mark3+Mark4)
    from mycte
    order by [Date] DESC, Student desc
    drop table Student_Log

Maybe you are looking for