Table of Contents

Article

How to add links that execute reports to a portal gadget

Summary

Developers often want to create custom reports and add those reports as new links to gadgets on their user portal.

This procedure describes how to add a report and link to an existing report gadget.

Approach

Before you begin, create and test the summary view and list view rules for the reports you want to add.

Steps

  1. Use the Advanced Find tool or the Rules Inspector to locate the gadget you want to update. (Most gadgets are HTML rules (Rule-Obj-HTML rule type) with an Applies To key part of Data-Gadget.)
  2. Copy the HTML rule defining the gadget into an application RuleSet., to override the current gadget.
  3. Update your copy. On the HTML tab, add a call to the built-in JavaScript function showList() for list view rules or showSummary() for summary view rules, following the examples below.
  4. Save the updated HTML rule.
  5. Test.

Function Parameters

The showList() function calls the standard activity Rule-Obj-ListView.ShowView. This function has four required parameters that correspond to parameters of the activity.

  • oClass — text parameter containing the Applies To key part of the list view rule
  • sPurpose — text parameter containing the Purpose key part of the list view rule. (The system assumes a third key part of "ALL")
  • bHeader — Boolean parameter, set to true to show the report header or false to hide the report header
  • sAction — corresponds to the pyAction activity parameter. In most cases, set to "Refresh".

Similarly, the showSummary() function calls the standard activity Rule-Obj-Summary.ShowView or Rule-Obj-SummaryViewShowViewGraph, as appropriate. This function has five parameters:

  • oClass — text parameter containing the Applies To key part of the summary view rule
  • sPurpose — text parameter containing the Purpose key part of the summary view rule. (The system assumes a third key part of "ALL")
  • bHeader — Boolean parameter, set to true to show the report header or false to hide the report header
  • sAction — corresponds to the pyAction parameter of the activityIn most cases, set to "Refresh".
  • bEmbeddedChart — Boolean parameter, set to true to display an interactive chart. (The summary view rule must contain a chart definition.)

Sample HTML code to display a summary view report

</td>
<!--6--> <td align="left" valign="top">
<ul>
<li><a href="/Javascript:showSummary(
'PegaCA-Work-QualityReview',
'CAQualityReviewsInProgress',
true,
'Refresh',
false
)">
Quality Reviews In Progress By Work Type</a>
&nbsp;&nbsp;
</ul>
</td>

Sample HTML code to display an interactive chart

</td>
<!--3--> <td align="left" valign="top">
<ul>
<li><a href="/Javascript:showSummary(
PegaCA-Work-QualityReview',
CAQualityReviewSummaryByRating'
true,
'Refresh',
true )">
Quality Review Summary By Overall Rating</a>&nbsp;&nbsp;<img src="https://community.pega.com/images/graph_bar.gif" alt="Graph" title="Graph">
</ul>
</td>

Published February 2, 2007 — Updated February 2, 2007

Have a question? Get answers now.

Visit the Pega Support Community to ask questions, engage in discussions, and help others.