Problem with column chart displaying two category groups on x-axis
Hello,
I am using Report Builder 3.0 with SSRS 2008 R2 to construct some histogram column charts for our company's reporting.
The x-axis has two category groups: SERIE and TEMPS both are strings.
The SERIE contains the company processes 'PC-01', 'PC-02', 'PC-03'
The TEMPS series contains monthly (YYYY/MM), weekly (YYYY-Wk x) or daily (YYYY-MM-DD) time intervals as strings : '2010/01', '2010-Wk 1', '2010-01-01'
The user specifies a parameter as to which kind of report to display: montly, weekly or daily.
The X-axis should have two lines for example:
For the monthly report
2010/01 2010/02 2010/03 2010/01 2010/02 2010/03
PC-01 PC-02
or for the weekly report
2010-Wk 1 2010-Wk 2 2010-Wk3 2010-Wk 1 2010-Wk 2 2010-Wk3
PC-01 PC-02
The "Weekly" intervals (2010-Wk 1) display correctly with the two SERIES and TEMPS lines on the x-axis.
However, the "monthly" and "daily" intervals only show the TEMPS group. The second SERIE line on the x-axis has disappeared and the string '2010/01' is getting converted to a datetime 01/01/2010.
Is there anyway to force the reporting services to not convert the Monthly and Daily strings '2010/10' into a datetime value and to display the two x-axis lines correctly?
Below is a repro scenario. I'm using the French version or Report Builder, so I don't have the exact wording of the US Version.
Thanks for your help and Happy New Year!
Christopher
============================================================================================================
1/ Create two datasets : Monthly and Weekly using the SQL queries below.
2/ Insert a Column Chart using the Weekly dataset
Data:
[Sum(YVALUE)], Category Field : TEMPS
This appears in the properties box as
DataPoint\Values\X =Fields!TEMPS.value
DataPoint\Values\Y =Sum(Fields!YVALUE.Value)
Category Group:
SERIE
TEMPS
Series Group: (none)
Horizontal (x-axis) properties.
Type of axis : Category (This shows up in the properties as Scalar : False)
Chart DataSetName: Weekly displays correct
Chart DataSetName: Monthly loses the second x-axis SERIE group and the string '2010/01' has been converted to datetime values
-- MONTHLY dataset Query
-- Problem: the string '2010/10' is being converted to datetime by reporting services
SELECT '2010/10' as TEMPS, 'PC-01' as SERIE, 1000 as YVALUE
UNION
SELECT '2010/11' as TEMPS, 'PC-01' as SERIE, 2000 as YVALUE
UNION
SELECT '2010/12' as TEMPS, 'PC-01' as SERIE, 3000 as YVALUE
UNION
SELECT '2010/10' as TEMPS, 'PC-02' as SERIE, 500 as YVALUE
UNION
SELECT '2010/11' as TEMPS, 'PC-02' as SERIE, 1500 as YVALUE
UNION
SELECT '2010/12' as TEMPS, 'PC-02' as SERIE, 2500 as YVALUE
-- WEEKLY dataset Query
-- Displays correctly
SELECT '2010-Wk 25' as TEMPS, 'PC-01' as SERIE, 1000 as YVALUE
UNION
SELECT '2010-Wk 26' as TEMPS, 'PC-01' as SERIE, 2000 as YVALUE
UNION
SELECT '2010-Wk 27' as TEMPS, 'PC-01' as SERIE, 3000 as YVALUE
UNION
SELECT '2010-Wk 25' as TEMPS, 'PC-02' as SERIE, 500 as YVALUE
UNION
SELECT '2010-Wk 25' as TEMPS, 'PC-02' as SERIE, 1500 as YVALUE
UNION
SELECT '2010-Wk 27' as TEMPS, 'PC-02' as SERIE, 2500 as YVALUE
============================================================================================================Best regards, Christopher Sorensen
December 31st, 2010 7:20am
Hello,
I believe I found the answer. On the Chart Properties, I changed \DataPoint\Values\X from
=Fields!TEMPS.value to nothing. This seems to have solved the problem.Best regards, Christopher Sorensen
Free Windows Admin Tool Kit Click here and download it now
December 31st, 2010 7:51am