p6r8.3 using bi publisher 11g - create multi-project status and pivot table reports

95
REMINDER Check in on the COLLABORATE mobile app P6R8.3 Using BI Publisher 11g Create Multi-Project Status and Pivot Table Reports Prepared by: Paul G. Ciszewski, PMP Dynamic Consulting Session ID#: 200160 [email protected]

Upload: p6academy

Post on 17-Aug-2015

44 views

Category:

Business


1 download

TRANSCRIPT

Page 1: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

REMINDERCheck in on the

COLLABORATE mobile app

P6R8.3 Using BI Publisher 11gCreate Multi-Project Status and Pivot Table Reports

Prepared by:Paul G. Ciszewski, PMPDynamic Consulting

Session ID#: 200160

[email protected]

Page 2: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Overview■ Oracle Business Intelligence Publisher (BIP) is a report

development tool to create pixel-perfect reports for P6, CMv14 and Unifier

■ To modify existing P6 EPPM Web Reports and to create new P6 EPPM Web Reports, BIP is used

■ When creating reports, you should use P6’s new Px Extended Scheme (database)

■ Px Extended Scheme is a de-normalized database and has P6 calculated values (such as Earned Value)

■ A de-normalized database simplifies report development

Page 3: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Overview (cont.)We will demonstrate the development of two BIP reports. First report:

■ Multi-Project Status Report (Report Name Project List)

▪ Users can select 1 project, multiple projects, or an EPS

▪ For each project, the following will be displayed: project manager (prj code), phase (prj code), project ID, project name, start date, finish date, planned hours, remaining hours, original budget (UDF), and business case (UDF)

▪ Projects will be grouped and subtotaled by project manager and then phase

Page 4: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Overview (cont.)Multi-Project Status Report (Report Name: Project List)

Page 5: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Overview (cont.)Multi-Project Status Report (Report Name: Project List)

Page 6: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Overview (cont.)Here are the major steps to build a BIP report:

■ Develop the SQL - The SQL are the instructions for extracting the data from the P6 Extended Database. Usually, SQL Developer is used to develop and test the SQL (but you can enter the SQL directly into the data model)

■ Build Data Model (DM) - The data model has the selections for the report and the data sets (the SQL is entered into the data set)

■ Create XML data using the DM - Before you can build the presentation part of the report, you must create XML data

■ Build Report – Which is the presentation part of the report using either the Report Layout Editor or BIP Desktop (WORD Add-on).Every Report is linked back to a DM – 1st build DM, then build Report from DM

Page 7: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

TablesThe following tables will be used in the first report

■ P6Project – this table has a list of all published projects and related data (such as start date, finish date)

■ P6ProjectCodeAssignment – this table has all the project code values assigned to every published project.

■ P6UDFType – this table has all the UDF definitions (titles/labels, data type, subject area such as Project)

■ P6Project_UDFValue - this table has all the UDF values assigned to all subject areas (such as Project, Activity, etc.) however you need to look up the title/label in the P6UDFType table then join with P6Project_UDFValue.

Page 8: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Develop SQL

■ SQL is a query language to extract (and update) databases

■ SQL is entered into the data sets in the Data Model

■ We usually use the SQL Developer tool to create and test the SQL queries however you can use the Query Builder in BIP for simple SQL queries

■ However, for all the reports that we develop for clients, we do not use the Query Builder because it cannot handle the more complex SQL queries

Page 9: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Develop SQL (cont.)

• Over the next few slides, we will discuss each section of the SQL

• But I thought it would be useful to see the whole query

Page 10: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Develop SQL (cont.)SELECT

-- Get some standard Project valuesPRJ.ID AS PRJ_ID,PRJ.NAME AS PRJ_NAME,PRJ.DATADATE AS PRJ_DATADATE,PRJ.STARTDATE AS PRJ_STARTDATE,PRJ.FINISHDATE AS PRJ_FINISHDATE,PRJ.SUMPLANNEDLABORUNITS AS PRJ_SUMPLANNEDLABORUNITS,PRJ.SUMREMAININGLABORUNITS AS PRJ_SUMREMAININGLABORUNITS,

-- Get UDF number value for Original BudgetNVL((SELECT UDFVALUE.UDFNUMBER

FROM P6UDFTYPE UDFTYPE,P6PROJECT_UDFVALUE UDFVALUE

WHEREPRJ.OBJECTID = UDFVALUE.PROJECTOBJECTID ANDUDFVALUE.UDFTYPEOBJECTID = UDFTYPE.OBJECTID ANDLOWER(UDFVALUE.SUBJECTAREA) = 'project' ANDLOWER(UDFTYPE.TITLE) = 'original budget'

),0) AS PRJ_UDF_ORIGINALBUDGET,

-- Get UDF text value for Business CaseNVL((SELECT UDFVALUE.UDFTEXT

FROM P6UDFTYPE UDFTYPE,P6PROJECT_UDFVALUE UDFVALUE

WHEREPRJ.OBJECTID = UDFVALUE.PROJECTOBJECTID ANDUDFVALUE.UDFTYPEOBJECTID = UDFTYPE.OBJECTID ANDLOWER(UDFVALUE.SUBJECTAREA) = 'project' ANDLOWER(UDFTYPE.TITLE) = 'business case #'

),' ') AS PRJ_UDF_BUSINESSCASE,

-- Get Project Code Description for Project ManagerNVL((SELECT PCA.PROJECTCODEDESCRIPTION

FROM P6PROJECTCODEASSIGNMENT PCAWHERE PRJ.OBJECTID = PCA.PROJECTOBJECTID AND

LOWER(PCA.PROJECTCODETYPENAME) = 'project manager'), ' ') AS PRJ_PROJECTMANAGER,

-- Get Project Code Value for Current PhaseNVL((SELECT PCA.PROJECTCODEVALUE

FROM P6PROJECTCODEASSIGNMENT PCAWHERE PRJ.OBJECTID = PCA.PROJECTOBJECTID AND

LOWER(PCA.PROJECTCODETYPENAME) = 'current phase'), ' ') AS PRJ_CURRENTPHASE

FROM P6PROJECT PRJWHERE PRJ.ID IN (:p_project_id)ORDER BY PRJ_ID

