Question

6
Replies
187
Views
JonnyGar Member since 2009 91 posts
BNY Mellon
Posted: March 30, 2015
Last activity: July 17, 2017
Closed

Reports: separating the Source from the Display

Business need: What's the best & most efficient way for users to specialize reports?

From: https://pdn.pega.com/forums/prpc/reporting/reports-separating-the-source-from-the-display

There's been several iterations of reporting in Pega.

Early on, the thinking was to separate the list of columns (Rule-Obj-List) from the criteria definitions (Rule-Query-List/Summary)

I think some variation of this idea might still have merit.

My experience tells me that there's two main pieces of a report: the Source, and the Display.

The Source includes the class/joins, columns, & calculations, and the max rows (e.g., the SQL call, minus the paging)

The Display includes, the criteria values, paging size, output type (e.g., chart), column order/visibility.

Some advantages:

  1. When calling the report programmatically, only the source would be needed (with parameters passed in).
  2. Many different Displays could re-use the same Source.
  3. Typically a user will customize the Display for their own queries.
  4. The user's customization cannot make a runaway query (assuming that the max rows are setup in the Source definition)

Without this customization, user need to SaveAs the whole report, and as such the Source part of the report would be duplicated. Any changes any of the Source fields (e.g., adding properties to the request)

One possible way to achieve this is to create a subclass of Report-Definition which allows certain aspects of the report to be inherited from a specified Report

Related to this -- what's the best way to count the records returned by an existing report?

Given a report (Source + Criteria), is there a function / control that exists that can run a variant of the SQL which just returns the select count(*)?

Never seen this, so have always ended up building this custom.

***Updated by moderator: Marissa to close post***

This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.

Low-Code App Development Reporting
Moderation Team has archived post
Share this page LinkedIn