Compartir a través de


DefaultValue Element (RDL)

Specifies the default value to use for the parameter.

Sintaxis

<ReportParameter> Name="...">
    ...
    <DefaultValue>
        <DataSetReference> Name="..."> <!-- or <Values> --> 
            ...
        </DataSetReference> <!-- or /Values -->
    </DefaultValue>
    ...
</ReportParameter>

Element Characteristics

Characteristic Description

Data type and length

None

Default value

None

Cardinality

0-1: Optional element that can occur once or not at all. For more information, see "Remarks."

Element Relationships

Relationship Element

Parent element

ReportParameter

Child elements

DataSetReference, Values

Notas

The DefaultValue element must have one and only one child element: DataSetReference or Values.

The value of DefaultValue is used for the parameter if the user does not provide a parameter value. If no value is provided for DefaultValue either, the value for the parameter is Null.

When using the DataSetReference element, the default is the first value in the field specified by the ValueField element.

One and only one default value is allowed for Boolean parameters.

If one of the default values is not valid, the entire set of default values is treated as not valid.

If the sibling Prompt element is omitted*,* DefaultValue is required if the value for the sibling Nullable element is False or the values within the sibling ValidValues element do not contain Null.

Vea también

Referencia

Report Definition XML Elements
Nullable Element (RDL)

Ayuda e información

Obtener ayuda sobre SQL Server 2005