• First, we will discuss the main FROM clause on the next slide

Page 11: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Develop SQL (cont.)FROM P6PROJECT PRJWHERE PRJ.ID IN (:p_project_id)ORDER BY PRJ_ID

• First we use the project table called P6PROJECT but use an alias of PRJ

• We only extract project records that are in the parameter “p_project_id” – but we need to put a “:” before the parameter name

• The “ORDER BY” clause will sort the results by project id

Page 12: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Develop SQL (cont.)SELECT

-- Get some standard Project valuesPRJ.ID AS PRJ_ID,PRJ.NAME AS PRJ_NAME,PRJ.DATADATE AS PRJ_DATADATE,PRJ.STARTDATE AS PRJ_STARTDATE,PRJ.FINISHDATE AS PRJ_FINISHDATE,PRJ.SUMPLANNEDLABORUNITS AS PRJ_SUMPLANNEDLABORUNITS,PRJ.SUMREMAININGLABORUNITS AS PRJ_SUMREMAININGLABORUNITS,

-- Get UDF number value for Original BudgetNVL((SELECT UDFVALUE.UDFNUMBER

FROM P6UDFTYPE UDFTYPE,P6PROJECT_UDFVALUE UDFVALUE

WHEREPRJ.OBJECTID = UDFVALUE.PROJECTOBJECTID ANDUDFVALUE.UDFTYPEOBJECTID = UDFTYPE.OBJECTID ANDLOWER(UDFVALUE.SUBJECTAREA) = 'project' ANDLOWER(UDFTYPE.TITLE) = 'original budget'

),0) AS PRJ_UDF_ORIGINALBUDGET,

-- Get UDF text value for Business CaseNVL((SELECT UDFVALUE.UDFTEXT

FROM P6UDFTYPE UDFTYPE,P6PROJECT_UDFVALUE UDFVALUE

WHEREPRJ.OBJECTID = UDFVALUE.PROJECTOBJECTID ANDUDFVALUE.UDFTYPEOBJECTID = UDFTYPE.OBJECTID ANDLOWER(UDFVALUE.SUBJECTAREA) = 'project' ANDLOWER(UDFTYPE.TITLE) = 'business case #'

),' ') AS PRJ_UDF_BUSINESSCASE,

-- Get Project Code Description for Project ManagerNVL((SELECT PCA.PROJECTCODEDESCRIPTION

FROM P6PROJECTCODEASSIGNMENT PCAWHERE PRJ.OBJECTID = PCA.PROJECTOBJECTID AND

LOWER(PCA.PROJECTCODETYPENAME) = 'project manager'), ' ') AS PRJ_PROJECTMANAGER,

-- Get Project Code Value for Current PhaseNVL((SELECT PCA.PROJECTCODEVALUE

FROM P6PROJECTCODEASSIGNMENT PCAWHERE PRJ.OBJECTID = PCA.PROJECTOBJECTID AND

LOWER(PCA.PROJECTCODETYPENAME) = 'current phase'), ' ') AS PRJ_CURRENTPHASE

FROM P6PROJECT PRJWHERE PRJ.ID IN (:p_project_id)ORDER BY PRJ_ID

