Friday, March 9, 2012

report manager - parameter bug

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..
<?xml version="1.0" encoding="utf-8"?>
<Report
xmlns="http://schemas.microsoft.com/sqlserver/reporting/2003/10/reportdefinition"
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:ReportID>
<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>I will post this on the private newsgroup as a bug...
thanks
--
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
<klumsy@.xtra.co.nz> wrote in message
news:1108605533.668474.147440@.c13g2000cwb.googlegroups.com...
> 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..
>
> <?xml version="1.0" encoding="utf-8"?>
> <Report
> xmlns="http://schemas.microsoft.com/sqlserver/reporting/2003/10/reportdefinition"
> 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:ReportID>
> <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>
>|||By the way, the bad behaviour was duplicated on my machine...
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
<klumsy@.xtra.co.nz> wrote in message
news:1108605533.668474.147440@.c13g2000cwb.googlegroups.com...
> 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..
>
> <?xml version="1.0" encoding="utf-8"?>
> <Report
> xmlns="http://schemas.microsoft.com/sqlserver/reporting/2003/10/reportdefinition"
> 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:ReportID>
> <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>
>|||You may be interested in this related thread:
http://msdn.microsoft.com/newsgroups/default.aspx?dg=microsoft.public.sqlserver.reportingsvcs&mid=5d83b939-71ab-47fa-9f85-9d15d90dacb9
Also check my recent posting in that same thread for a possible workaround
on RS 2000 (specifying hidden parameters through report designer).
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Wayne Snyder" <wayne.nospam.snyder@.mariner-usa.com> wrote in message
news:OEIuxKPFFHA.3284@.TK2MSFTNGP09.phx.gbl...
> By the way, the bad behaviour was duplicated on my machine...
>
> --
> Wayne Snyder, MCDBA, SQL Server MVP
> Mariner, Charlotte, NC
> www.mariner-usa.com
> (Please respond only to the newsgroups.)
> I support the Professional Association of SQL Server (PASS) and it's
> community of SQL Server professionals.
> www.sqlpass.org
> <klumsy@.xtra.co.nz> wrote in message
> news:1108605533.668474.147440@.c13g2000cwb.googlegroups.com...
>> 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..
>>
>> <?xml version="1.0" encoding="utf-8"?>
>> <Report
>> xmlns="http://schemas.microsoft.com/sqlserver/reporting/2003/10/reportdefinition"
>> 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:ReportID>
>> <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>
>

No comments:

Post a Comment