Home Analytics DevShare
The community of Analytics developers are invited to follow and participate in the developer network.
OpenText technical experts collaborate with supported customers and partners in the Magellan product area.

Displaying Parameter Selections in Report

mwilliamsmwilliams BIRT Guru
edited November 1, 2013 in DevShare
This short script grabs all of your report paramters and steps through them, adding their values to an output string. The script also checks if the parameter is multi-select or not, so that it knows whether it has to step through an object to get the values. I helped someone figure this out in Actuate 11, which at the time used BIRT 2.6.2. However, it probably works for most, if not all, versions.
var output = "";
var paramVal = "";
var pList = reportContext.getDesignHandle().getAllParameters();
var pListSize = pList.size();
for (i=0; i<pListSize; i++){
        var paramName = pList.get( i ).getFullName();
        var paramType = pList.get( i ).getStringProperty("paramType");
        if (paramType == "multi-value"){
                paramVal = reportContext.getParameterValue( paramName ).join(", ");
        }
        else{
                paramVal = reportContext.getParameterValue( paramName );
        }
        output = output + paramVal + "
";
}
output;

Regards,

Michael Williams

eSignLive Evangelism & Community Manager | eSignLive by VASCO
 
Find me on:
Twitter
Facebook
Blog
LinkedIn

eSignLive Developer Community
 
Email me:
Google: [email protected]

Sign In or Register to comment.