sql server reporting services:
here is an example of this bug at work.. (i am using RS SP1)
1) upload this report into report manager
2) - RUN THE Report, and notice that the 2nd parameter called
'defaultparam' gets set to the date, and it works.. (all the report
does is show this parameter)
3) - go to the parameter editing section of hte report in report
manager
4) - change something UNRELELATED to defaultparam - for instance the
PROMPT of the firstparameter - dummyparam, and then APPLY
5) - go back to the report - and "defaultparam" nolonger calculates the
date (the default parameter expression in the report)
conclusion, report manager not only updates the parameters you change,
(as it should to give the administrator ability to), it erroneously
updates all the parameters..
also i notice that query based default (foir single value, rather than
name,value) don't show up in report manager as "query based" (and thus also
sucumb to this bug")
<?xml version="1.0" encoding="utf-8"?>
<Report
xmlns="
http://schemas.microsoft.com/sqlserver/reporting/2003/10/reportdefini..."xmlns:rd="
http://schemas.microsoft.com/SQLServer/reporting/reportdesigner"> <RightMargin>1in</RightMargin>
<Body>
<ReportItems>
<Textbox Name="textbox1">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<Top>0.125in</Top>
<rd:DefaultName>textbox1</rd:DefaultName>
<Height>0.25in</Height>
<Width>1in</Width>
<CanGrow>true</CanGrow>
<Value>=Parameters!defaultparam.Value</Value>
<Left>0.25in</Left>
</Textbox>
</ReportItems>
<Style />
<Height>2in</Height>
</Body>
<TopMargin>1in</TopMargin>
<Width>6.5in</Width>
<LeftMargin>1in</LeftMargin>
<rd:SnapToGrid>true</rd:SnapToGrid>
<rd:DrawGrid>true</rd:DrawGrid>
<rd:ReportID>ed8d8d8c-443f-4598-82a1-db50fd8cbc9a</rd:ReportÂID>
<BottomMargin>1in</BottomMargin>
<ReportParameters>
<ReportParameter Name="dummyparam">
<DataType>String</DataType>
<AllowBlank>true</AllowBlank>
<Prompt>dummyparameter</Prompt>
</ReportParameter>
<ReportParameter Name="defaultparam">
<DataType>String</DataType>
<DefaultValue>
<Values>
<Value>=Format(DateTime.Now,"d")</Value>
</Values>
</DefaultValue>
<AllowBlank>true</AllowBlank>
<Prompt>defaultparam</Prompt>
</ReportParameter>
<ReportParameter Name="nextparam">
<DataType>String</DataType>
<AllowBlank>true</AllowBlank>
<Prompt>Report_Parameter_2</Prompt>
</ReportParameter>
</ReportParameters>
<Language>en-US</Language>
</Report>