Monday, March 26, 2012

Parameter defaults not working

Hi,

i have some parameter dropdowns in a report, and i have default values for those parameters, but when viewing the report through IE (just as a customer would), the defaults for the dropdowns are not working - in multivalue dropdowns nothing is selected, and in single select dropdowns the value "<Select Value>" is showing.

The ParameterValue entries of the parameters consist of MDX style values, so they would look like this:

ParameterCaption ParameterValue

-- --

1 January 2006 [Sales Date].[Date Description].&[2123]

and the rdl looks like this (the first one is single select, the second one multi):

<ReportParameter Name="FromSalesDateDescription">
<DataType>String</DataType>
<DefaultValue>
<Values>
<Value>[Sales Date].[Date Description].&amp;[2332]</Value>
</Values>
</DefaultValue>
<Prompt>From Date</Prompt>
<ValidValues>
<DataSetReference>
<DataSetName>FromSalesDateDescription</DataSetName>
<ValueField>ParameterValue</ValueField>
<LabelField>ParameterCaption</LabelField>
</DataSetReference>
</ValidValues>
</ReportParameter>

<ReportParameter Name="Saleserson">
<DataType>String</DataType>
<DefaultValue>
<Values>
<Value>[Saleserson].[Saleserson].[All]</Value>
</Values>
</DefaultValue>
<Prompt>Saleserson</Prompt>
<ValidValues>
<DataSetReference>
<DataSetName>SalesersonDataset</DataSetName>
<ValueField>ParameterValue</ValueField>
<LabelField>ParameterCaption</LabelField>
</DataSetReference>
</ValidValues>
<MultiValue>true</MultiValue>
</ReportParameter>

I will mention now that the MDX values used in the defaults are correct. Can anyone give me an idea about this?

Thanks,

sluggy

I have a similar problem. Did anyone ever get a hint on this?

TIA!

|||

Don't know if I understand you correctly but I have something like this:

MyDateDataSet:

select GetDate() ID, 'Today' Description
union
select GetDate()-1, 'Yesterday'
union
select GetDate()-30, '30 days ago'
order by ID desc

I added parameter to my report: MyDateParam

Available values:

*from query

*Data set: MyDateDataSet

*Value field: ID

*Label field: Description

Default value:

*from query

*value field: ID

In RDL it looks like this:

<ReportParameter Name="MyDateParam">

<DataType>String</DataType>

<DefaultValue>

<DataSetReference>

<DataSetName>MyDateDataSet</DataSetName>

<ValueField>ID</ValueField>

</DataSetReference>

</DefaultValue>

<AllowBlank>true</AllowBlank>

<Prompt>MyDateParam</Prompt>

<ValidValues>

<DataSetReference>

<DataSetName>MyDateDataSet</DataSetName>

<ValueField>ID</ValueField>

<LabelField>Description</LabelField>

</DataSetReference>

</ValidValues>

</ReportParameter>

Either in designer and www it works fine. Default value is the first item in the query (“Today”).

Maciej

No comments:

Post a Comment