Using the <Depends> element within a Parameter, you can define a dependency of a Parameter to another Parameter, with a specified name. For example, a selection of a specific value in one parameter list can trigger the presentation of specific values in a second parameter. This article provides a simple Report example of how to define a dependency between two parameters. The use of <Depends> is supported with Parameters of type Item, String, Boolean and Integer.


Example Configuration

<Report>
    <Parameters>
        <Parameter caption="1st Selection" as="String" name="p1" defaultValue=" 'Yes'">
            <Values>
                <ForEach select="['Yes','No']">
                    <AddValue/>
                </ForEach>
            </Values>
        </Parameter>
        <Parameter caption="2nd Selection" name="p2" defaultValue=" 'Y1'">
            <Log>---- #{? $p1}</Log>
            <Depends name="p1"/>
            <Values>
                <Choose>
                    <When test="$p1 = 'Yes'">
                        <ForEach select="['Y1', 'Y2', 'Y3']">
                            <AddValue/>
                        </ForEach>
                    </When>
                    <When test="$p1 = 'No'">
                        <ForEach select="['N1', 'N2', 'N3']">
                            <AddValue/>
                        </ForEach>
                    </When>
                </Choose>
            </Values>
        </Parameter>
    </Parameters>
</Report>

Example Result  

For more details on Parameters, see Using Parameters with String, Integer and Boolean Data Types and/or the application Help.