pega

How to get all rows from Page list and convert them to CSV utilizing pxConvertResultsToCSV


I have a Repeat grid layout, as a source is Report definition. The grid displays twenty row per page. So, if there are thirty-three rows, there are four pages.

I have got a task to export all grid's data to CSV. I have found out the pxConvertResultsToCSV activity. It requires to pass PageList with the properties to convert. I use pgRepPgSubSectionMySectionListB.pxResults to do this. But I have realized, that the property pxResults contains only first twenty elements of pgRepPgSubSectionMySectionListB. But I must export to CSV all the rows. How can I reach this? Thank you.


Solution

  • First run your report by calling pxRetrieveReportData activity of class Rule-Obj-Report-Definition in you acticity

    Syntex:- call Rule-Obj-Report-Definition.pxRetrieveReportData

    It will ask for parameters:-

    pyReportName :- your report definition name

    pyReportClass:- class of the report definition

    pyPageName :- any page name for example ReportListExport. This page must be defined in Pages & Classes of class Code-Pega-List

    After successful execution of this step, you will get ReportListExport.pxResults in Clipboard.

    Now use this pxResults for export.


    There is one more activity to export your Report in excel.

    Call pzViewExportToExcel activity after running your report. And keep ReportListExport.pyReportDefinition as step page of this step.

    This is preferred one.