06.19.08

SQL Server Reporting Services Chart Label Interval

Posted in Programming at by chenty

When you generate a chart using date dimension for x-axis, by default, it will try to show every date as label, which make the label unreadable if you have hundreds of date. This problem can be resolved by setting “interval” in “Major gridlines”. For example, if you put “5″ in interval, it will only show one label every 5 days.

However, the problem may persist if the date range are flexible. If you have a report period varies from 1 days to 10 years, a set number in interval may not fit all circumstances. A solution is to set a fix number of labels shown (flexible interval) instead of fix interval.

Put an expression like this one as interval: =Floor(Count(Fields!Date.Value)/5)

With this expression as interval, the chart will show only 6 labels in x-axis regardless of the date range.

Leave a Comment