Can we restrict number of columns on UI and have them all in export to excel ?
I have a requirement where the report definition have more than 20 columns, client is okay to have few of them to show under reports browser whereas they want all the 20 columns to be shown when they do export to excel.
I have gone through the OOTB final activity: - pzRDExportWrapper where I can make changes to pyhide to display all the hidden columns in excel. But, I am looking for any better solution rather than making changes to Final rule.
I am not sure how your customer is able export excel. I am assuming by clicking on any button??
I am not sure how you are calling the activity "pzRDExportWrapper". I am assuming you are calling from another activity?
I am just explaning for first column in the report to display.
you can make it for all columns which are hidden in report viewer.
To hide the required column in the report browser, you can click on gear icon for each "columns source" in report definition and select hide in the popup. during report viewer this column would not be shown.
while doing export to excel before calling the activity "pzRDExportWrapper " . open the report definition on a page say "pyReportDefinition". now you will have all the report definition page on clipboard on this page "pyReportDefinition". now by using the "pyReportDefinition" page in step page, make this property "pyReportDefinition.pyUI.pyBody.pyUIFields(1).pyHide" of report to "false". This will unhide for first column in export. after that call the activity "pzRDExportWrapper" for this activity send the primary page as "pyReportDefinition", this page will have our unhide settings during export.
To understand how to do this, as you are in 7.3 version of prpc, Goto Designer Studio->Application->Automated testing->Test cases landing page. you can find export to excel button.
on click we are calling one script. with in that script we are calling an activity "pzExportDataOfTestCasesIntoExcel" this activity will have high level explanation what i have explained above.
"exportToExcelLP" this is a function contains js script, does not have any information for above requirement. Also we are just calling the activity from this js script function other than that nothing we are doing in the script.
Actual logic which I have explanined is in the activity "pzExportDataOfTestCasesIntoExcel". I hope you are able to find this activity.
However, to find the function "exportToExcelLP", please follow like this..
try to find this "pzExportToExcel" js file from the search. In the file we have js function "exportToExcelLP" to call activity.
Before calling the activity "pzRDExportWrapper" with our report definition page on clipboard.
Modify the clipboardpage of the RD to unhide the columns while exporting.
How do you unhide the columns, I have already explained above.