Custom Filter Section for Report Definition How To?
I'm not finding much information on setting up custom filter sections. Pega 7.2 or 7.1.9
Can someone please provide a general overview of how to use custom filter sections? and how to get the values of the custom filter section to be picked up by the report.
I have a report in the Report Browser and I'm simply trying to have the user input a Start Date and and End Date and I want those values entered by the user to be used to set the parameters defined in the Report definition rule.
I have 2 parameters defined in the report definition. RepStartDt and RepEndDt. I want these parameters to be set by whatever the user chooses for Start Date and End Date in the custom filter section so that I can then pass these parameters through to a sub report. The sub report has the same 2 parameters as the main report.
I have a Section called "TestSection" which is in a data class (SAE-HRServices-Data-Whatever)
This section has 2 date controls set to use property .StartDate and .EndDate and then I have an on Change activities for both these controls which are in the same data class of (SAE-HRServices-Data-Whatever) and this activity sets param.RepStartDt = .StartDate and para.RepStartDt = .EndDate
The report definition is in the same data class (SAE-HRServices-Data-Whatever)
I have the following settings on the report viewer tab:
Display filters using custom section is checked
Display custom section inline is checked
Class name: (SAE-HRServices-Data-Whatever)
When the report is run in the report browser, my section of "TestSection" is displayed just fine and I can pick a start and end date but when I click "Apply Changes", nothing happens
find the below step by step approach for acheiving this.
1. First , identify a section which you want to display for filtering and then get the properties that you want to use for holding the filter criteria. Screenshot below
2. Then in the page and classes tab of the report definition, specify the same page name that you have used in the prefix page of the custom filter criteria field of report definition. Find below screenshot.
3. In the Query tab, under Edit filter section, provide the value as pagename.propertyname. Find screenshot.
This way we can ensure that the value we are giving in the filter section , is getting passed at runtime
We figured it out. Enabling a Custom Filter section creates a top level page (with prefix name) and you can reference that top level page in your main report and in any sub-reports. You have to make sure the main report and the sub report use the same custom filter prefix though. It works, but that ties your subreport directly to your main report always.
We are also having the same requirment, all the approaches have been done as mentioned, only issue facing is that the pxCreateDateTime is a DateTime Property and hence if we select the From and To Date ( it is also in DateTime Property) it doesnt display the values since the time is different.
Is there any way to remove the time from pxCreateDateTime so that it fetches the correct result. We have functions to split the values, but were can we call it? .