Setting the Float Bar Y-Axis-Range via Reportparameters


https://www.nevron.com/Forum/Topic6593.aspx
Print Topic | Close Window

By Sebastian Herbrand - 12 Years Ago

Hello,

my Issue is the following:

In our DB are planned Services which have a Start- and End-Date. To help the Supervisors planning their
Teams I search these Records for Services with a Daterange provided by two Date Parameters they can Set
in the Report.

The Chart-Y-Axis displays all found Data, but I want to Display only the Range defined by the Reportparameters.
I already tried to set the Values "Begin" and "End" on Axes->Primary Y->Range but this seems to have no effect.

I believe it's a "Beginners-Problem" but I just don't get the Trick.

Do you have any suggestions on what I do wrong here?

Thanks

Sebastian

By Nevron Support - 12 Years Ago

Hi,

First, we will need you to give us more details on the chart. From your post we assume that you are showing perhaps a float bar chart, where the float bar begin is the StartDate and float bar end is the EndDate.

If this is the case the PrimaryY axis will automatically scale to show the range of values available on the bars, so you do not need to manually modify its range. Please elaborate.

 

By Sebastian Herbrand - 12 Years Ago

Hi,

I think this described Standard behavior is my Problem.

I don't want the Chart to automatically scale based on the Data, it should take the dimensions given by the parameters.
I added a Screenshot to show my Problem in Detail. As you can see, the parameters are set to January, but the
Chart shows more than a year, because the retrieved data covers that range.

Best Regards

Sebastian

By Nevron Support - 12 Years Ago

Hi,

The screenshot partially clarifies the case. The Range Timeline Scale needs both the Begin and End of the range to evaluate to valid date time values. What expressions do you use to set these properties?

Another way to clamp the values to the range defined by parameters is to actually clamp the values of the Float bar. For example your Value expression can be:

=Min(Max(Fields!Value, Params!MinDate), Params!MaxDate)

 

 

By Sebastian Herbrand - 12 Years Ago

Hi,

thanks for the advices.
The Parameters are defined as DateTime so I tried to put them in without any Conversion but that didn't work.
After that I tried different Conversions

  • CDate(Parameters!StartDatum.Value)
  • DateValue(Parameters!StartDatum.Value)
  • FormatDateTime(Parameters!StartDatum.Value,"yyyy-MM-dd hh:mm:ss:fff")

All this didn't work, so found a workaround: In my SQL I set the Values of the found Data to the End/Start-Parameters if
they are out of the limit.

I think this will work for me.

Best regards

Sebastian