Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 Reporting Services Development
 SSRS Decimal Place from parameter

Author  Topic 

micnie_2020
Posting Yak Master

232 Posts

Posted - 2012-11-05 : 21:51:03
Hi All,

I have a parameter selection n0, n2, n4, i tried to do as below bold section:
<Format>=Parameters!deci</Format>

But why it doesn't work?

Please advise.

Thank you


<Textbox Name="Price">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!Price.Value</Value>
<Style>
<FontFamily>Tahoma</FontFamily>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
<Format>=Parameters!deci</Format> <Color>White</Color>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Right</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Price</rd:DefaultName>
<Style>
<Border>
<Color>LightGrey</Color>
<Style>Solid</Style>
</Border>
<BackgroundColor>SlateGray</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-11-05 : 22:06:14
set the expression through format textbox in GUI rather than by editing the RDL

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

micnie_2020
Posting Yak Master

232 Posts

Posted - 2012-11-05 : 22:08:17
Hi Visakh,

I need to have the drop down box for user choose, how many decimal point they would like the report.

I tried this also:
<Format>=IIF(Parameters!deci="0D","N0",IIf(Parameters!deci="2D","N2", IIf(Parameters!deci="4D","N4")))</Format>

But not work.

Please advise.

Thank you.
Go to Top of Page

micnie_2020
Posting Yak Master

232 Posts

Posted - 2012-11-05 : 22:33:47
I manage to solved it, missing .value

Parameters!deci.Value

Thank you.
Go to Top of Page
   

- Advertisement -