In this article
The following Questionnaire Element parameter types are used in Forsta Reportal:
- Fixed Questionnaire Element - You define a list of questions that the viewer can select from. This type is typically used in conjunction with a Navigator on a report page. Add the Navigator to the page and drop the Parameter on the Navigator. To specify the possible values of the parameter, double-click the parameter and add elements from the data source to the Parameter Values tree.
- Free Questionnaire Element - The parameter is not defined by a list of questions, but is a placeholder and will be set by a selection made by the viewer in a drill-down (for example, selecting a statement from a grid), thus inheriting the item the viewer has selected in a table/chart.
- Derived Questionnaire Element - This is similar to a free element, but instead of being set to the item the viewer has selected, it can be set to a corresponding item. This is typically used to associate open text variables with, for example, elements of a grid.
Fixed Questionnaire Parameters
You can set a fixed questionnaire parameter using a script as in the example below:
if(state.Parameters.IsNull("NoSeALLindexesDERIVED"))
{
var hex : QuestionnaireElement = report.DataSource.GetProject("ds0").CreateQuestionnaireElement("CSIideal");
state.Parameters["NoSeALLindexesDERIVED"] = hex;
//hex.RecodingID = "rec16"; You can add a recode to the question being loaded as well
//if setting only to a categorization
//state.Parameters["NoSeALLindexesDERIVED"] = new ParameterValueCategorization("ds0","nki");
}Derived Questionnaire Parameters
state.LoadParameterLabel("q1");
var questionnaireElement : QuestionnaireElement = state.Parameters["q1"];
if(questionnaireElement != null){
text.Output.Append(questionnaireElement.Label);}