PowerPoint and Word reports

This topic provides details on how to create a PowerPoint or Word report.

Overview of PowerPoint report and Word report

The output of a PowerPoint report is a PPTX file, and the output of a Word report is a DOCX file. These reports retrieve specified data from PPM and presents it in a list or table based on your specifications. You can customize such formatting styles as text color, background color, and table color for the report.

To obtain a PowerPoint or Word report, perform these tasks:

Back to top

Create a report type

Before you can create a PowerPoint or a Word report, you must first create a report type in the workbench.

To create a report type in PPM workbench:

  1. Create a new or open an existing report type, and then provide the general information and configure the Fields tab for the report type. For details, see Create and configure report types.

  2. On the Commands tab, click New Cmd, and then enter the appropriate command steps in the Steps area:

    • For PowerPoint reports, enter the following command steps:

      Copy code
      ksc_run_powerpoint_report <PowerPointReportsTemplate.pptx>
      ksc_end_report_parameters

      where

      <PowerpointReportsTemplate.pptx> is the PowerPoint report template, specifying what template is used to render the report. It must match the template's name.

    • For Word reports, enter the following command steps:

      Copy code
      ksc_run_word_report <WordReportsTemplate.docx>
      ksc_end_report_parameters

      where

      <WordReportsTemplate.docx> is the Word report template, specifying what template is used to render the report. It must match the template's name.

    You can include multiple parameters between the initial and concluding lines, passing specified values to the final reports as text during report generation.

    For example, to pass the text "The following programs are managed by Program Manager A" to the PowerPoint file, use the following command steps:

    Copy code
    ksc_run_powerpoint_report PowerpointReportsTemplate.pptx
    SOME_REPORT_PARAMETER=The following programs are managed by Program Manager A
    ksc_end_report_parameters

Back to top

Create the report template

This section describes how to create the report template for PowerPoint report and Word reports.

Report template overview

The PowerPoint template is a PPTX file that looks similar to the final report, and the Word report template is a DOCX file that looks similar to the final report. The template contains variables that are filled with data during report generation. From the template, you define the data to retrieve from PPM, and customize text, background, and table colors for the final report. For details, see Get data for the report.

Obtain the report template

The following example templates are provided for use:

  • PowerPointReportsDemo.pptx in <PPM_HOME>/conf/powerpoint_templates.
  • WordReportsDemo.docx in <PPM_HOME>/conf/word_templates.

Make a copy and then modify the copied template as follows:

Action Details

Define variables

Use either of the following as variables:

  • Use report field tokens: ${V<fieldToken>}

    Note: The "V" prefix is mandatory to make the variable value visible. It cannot be omitted.

    All report field tokens defined in the report type can be used as variables.

    For instance, the ${VREPORT_PROGRAM_MANAGER} in the template is replaced by the selected program manager upon report submission.

  • Use parameters in report type command steps: ${<commandParameter>}

    For instance, insert variables like ${SOME_REPORT_PARAMETER} in the PowerPoint template, and add a corresponding step in the report type command: SOME_REPORT_PARAMETER=The following are programs managed by Program Manager A. In the final report, ${SOME_REPORT_PARAMETER} is substituted with "The following are programs managed by Program Manager A".

    For details, see Command steps.

  • Define new variables using the expression: $! <VARIABLE_NAME>: <VALUE> !

Add hyperlinks

Add hyperlinks using the expression: $@ <myUrl> @, or $@ ${<myUrl> } @

Note: Hyperlinks cannot be applied to part of the line or paragraph; they apply to the entire line or paragraph.

Specify colors

Specify text, background, and table colors using the expression: $% <COLOR> : <TYPE> : <SCOPE> %

where

  • <COLOR> is the color name or color code.
  • <TYPE> (optional) is the color type, can be either of the following: TEXT_COLOR, BG_COLOR, HIGHLIGHT_COLOR.
  • <SCOPE> (optional) is the scope where the color applies, can be either of the following: PARAGRAPH, TABLE, ROW, CELL.

For instance, to make text in a paragraph red, add either of the following at the end of the paragraph:

  • $% red: TEXT_COLOR: PARAGRAPH %
  • $% #FF0000: TEXT_COLOR: PARAGRAPH %

For details on how to create the template, see the example in the templates.

Back to top

Get data for the report

Before running the PowerPoint or Word report, you need to get data to be filled in the report, either directly from PPM dashboard data sources, or running SQL queries against PPM databases.

Get data from PPM dashboard data sources

If you have defined dashboard data sources in the workbench with the relevant data and filters, you can retrieve data directly from dashboard data sources by using the dashboard data source name in the report template.

To get data directly from a dashboard data source, insert the following in the report template:

Copy code
$# data | DATASOURCE | Data_Source_Name #

To add filters to the data source, add "TOKEN :value" at the end:

Copy code
$# data | DATASOURCE | Data_Source_Name | TOKEN : ${FILTER_VALUE} #

For details, see the examples in PowerPointReportsDemo.pptx or WordReportsDemo.docx.

Retrieve data using SQL queries

You can also insert SQL queries (SELECT statement only) in the template to retrieve data for the final report.

For example, the following SQL query retrieves the programs managed by the specified user upon report submission:

Copy code
$# programs_by_sql | SQL | select * from kpmo_programs_v where program_manager = ? | ${REPORT_PROGRAM_MANAGER}  #

For more details using SQL queries, see the example in PowerPointReportsDemo.pptx or WordReportsDemo.docx.

List items in lists or tables:

You can display values retrieved from PPM in lists or tables.

  • To display values in lists, use the expression: $[ <item_variable> : <list_variable> ], each value in the <list_variable> generates one line or paragraph.
  • To display values in tables, use the expression in a table: $[ row: <item_variable> : <list_variable> ], each value in the <list_variable> generates one row in the table.

For details and examples, see PowerPointReportsDemo.pptx or WordReportsDemo.docx.

Back to top

Run the report

You run the PowerPoint or Word report from the PPM menu.

To run the report:

  1. From the PPM menu, select Create > Report.
  2. Select the report category for the report type.

  3. Click the target report type.
  4. Fill the fields required for the report and then click Submit.

    When the report is completed, you can download the report. For details, see View previously submitted report results.

Back to top

See also: