Practical Applications of Report Definition and Data Pages
Hello Pega Team
I am really confused while doing the exercises of SAE-II. I am not able to know the difference between Data Page and Report Definition. Like when I am doing the exercise of SAE Dental Plans step, what exactly is Report Definition doing here ? Please can you explain me the use of report Definition and Data Page with some suitable real life example. I am currently in the exercise of "Managing Data for Selectable List Controls". and I have no idea of why this report definition is used here. Please help me out.
A data page is simply cache. A report definition is simply a SQL query used to retrieve records from a database - that we then store in our data page (cache).
In the exercise scenario, the available healthcare plans are stored in a database. We want to display the list of available plans on a web form. So, the first question we have to answer is: how do we typically get those records from the database? use a SQL query. How do we execute a SQL query in Pega 7? use a report definition.
Now, if we use a report definition (SQL query) to populate a drop-down list on a web form, everytime someone accesses that web form the same query is run, over and again. If the data is mostly static we are essentially fetching the same results, over and again. So, what can we do to fetch the data once, then use it until it needs to be refreshed? store it in memory (cache). How do we store stuff in memory in Pega 7? use a data page.
Now, everytime someone accessses the web form, the list is populated from cache - saving a trip to the database.
To be clear, if the data is subject to more frequent changes, you could configure the web form so the list is fetched directly from the report definition. But, in the use case for this exercise, we wanted to prove how to fetch records from a database and store them in memory - and then access that memory for use elsewhere in the application.
In the same excercise, when the option is selected, the id is not passed to the create the data page HRPlan Lookup and hence the description and the employee cost is not appearing. Why could this happen. The .MedicalPlan page is cerated and the id is updated in that page, but the other fields or not pulling the values. Please help.
i am creating a report definition but in my case the data source is not a Tradiotional style DB but a REST api, how should i configure a data source of such a type for my report definition?? i have configured a data page with the REST api connector and data is coming up on it... bt i need to query and carry out some operations on that data, report definition is what i need. but i am stuck with this issue..