This recipe demonstrates the use of script to show columns based on selection parameter.
Sample Input :
= First =
COMPANYNAME,SALESREP,ORDERDATE,PURCHASEORDERNUMBER,
FREIGHTCHARGE,SALESTAXRATE,PRODUCTNAME,QUANTITY,
COSTPERKG,DISCOUNT
= Second =
SALESREP,ORDERDATE,FREIGHTCHARGE,SALESTAXRATE,QUANTITY,
COSTPERKG
Steps taken :
- Input parameter to determine the columns to display
- Script to extract each column from the input and insert into array- Written at Report’s Render Begin
- Function to return the label for each column- Written at Function Definitions for Global Access
- Condition at Render If determine rendering of column
Screenshot of choosing columns (parameters):
Screenshot of the output based on selection:
To download the necessary files for this recipe, refer to the attached ZIP package.
HowToRenderDynamicColumns.zip (6.0 KB)