Specified or default maximum value for the Y axis in the SSRS chart

I am trying to create a report in SSRS with a chart whose Y axis I want to limit to a user-defined value. It's easy to use the report parameter for this, but I want the null value to return to the automatically calculated maximum. Is there any way to do this?

+4
source share
2 answers

You can calculate the maximum of yourself as an expression. eg.

=IIf(IsNumeric(Parameters!ChartMax.Value),Parameters!ChartMax.Value,Max(Fields!YValue.Value)) 

You probably want to multiply max by 1.1 to give you some addition to the top of the graph.

+3
source

Jim, your idea gave me an idea to try, and it worked.

If you simply execute the if statement, except returning an empty value when the parameter is not numeric, SSRS 2005 reverts to default.

So this works:

 =IIf(IsNumeric(Parameters!ChartMax.Value),Parameters!ChartMax.Value,"") 
0
source

Source: https://habr.com/ru/post/1285791/


All Articles