• Next, we extract some standard values directly from the project table (P6Project but we are using the alias of PRJ.

Page 13: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Develop SQL (cont.)SELECT

-- Get some standard Project valuesPRJ.ID AS PRJ_ID,PRJ.NAME AS PRJ_NAME,PRJ.DATADATE AS PRJ_DATADATE,PRJ.STARTDATE AS PRJ_STARTDATE,PRJ.FINISHDATE AS PRJ_FINISHDATE,PRJ.SUMPLANNEDLABORUNITS AS PRJ_SUMPLANNEDLABORUNITS,PRJ.SUMREMAININGLABORUNITS AS PRJ_SUMREMAININGLABORUNITS,

• In the P6Project table, some standard column names are ID, NAME, DATADATE, STARTDATE.

• But we rename the columns/data elements with a prefix of PRJ_ID, PRJ_NAME, etc.

• PRJ_ID, PRJ_NAME, etc. will be used when we build the presentation part of the report

• NOTE: The 2 dashes “—” are comment lines

Page 14: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Develop SQL (cont.)SELECT

-- Get some standard Project valuesPRJ.ID AS PRJ_ID,PRJ.NAME AS PRJ_NAME,PRJ.DATADATE AS PRJ_DATADATE,PRJ.STARTDATE AS PRJ_STARTDATE,PRJ.FINISHDATE AS PRJ_FINISHDATE,PRJ.SUMPLANNEDLABORUNITS AS PRJ_SUMPLANNEDLABORUNITS,PRJ.SUMREMAININGLABORUNITS AS PRJ_SUMREMAININGLABORUNITS,

-- Get UDF number value for Original BudgetNVL((SELECT UDFVALUE.UDFNUMBER

FROM P6UDFTYPE UDFTYPE,P6PROJECT_UDFVALUE UDFVALUE

WHEREPRJ.OBJECTID = UDFVALUE.PROJECTOBJECTID ANDUDFVALUE.UDFTYPEOBJECTID = UDFTYPE.OBJECTID ANDLOWER(UDFVALUE.SUBJECTAREA) = 'project' ANDLOWER(UDFTYPE.TITLE) = 'original budget'

),0) AS PRJ_UDF_ORIGINALBUDGET,

-- Get UDF text value for Business CaseNVL((SELECT UDFVALUE.UDFTEXT

FROM P6UDFTYPE UDFTYPE,P6PROJECT_UDFVALUE UDFVALUE

WHEREPRJ.OBJECTID = UDFVALUE.PROJECTOBJECTID ANDUDFVALUE.UDFTYPEOBJECTID = UDFTYPE.OBJECTID ANDLOWER(UDFVALUE.SUBJECTAREA) = 'project' ANDLOWER(UDFTYPE.TITLE) = 'business case #'

),' ') AS PRJ_UDF_BUSINESSCASE,

-- Get Project Code Description for Project ManagerNVL((SELECT PCA.PROJECTCODEDESCRIPTION

FROM P6PROJECTCODEASSIGNMENT PCAWHERE PRJ.OBJECTID = PCA.PROJECTOBJECTID AND

LOWER(PCA.PROJECTCODETYPENAME) = 'project manager'), ' ') AS PRJ_PROJECTMANAGER,

-- Get Project Code Value for Current PhaseNVL((SELECT PCA.PROJECTCODEVALUE

FROM P6PROJECTCODEASSIGNMENT PCAWHERE PRJ.OBJECTID = PCA.PROJECTOBJECTID AND

LOWER(PCA.PROJECTCODETYPENAME) = 'current phase'), ' ') AS PRJ_CURRENTPHASE

FROM P6PROJECT PRJWHERE PRJ.ID IN (:p_project_id)ORDER BY PRJ_ID

• Next, we extract the UDF value for 1 UDF using a SELECT statement and the project’s unique ID.

• Note: In the extended P6Project table, the unique ID is called “OBJECTID”.  In the native PROJECT table the unique ID is called “proj_id”

Page 15: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Develop SQL (cont.)

-- Get UDF number value for Original BudgetNVL((SELECT UDFVALUE.UDFNUMBER

FROM P6UDFTYPE UDFTYPE,P6PROJECT_UDFVALUE UDFVALUE

WHEREPRJ.OBJECTID = UDFVALUE.PROJECTOBJECTID ANDUDFVALUE.UDFTYPEOBJECTID = UDFTYPE.OBJECTID ANDLOWER(UDFVALUE.SUBJECTAREA) = 'project' ANDLOWER(UDFTYPE.TITLE) = 'original budget'

),0) AS PRJ_UDF_ORIGINALBUDGET,

• The inner SELECT statement is highlighted• The NVL() function around the SELECT statement checks for a NULL result –

and if the result is a NULL, the NULL is changed to a 0• The result is finally stored to a data element name of 

“PRJ_UDF_ORIGINALBUDGET”• More details on next slide

Page 16: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Develop SQL (cont.)-- Get UDF number value for Original Budget

NVL((SELECT UDFVALUE.UDFNUMBER FROM P6UDFTYPE UDFTYPE,

P6PROJECT_UDFVALUE UDFVALUEWHERE

PRJ.OBJECTID = UDFVALUE.PROJECTOBJECTID ANDUDFVALUE.UDFTYPEOBJECTID = UDFTYPE.OBJECTID ANDLOWER(UDFVALUE.SUBJECTAREA) = 'project' ANDLOWER(UDFTYPE.TITLE) = 'original budget'

),0) AS PRJ_UDF_ORIGINALBUDGET,

• The inner SELECT statement uses the P6UDFTYPE and the P6PROJECT_UDFVALUE tables.

• The WHERE clause finds the record with a UDF Type of “original budget”• Using the OBJECTID from the P6UDFTYPE table, the WHERE clause links/joins 

the P6UDFTYPE and the P6PROJECT_UDFVALUE tables• The reason we use the SUBJECTAREA is to ensure we are using the UDF for the 

project (and not some other subject area such as activity). • We could have used the SUBJECTAREA on the P6UDFTYPE table too• Lastly, we link/join the P6PROJECT and P6PROJECT_UDFVALUE tables

Page 17: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Develop SQL (cont.)SELECT

-- Get some standard Project valuesPRJ.ID AS PRJ_ID,PRJ.NAME AS PRJ_NAME,PRJ.DATADATE AS PRJ_DATADATE,PRJ.STARTDATE AS PRJ_STARTDATE,PRJ.FINISHDATE AS PRJ_FINISHDATE,PRJ.SUMPLANNEDLABORUNITS AS PRJ_SUMPLANNEDLABORUNITS,PRJ.SUMREMAININGLABORUNITS AS PRJ_SUMREMAININGLABORUNITS,

-- Get UDF number value for Original BudgetNVL((SELECT UDFVALUE.UDFNUMBER

FROM P6UDFTYPE UDFTYPE,P6PROJECT_UDFVALUE UDFVALUE

WHEREPRJ.OBJECTID = UDFVALUE.PROJECTOBJECTID ANDUDFVALUE.UDFTYPEOBJECTID = UDFTYPE.OBJECTID ANDLOWER(UDFVALUE.SUBJECTAREA) = 'project' ANDLOWER(UDFTYPE.TITLE) = 'original budget'

),0) AS PRJ_UDF_ORIGINALBUDGET,

-- Get UDF text value for Business CaseNVL((SELECT UDFVALUE.UDFTEXT

FROM P6UDFTYPE UDFTYPE,P6PROJECT_UDFVALUE UDFVALUE

WHEREPRJ.OBJECTID = UDFVALUE.PROJECTOBJECTID ANDUDFVALUE.UDFTYPEOBJECTID = UDFTYPE.OBJECTID ANDLOWER(UDFVALUE.SUBJECTAREA) = 'project' ANDLOWER(UDFTYPE.TITLE) = 'business case #'

),' ') AS PRJ_UDF_BUSINESSCASE,

-- Get Project Code Description for Project ManagerNVL((SELECT PCA.PROJECTCODEDESCRIPTION

FROM P6PROJECTCODEASSIGNMENT PCAWHERE PRJ.OBJECTID = PCA.PROJECTOBJECTID AND

LOWER(PCA.PROJECTCODETYPENAME) = 'project manager'), ' ') AS PRJ_PROJECTMANAGER,

-- Get Project Code Value for Current PhaseNVL((SELECT PCA.PROJECTCODEVALUE

FROM P6PROJECTCODEASSIGNMENT PCAWHERE PRJ.OBJECTID = PCA.PROJECTOBJECTID AND

LOWER(PCA.PROJECTCODETYPENAME) = 'current phase'), ' ') AS PRJ_CURRENTPHASE

FROM P6PROJECT PRJWHERE PRJ.ID IN (:p_project_id)ORDER BY PRJ_ID

• Next, we extract another UDF value (but this time a TEXT value)

Page 18: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Develop SQL (cont.)-- Get UDF text value for Business Case

NVL((SELECT UDFVALUE.UDFTEXTFROM P6UDFTYPE UDFTYPE,

P6PROJECT_UDFVALUE UDFVALUEWHERE

PRJ.OBJECTID = UDFVALUE.PROJECTOBJECTID ANDUDFVALUE.UDFTYPEOBJECTID = UDFTYPE.OBJECTID ANDLOWER(UDFVALUE.SUBJECTAREA) = 'project' ANDLOWER(UDFTYPE.TITLE) = 'business case #'

),' ') AS PRJ_UDF_BUSINESSCASE,

• This select for a UDF value is similar to the last one except the UDF is a TEXT value (vs a numeric value)

• The title is different because it is a different UDF• The NVL() function changes a NULL to a SPACE• The result is stored in PRJ_UDF_BUSINESSCASE• NOTE: The LOWER() function changes the value TITLE to lower case before the 

compare therefore I don’t need to know the exact case of the TITLE

Page 19: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Develop SQL (cont.)SELECT

-- Get some standard Project valuesPRJ.ID AS PRJ_ID,PRJ.NAME AS PRJ_NAME,PRJ.DATADATE AS PRJ_DATADATE,PRJ.STARTDATE AS PRJ_STARTDATE,PRJ.FINISHDATE AS PRJ_FINISHDATE,PRJ.SUMPLANNEDLABORUNITS AS PRJ_SUMPLANNEDLABORUNITS,PRJ.SUMREMAININGLABORUNITS AS PRJ_SUMREMAININGLABORUNITS,

-- Get UDF number value for Original BudgetNVL((SELECT UDFVALUE.UDFNUMBER

FROM P6UDFTYPE UDFTYPE,P6PROJECT_UDFVALUE UDFVALUE

WHEREPRJ.OBJECTID = UDFVALUE.PROJECTOBJECTID ANDUDFVALUE.UDFTYPEOBJECTID = UDFTYPE.OBJECTID ANDLOWER(UDFVALUE.SUBJECTAREA) = 'project' ANDLOWER(UDFTYPE.TITLE) = 'original budget'

),0) AS PRJ_UDF_ORIGINALBUDGET,

-- Get UDF text value for Business CaseNVL((SELECT UDFVALUE.UDFTEXT

FROM P6UDFTYPE UDFTYPE,P6PROJECT_UDFVALUE UDFVALUE

WHEREPRJ.OBJECTID = UDFVALUE.PROJECTOBJECTID ANDUDFVALUE.UDFTYPEOBJECTID = UDFTYPE.OBJECTID ANDLOWER(UDFVALUE.SUBJECTAREA) = 'project' ANDLOWER(UDFTYPE.TITLE) = 'business case #'

),' ') AS PRJ_UDF_BUSINESSCASE,

-- Get Project Code Description for Project ManagerNVL((SELECT PCA.PROJECTCODEDESCRIPTION

FROM P6PROJECTCODEASSIGNMENT PCAWHERE PRJ.OBJECTID = PCA.PROJECTOBJECTID AND

LOWER(PCA.PROJECTCODETYPENAME) = 'project manager'), ' ') AS PRJ_PROJECTMANAGER,

-- Get Project Code Value for Current PhaseNVL((SELECT PCA.PROJECTCODEVALUE

FROM P6PROJECTCODEASSIGNMENT PCAWHERE PRJ.OBJECTID = PCA.PROJECTOBJECTID AND

LOWER(PCA.PROJECTCODETYPENAME) = 'current phase'), ' ') AS PRJ_CURRENTPHASE

FROM P6PROJECT PRJWHERE PRJ.ID IN (:p_project_id)ORDER BY PRJ_ID

• Next, we extract a project code description for a project code called ‘Project Manager’

Page 20: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Develop SQL (cont.)-- Get Project Code Description for Project Manager

NVL((SELECT PCA.PROJECTCODEDESCRIPTIONFROM P6PROJECTCODEASSIGNMENT PCAWHERE PRJ.OBJECTID = PCA.PROJECTOBJECTID AND

LOWER(PCA.PROJECTCODETYPENAME) = 'project manager'), ' ') AS PRJ_PROJECTMANAGER,

• The inner SELECT statement is highlighted• The NVL() function around the SELECT statement checks for a NULL result –

and if the result is a NULL, the NULL is changed to a SPACE• The result is finally stored to a data element name of “PRJ_PROJECTMANAGER”• More details on next slide

Page 21: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Develop SQL (cont.)-- Get Project Code Description for Project Manager

NVL((SELECT PCA.PROJECTCODEDESCRIPTIONFROM P6PROJECTCODEASSIGNMENT PCAWHERE PRJ.OBJECTID = PCA.PROJECTOBJECTID AND

LOWER(PCA.PROJECTCODETYPENAME) = 'project manager'), ' ') AS PRJ_PROJECTMANAGER,

• The inner SELECT statement uses the P6PROJECTCODEASSIGNMENT table• The WHERE clause finds the record with a Project Code of “project manager”• Using the PROJECTOBJECTID from the P6PROJECTCODEASSIGNMENT table, the 

WHERE clause links/joins the P6PROJECT and the P6PROJECTCODEASSIGNMENT tables

• Here, we extract the Project Code Description.  In the next example, we extract the Project Code Value

Page 22: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Develop SQL (cont.)SELECT

-- Get some standard Project valuesPRJ.ID AS PRJ_ID,PRJ.NAME AS PRJ_NAME,PRJ.DATADATE AS PRJ_DATADATE,PRJ.STARTDATE AS PRJ_STARTDATE,PRJ.FINISHDATE AS PRJ_FINISHDATE,PRJ.SUMPLANNEDLABORUNITS AS PRJ_SUMPLANNEDLABORUNITS,PRJ.SUMREMAININGLABORUNITS AS PRJ_SUMREMAININGLABORUNITS,

-- Get UDF number value for Original BudgetNVL((SELECT UDFVALUE.UDFNUMBER

FROM P6UDFTYPE UDFTYPE,P6PROJECT_UDFVALUE UDFVALUE

WHEREPRJ.OBJECTID = UDFVALUE.PROJECTOBJECTID ANDUDFVALUE.UDFTYPEOBJECTID = UDFTYPE.OBJECTID ANDLOWER(UDFVALUE.SUBJECTAREA) = 'project' ANDLOWER(UDFTYPE.TITLE) = 'original budget'

),0) AS PRJ_UDF_ORIGINALBUDGET,

-- Get UDF text value for Business CaseNVL((SELECT UDFVALUE.UDFTEXT

FROM P6UDFTYPE UDFTYPE,P6PROJECT_UDFVALUE UDFVALUE

WHEREPRJ.OBJECTID = UDFVALUE.PROJECTOBJECTID ANDUDFVALUE.UDFTYPEOBJECTID = UDFTYPE.OBJECTID ANDLOWER(UDFVALUE.SUBJECTAREA) = 'project' ANDLOWER(UDFTYPE.TITLE) = 'business case #'

),' ') AS PRJ_UDF_BUSINESSCASE,

-- Get Project Code Description for Project ManagerNVL((SELECT PCA.PROJECTCODEDESCRIPTION

FROM P6PROJECTCODEASSIGNMENT PCAWHERE PRJ.OBJECTID = PCA.PROJECTOBJECTID AND

LOWER(PCA.PROJECTCODETYPENAME) = 'project manager'), ' ') AS PRJ_PROJECTMANAGER,

-- Get Project Code Value for Current PhaseNVL((SELECT PCA.PROJECTCODEVALUE

FROM P6PROJECTCODEASSIGNMENT PCAWHERE PRJ.OBJECTID = PCA.PROJECTOBJECTID AND

LOWER(PCA.PROJECTCODETYPENAME) = 'current phase'), ' ') AS PRJ_CURRENTPHASE

FROM P6PROJECT PRJWHERE PRJ.ID IN (:p_project_id)ORDER BY PRJ_ID

• Next, we extract a project code value for a project code called ‘Current Phase’

Page 23: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Develop SQL (cont.)-- Get Project Code Value for Current Phase

NVL((SELECT PCA.PROJECTCODEVALUEFROM P6PROJECTCODEASSIGNMENT PCAWHERE PRJ.OBJECTID = PCA.PROJECTOBJECTID AND

LOWER(PCA.PROJECTCODETYPENAME) = 'current phase'), ' ') AS PRJ_CURRENTPHASE

• Very similar to the previous example for extracting project code assigned to project But …

• Here we use a different Project Code called “Current Phase” and• We extract the value instead of the description• The result is stored to PRJ_CURRENTPHASE

Page 24: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Develop SQL(cont.)■ The SQL for the data set is finished

■ Now, we will build the Data Model (DM)

■ To build the DM and sample data,

▪ Log into BIP

▪ Create new DM

▪ In the DM, create a List of Values

▪ In the DM, create a parameter (from the List of Values)

▪ In the DM, create a data set (using the SQL from the previous slides)

▪ Save the DM

▪ Using the DM, create XML data (sample data)

Page 25: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Build Data Model

• User Name should exist in P6

• The user’s security is applied

Page 26: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Build Data Model (cont.)

• Home screen

Page 27: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Build Data Model (cont.)

• To create a new DM, click here

Page 28: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Build Data Model (cont.)DM Main Screen

Page 29: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Build Data Model (cont.)DM Main Screen

• We will create a • list of values, then a• parameter, then a • data set

Page 30: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Build Data Model (cont.)DM Main Screen

• Select the correct data source• And check “Include Empty Tags for Null 

Elements” so that all data elements are shown in XML data

Page 31: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Build Data Model (cont.)DM – List of Values (LOV)

• Create a LOV called ProjectLOV• Type is “SQL Query” – and select Data Source• Enter SQL Query

• The SQL query will return a list of Project ID’s

• The LOV is used when we create the Parameter

Page 32: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Build Data Model (cont.)DM – Parameter

• Create a parameter• The parameter “p_project_id” is a special 

parameter recognize by P6

• Parameter Type is Menu

• Use the LOV we just created

• Allow multiple selection

• Select “All Values Passed” because we use the “IN” clause in the Data Set’s SQL

Page 33: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Build Data Model (cont.)DM – Data Set

• 1st, click on Data Sets

• 2nd, click on action button

• 3rd, select “SQL Query” option

• After “SQL Query” is selected, the Data Set screen is displayed (see next slide)

Page 34: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Build Data Model (cont.)DM – Data Set • 1st, enter a Data Set 

name – and use the Default Data Source

• Next.

• If the query is simple, we could use the “Query Builder”.

• However, we will copy/paste the SQL that we developed in the SQL Developer tool.

Page 35: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Build Data Model (cont.)DM – Data Set

• Click OK to check syntax

• After clicking OK, the Data Elements created by the Data Set are shown (next slide)

Page 36: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Build Data Model (cont.)DM – Data Set

• For each project record, these are the available data elements/columns for the report

Page 37: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Build Data Model (cont.)DM – Data Set

• Change the Group Name from G_1 to “PrjList”

Page 38: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Build Data Model (cont.)DM – Save and Generate XML Data

• Save

• Generate XML Data – see next slide

Page 39: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Build Data Model (cont.)DM – Generate XML Data then Save to DM

• XML Sample Data

• Select projects• Change “Number of 

Row” to All• Click “Run”

Page 40: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Build Data Model (cont.)DM – Save Sample Data to DM

• Select “Save As Sample Data” which will save the data to the DM

• If we were building a report in the Word Add‐on tool, we would use “Export XML” instead 

• Click action button

Page 41: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Build Data Model (cont.)■ The DM is created and saved

■ Sample XML data was created

■ Now, we build the Report

■ To build the Report,

▪ Create new Report

▪ Select DM (that we just created)

▪ Create new Layout within the Report

▪ Save Layout and Report

▪ Move to P6Reports folder

▪ Reattach the DM to the “moved” Report

▪ Log into P6, select the Reports tab, expand folder nodes and run Report

Page 42: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Build Report

• To create a new Report, click here

Page 43: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Build Report (cont.)Report – Select DM, Use Report Editor, and Save

• Select an existing DM name – ProjectList

Page 44: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Build Report (cont.)Report – Create Layout using Report Layout Editor

• Each Report will use 1 DM

• Each Report can have 1 to many Layouts

• Select a template for the Layout

• In our example, we will select Blank/Landscape

Page 45: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Build Report (cont.)Report – Blank Layout

• Here is the area where we will build the report layout by adding objects to this area.  Objects such as layout grids, text items, data tables, charts, etc.

Page 46: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Build Report (cont.)Report – Blank Layout

• Here are the data elements from the DM that we can insert into our layout

• Here are the objects we can insert into the layout

Page 47: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Build Report (cont.)Report – Insert Layout Grid

• Now we have a grid to insert other objects

Page 48: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Build Report (cont.)Report – Join Cells and Insert Data Table

• After cells are joined, insert Data Table into “joined” cell

• Now we can drop Data Elements into the table

Page 49: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Build Report (cont.)Report – Drop Data Elements into Data Table

• The sample data from the DM are shown

Page 50: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Build Report (cont.)Report – Drop Data Elements into Data Table

• Continue dropping Data Elements into the table –adjusting column width when necessary

• NOTE: The project manager and current phase columns are to the left so that it is easier to group and subtotal by these columns

• We need to format these date columns

Page 51: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Build Report (cont.)Report – Format Date Columns

• 1st, select columns

• 2nd, select Data Formatting and select a predefined format

Page 52: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Build Report (cont.)Report – Format Date Columns

• Next, change the column headers by double clicking on the header and entering the new header

• Continue adding other columns such as Planned Units and Remaining Units

Page 53: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Build Report (cont.)Report – Format Numeric Columns

• To format the numeric columns, select the columns then select “Data Formatting”.

• Total and subtotal values are formatted separately

Page 54: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Build Report (cont.)Report

• Added a report header by joining the cells then adding a “Text Item” object

• Also right justified the dates

• Next, we will add grouping and subtotaling by Project Manager then by Phase

Page 55: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Build Report (cont.)Report – Group By in Data Table

• To create a group by for “Project Manager”, select the column

• Then – select the “Column” tab

• Then select “Group Left” under “Grouping”

Page 56: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Build Report (cont.)Report – Group By in Data Table

• Group By“Project Manager”

To sort and subtotal by “Project Manager”, select the column then click on Sort and Subtotals

Page 57: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Build Report (cont.)Report – Group By in Data Table

Repeat the same grouping for the Phase column that was done for the“Project Manager” column

Also, add row labels for Phase and PM Subtotal

Page 58: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Move Report to P6■ The DM is created and tested

■ The Report is created and tested

■ To run a report from P6, the Report and DM must be moved to the P6Reports folder

Page 59: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Run Report from P6

Page 60: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Run Report from P6

Select 1 or more projects or an EPS, then click OK then click Run.

Then the file is saved to a PDF file

Page 61: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

First ReportMulti-Project Status Report (Report Name: Project List)

Page 62: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

2nd ReportSecond report:

■ Pivot Table Report

▪ Users can select 1 project, multiple projects, or an EPS

▪ Users select a starting date for the weekly data

▪ For all projects, the report will sum the following data on a weekly basis: actual labor units and remaining labor units

▪ For each row/project, the Project ID, Name and Data Date will be included

▪ The target output format is an Excel spreadsheet

Page 63: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

2nd Report (cont.)Pivot Table Report (Report Name: PivotTable)

Example 1

Example 2

Page 64: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

TablesThe following tables will be used in the second report

■ P6Project – this table has a list of all published projects and related data (such as start date, finish date)

■ P6ReportDate – this table has a record for every date for all published projects. For example, if the earliest date for any published project is June 1, 2011 and the latest date is December 31, 2020 – then there would be a record for every date in that timeframe.

By looking up a date, I can determine the starting week for that date, the Julian date, the week of year, etc

■ P6ActivitySpread – this table has all activity data (such as actual planned labor units) for each day for every activity in all published tables

Page 65: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Build 2nd Report DM Overview

1 LOV for projects

2 parameters –ProjectsStarting Date

2 Data SetsDate RangeActivity Data

The Data Sets are linked together so that we get the date range first, then execute the SQL in the ActData DS

Page 66: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Build 2nd Report DM - LOV

Page 67: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Build 2nd Report DM – Parameters – for selecting projects

Page 68: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Build 2nd Report DM – Parameters – for selecting starting date

Page 69: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Build 2nd Report DM – DateRange Data Set

-- From the date selected by user, determine-- the beginning of week date and -- the ending week date (which will be 52 weeks)-- FIRST_WEEK_DATE_STR and LAST_WEEK_DATE_STR will be used as -- parameters in another data setSELECT TO_CHAR(MIN(RPTD.WEEKBEGINDATE),'yyyy-mm-dd') AS FIRST_WEEK_DATE_STR,

TO_CHAR(MAX(RPTD.WEEKBEGINDATE),'yyyy-mm-dd') AS LAST_WEEK_DATE_STRFROM P6REPORTDATE RPTD,

(SELECT INNER_RPTD.WEEKBEGINDATE FROM P6REPORTDATE INNER_RPTDWHERE TRUNC(INNER_RPTD.DAYDATE) = :p_startdate) WEEK_START_DATE

WHERE TRUNC(RPTD.DAYDATE) BETWEEN WEEK_START_DATE.WEEKBEGINDATE AND (WEEK_START_DATE.WEEKBEGINDATE+363);

-- 363 is (52 weeks x 7 days MINUS 1 day)

Page 70: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Build 2nd Report DM – DateRange Data Set (cont.)

-- From the date selected by user, determine-- the beginning of week date and -- the ending week date (which will be 52 weeks)-- FIRST_WEEK_DATE_STR and LAST_WEEK_DATE_STR will be used as -- parameters in another data setSELECT TO_CHAR(MIN(RPTD.WEEKBEGINDATE),'yyyy-mm-dd') AS FIRST_WEEK_DATE_STR,

TO_CHAR(MAX(RPTD.WEEKBEGINDATE),'yyyy-mm-dd') AS LAST_WEEK_DATE_STRFROM P6REPORTDATE RPTD,

(SELECT INNER_RPTD.WEEKBEGINDATE FROM P6REPORTDATE INNER_RPTDWHERE TRUNC(INNER_RPTD.DAYDATE) = :p_startdate) WEEK_START_DATE

WHERE TRUNC(RPTD.DAYDATE) BETWEEN WEEK_START_DATE.WEEKBEGINDATE AND (WEEK_START_DATE.WEEKBEGINDATE+363);

-- 363 is (52 weeks x 7 days MINUS 1 day)

• Here, we get the starting day of week based on the date the user selected from the P6ReportDate table

• Then, we extract all records from P6ReportDate starting with the first day of week for 1 year (or 363 days) 

• From that date range, get the earliest date and the latest date using MIN and MAX functions.  I convert the dates into strings because it is easier to pass strings (rather than dates) to other data sets. 

• In the ActData data set, FIRST_WEEK_DATE_STR and LAST_WEEK_DATE_STR will be used as parameters.

Page 71: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Build 2nd Report DM – ActData Data Set

Page 72: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Build 2nd Report DM – ActData Data Set (cont.)

-- The SELECT statement in the WITH clause will extract all -- activity spread data AND it will also determine which week the data -- falls into WITH ALL_DATA AS(

SELECT PRJ.ID AS PRJ_ID,PRJ.NAME AS PRJ_NAME,PRJ.DATADATE AS PRJ_DATADATE,TRUNC(RPTD.WEEKBEGINDATE) AS RPTD_WEEK_BEGIN_DATE,TO_CHAR(TRUNC(RPTD.WEEKBEGINDATE),'YYYY-MM-DD') AS RPTD_WEEK_BEGIN_DATE_STR_SORT,

TO_CHAR(TRUNC(RPTD.WEEKBEGINDATE),'MM/DD/YY') AS RPTD_WEEK_END_DATE_STR, NVL(ACTS.ACTUALLABORUNITS, 0) AS ACTS_ACTUALLABORUNITS,NVL(ACTS.REMAININGLABORUNITS,0) AS ACTS_REMAININGLABORUNITS

FROM P6PROJECT PRJ,P6ACTIVITYSPREAD ACTS,P6REPORTDATE RPTD

WHERE PRJ.ID IN (:p_project_id) ANDACTS.PROJECTOBJECTID = PRJ.OBJECTID ANDTRUNC(ACTS.STARTDATE) = TRUNC(RPTD.DAYDATE)

)-- END OF WITH CLAUSE

-- This SELECT statement will use the results from the -- WITH clause - and group and sum the data by project-- and weekSELECT PRJ_ID,

PRJ_NAME,PRJ_DATADATE,RPTD_WEEK_BEGIN_DATE, RPTD_WEEK_BEGIN_DATE_STR_SORT,RPTD_WEEK_END_DATE_STR,SUM(ACTS_ACTUALLABORUNITS) AS SUM_ACTUALLABORUNITS,SUM(ACTS_REMAININGLABORUNITS) AS SUM_REMAININGLABORUNITS

FROM ALL_DATAWHERE RPTD_WEEK_BEGIN_DATE BETWEEN

TO_DATE(:FIRST_WEEK_DATE_STR,'yyyy-mm-dd') AND TO_DATE(:LAST_WEEK_DATE_STR,'yyyy-mm-dd')GROUP BY PRJ_ID,

PRJ_NAME,PRJ_DATADATE,RPTD_WEEK_BEGIN_DATE, RPTD_WEEK_BEGIN_DATE_STR_SORT,RPTD_WEEK_END_DATE_STR

ORDER BY RPTD_WEEK_BEGIN_DATE_STR_SORT;

Page 73: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Build 2nd Report DM – ActData Data Set (cont.)

-- The SELECT statement in the WITH clause will extract all -- activity spread data AND it will also determine which week the data -- falls into WITH ALL_DATA AS(

SELECT PRJ.ID AS PRJ_ID,PRJ.NAME AS PRJ_NAME,PRJ.DATADATE AS PRJ_DATADATE,TRUNC(RPTD.WEEKBEGINDATE) AS RPTD_WEEK_BEGIN_DATE,TO_CHAR(TRUNC(RPTD.WEEKBEGINDATE),'YYYY-MM-DD') AS RPTD_WEEK_BEGIN_DATE_STR_SORT,

TO_CHAR(TRUNC(RPTD.WEEKBEGINDATE),'MM/DD/YY') AS RPTD_WEEK_END_DATE_STR, NVL(ACTS.ACTUALLABORUNITS, 0) AS ACTS_ACTUALLABORUNITS,NVL(ACTS.REMAININGLABORUNITS,0) AS ACTS_REMAININGLABORUNITS

FROM P6PROJECT PRJ,P6ACTIVITYSPREAD ACTS,P6REPORTDATE RPTD

WHERE PRJ.ID IN (:p_project_id) ANDACTS.PROJECTOBJECTID = PRJ.OBJECTID ANDTRUNC(ACTS.STARTDATE) = TRUNC(RPTD.DAYDATE)

)-- END OF WITH CLAUSE

• The results of the WITH clause are stored in ALL_DATA.ALL_DATA can be used like a table later in other SELECT statement

• The SELECT statement (within the WITH) will extract ALL activity spread data on a daily basis for all projects.  Also – for each record, we get the project id, name, data date and (based on the date) the beginning day of week as a string in 2 formats (for to be used for display and the other for sorting dates across the top from Left to Right)   

Page 74: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Build 2nd Report DM – ActData Data Set (cont.)

-- This SELECT statement will use the results from the -- WITH clause - and group and sum the data by project-- and weekSELECT PRJ_ID,

PRJ_NAME,PRJ_DATADATE,RPTD_WEEK_BEGIN_DATE, RPTD_WEEK_BEGIN_DATE_STR_SORT,RPTD_WEEK_END_DATE_STR,SUM(ACTS_ACTUALLABORUNITS) AS SUM_ACTUALLABORUNITS,SUM(ACTS_REMAININGLABORUNITS) AS SUM_REMAININGLABORUNITS

FROM ALL_DATAWHERE RPTD_WEEK_BEGIN_DATE BETWEEN

TO_DATE(:FIRST_WEEK_DATE_STR,'yyyy-mm-dd') AND TO_DATE(:LAST_WEEK_DATE_STR,'yyyy-mm-dd')GROUP BY PRJ_ID,

PRJ_NAME,PRJ_DATADATE,RPTD_WEEK_BEGIN_DATE, RPTD_WEEK_BEGIN_DATE_STR_SORT,RPTD_WEEK_END_DATE_STR

ORDER BY RPTD_WEEK_BEGIN_DATE_STR_SORT;

• Using the results from the WITH clause • We sum the actual labor units and remaining labor units based on the beginning day of 

week• For only the dates in our date range using the parameters :FIRST_WEEK_DATE_STR and 

:LAST_WEEK_DATE_STR

Page 75: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Build 2nd Report DM – Link Data Sets Using Group Link

Page 76: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Build 2nd Report■ The 2nd Report will be created using BI Desktop (the

WORD add-on)

■ From the DM, we need to create a sample XML data file that will be imported into WORD

■ Create XML data just like before by clicking on the XML button but after generating the XML, save XML to a file instead of saving to DM

Page 77: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Build 2nd Report DM – Create XML file

Select “Export XML” to create a file

The file will be loaded into WORD later

Page 78: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Build 2nd ReportWORD Add-on

■ Go to WORD

■ Select “BI Publisher” tab

■ Load XML Data using “Sample XML”

■ Build Report with WORD Add-on – add a Pivot Table

Page 79: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Build 2nd Report WORD Add-on – Pivot Table

Page 80: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Build 2nd Report WORD Add-on – Pivot Table

First drag and drop the values for the left‐most columns (Prj_ID, Prj_Name, and Prj_DataDate)

Next, drag and drop Rptd_Week_Begin_Date_Str to top (not the one with SORT).  

This will be the dates across the top of the report

Page 81: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Build 2nd Report WORD Add-on – Pivot Table

Next, drag and drop the data elements that will be displayed under each date

Then, modify some properties.  

Change RowStyle to “Inline” and set the subtotaling values.

Then click “OK”

Page 82: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Build 2nd Report WORD Add-on – Pivot Table

BIP builds the logic for the Pivot Table 

If we preview, the report will look like

Page 83: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Build 2nd Report WORD Add-on – Pivot Table

To format a data element (such as RPTD_WEEK_BEGIN_DATE), select it then do a right click then select “BI Publisher” then select Properties

Then format the other data elements the same way

Page 84: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Build 2nd ReportWORD Add-on – Pivot Table

■ But there is 1 problem that needs to be resolved.

I want to display the date in MM/DD/YY format but if the dates are sorted using this format, “12/01/14” would be displayed after “01/01/15”

To correct this problem, I created 2 date data elements in the DM – one with “mm/dd/yy” format for display and one with “yyyy-mm-dd” format for sorting

Next, we will modify the XSL/XPATH code behind the pivot table to use a sort data element.

Page 85: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Build 2nd Report WORD Add-on – Pivot Table – Add Sort to Dates

After modifying the titles and formatting the data, the report looks like this.

To modify the sort, select the “C” in the upper left‐hand corner – right click and view the BI Publisher properties

Page 86: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Build 2nd Report WORD Add-on – Pivot Table – Add Sort to Dates

Same code as above but I added carriage returns so it is easier to read

■ <?crosstab:c79844;"//ACTDATA";■ "PRJ_ID{,o=a,t=t},■ PRJ_NAME{,o=a,t=t},■ PRJ_DATADATE{,o=a,t=t}"■ ;■ "RPTD_WEEK_BEGIN_DATE{,o=a,t=t}"■ ;■ "SUM_ACTUALLABORUNITS,SUM_REMAININGLABORUNITS";"sum"?>

Page 87: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

■ <?crosstab:c79844;"//ACTDATA";■ "PRJ_ID{,o=a,t=t},■ PRJ_NAME{,o=a,t=t},■ PRJ_DATADATE{,o=a,t=t}"■ ;■ "RPTD_WEEK_BEGIN_DATE{,o=a,t=t}"■ ;■ "SUM_ACTUALLABORUNITS,SUM_REMAININGLABORUNITS";"sum"?>

Build 2nd Report WORD Add-on – Pivot Table – Add Sort to Dates

To add the SORT data element (already in my DM), insert the data element name between the “{“ and the “,”

■ <?crosstab:c79844;"//ACTDATA";■ "PRJ_ID{,o=a,t=t},■ PRJ_NAME{,o=a,t=t},■ PRJ_DATADATE{,o=a,t=t}"■ ;■ "RPTD_WEEK_BEGIN_DATE{RPTD_WEEK_BEGIN_DATE_STR_SORT,o=a,t=t}"■ ;■ "SUM_ACTUALLABORUNITS,SUM_REMAININGLABORUNITS";"sum"?>

Page 88: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Build 2nd ReportWORD Add-on – Upload Report to BIP

Save report as RTF file

Create a Report in BIP

Upload RTF file to BIP – there are a couple methods but I’ll upload the file from within BIP

Page 89: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Build 2nd ReportWORD Add-on – Upload Report to BIP

In BIP, create Report using the PivotTable DM.

Then Upload RTF using 

Page 90: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Build 2nd ReportWORD Add-on – Upload Report to BIP

After you upload the RTF file, change the output formats to “Excel Only” formats under “View a List” (see next slide)

Page 91: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Build 2nd ReportWORD Add-on – Upload Report to BIP

Page 92: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Build 2nd ReportViewing data in EXCEL

Page 93: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

Please complete the session evaluationWe appreciate your feedback and insight

You may complete the session evaluation either on paper or online via the mobile app

Page 94: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

■ Our purpose is to inform and educate our members on current and future functionality of Oracle Primavera products, while offering a forum for peers to share their experience and knowledge in the use of Primavera. 

■ Educational opportunities across the Primavera product suite

■ Online Learning Series  August 17th – September 4th

■ Call for presentation opening April 27th

■ Monthly Community Calls 

■ 3rd Thursday of the month at 1:00 pm ET

■ Networking with other users within the Primavera community

■ Partnering with Oracle Primavera to meet the needs of our diverse membership.

■ Membership is open to anyone with an interest in the Oracle Primavera products, with no dues for membership. All members can vote on matters brought before the OPSIG. Membership requests may be reviewed by the OPSIG board. 

OPSIG is the home for Primavera Users

Page 95: P6R8.3 Using BI Publisher 11g - Create Multi-Project Status and Pivot Table Reports

If you would like all the Data Models, Reports and SQL used to create these presentation, please send an email to:

Paul G. Ciszewski, PMP(920) 883-9048

[email protected]