Search code examples
reporting-servicesssrs-2008ssrs-expression

What are the asterisks in quotes doing in this VB function for a textbox expression in SSRS?


This changes the decimal places displayed on a percentage in a textbox. Can someone help me break it down and explain the asterisks? Thanks.

=IIF((ReportItems!Textbox68.Value > 1 and ReportItems!Textbox68.Value < 2), "*",
     IIF((ReportItems!Textbox68.Value > 2 and ReportItems!Textbox68.Value < 3), "**",
     IIF(ReportItems!Textbox68.Value > 3, "***", ReportItems!Textbox68.Value))
 )

Solution

  • This is evaluating the values and when the case is met, the return will literally be asterisks, unless it does not find any of these cases to match, then it will return the value of ReportItems!Textbox68.Value.

    Trying to format this as a percentage will be problematic since it does not always return a number.