Concept & Configuration
A Report Definition is a Pega rule (Rule-Obj-Report-Definition) that retrieves data from database tables. Think of it as a visual SQL query builder — you configure what data to fetch, how to filter it, and how to display it, all without writing raw SQL.
Every Report Definition has 4 key tabs:
1. Query tab — defines WHAT data to retrieve
◆Columns to display (SELECT)
◆Filter conditions (WHERE)
◆Sorting (ORDER BY)
◆Grouping & aggregation (GROUP BY, SUM, COUNT, AVG, MIN, MAX)
2. Data Access tab — defines WHERE data comes from
◆Applies To class (primary table)
◆Class Joins (JOIN other tables)
◆Associations (reusable joins)
◆Subreports (subqueries)
◆Declare Index joins
◆Max rows to retrieve
3. Report Viewer tab — defines HOW to display
◆Display as List or Summary
◆Chart configuration
◆Custom filter sections
4. Design tab — formatting and layout options
Real-World Tips & Patterns
Where Report Definitions are used in Pega apps:
◆Data Pages — most common use; RD feeds .pxResults to list-type Data Pages
◆Report Browser — business users run reports directly
◆Dashboards — widgets showing case counts, SLA metrics, volumes
◆Autocomplete controls — dropdown search backed by RD
◆Validation — checking if a record exists before creating a duplicate
◆Activities — called via Obj-Browse or pxRetrieveReportData
Key fact: Report Definitions generate SQL at runtime. Pega translates your configuration into database-specific SQL (PostgreSQL, Oracle, SQL Server, etc.). You can view the generated SQL on the Query tab using "Show SQL."