For example, consider an application to process automobile insurance quotes. To price the quote, you need to know the accident history of the driver. Each accident record is an instance of a specific data type. You create a report to return the accident history for a driver, and use a filter to return only accidents for the driver requesting the quote. If the report filter uses the UserName property from pyWorkPage, you must tell the report the class for pyWorkPage. This allows Pega to reference the UserName property and the report filter functions as intended. Otherwise, Pega assumes that UserName is part of the data type, rather than the case, and the filter does not work correctly.
You create a class MyCo-Ins-Work-AutoQuote for the case type AutoQuote, and define .UserName to hold the value of the driver.
You also create a class MyCo-Ins-Data-AccidentHistory to hold records of all the accident histories for each driver. A report definition is created in the AccidentHistory class, and the properties are therefore limited to what is defined in the class. If you need to filter the number of records to only that of the driver, you will use a condition where .UserName = pyWorkPage.UserName. pyWorkPage should represents the AutoQuote record, so you need to define it as such in the Pages & Classes tab of the report definition.
Now, the why... to understand why, you need to understand a few key concepts:
All cases are maintained in the pyWorkPage in the clipboard.