SSRS Line Graph like a pivot table
I'm trying to illustrate financial trends for directors and managers using a line graph. The columns or x axis would be a sliding window of the last 12 months beginning with previous month (the data for the current month is not complete). For example, the current month is September so the graph would have the columns: Sep Oct Nov Dec Jan Feb Mar Apr May Jun Jul Aug When it is October the columns would be: Oct Nov Dec Jan Feb Mar Apr May Jun Jul Aug Sep The Y axis would be total $. Since it is 2011 the plotted data series would be: Period totals for 2010/2011 Period budget for 2010/2011 Period totals for 2009/2010 I could build this data using T-SQL but I think that I should be able to generate the graph, a pivot table, and dynamically generate the series names and column titles in SSRS using a simple data set something like: GLT_COMPANY GLT_FISCAL_YEAR GLT_ACCT_PERIOD SUM_CURRENT_PERIOD_ACTUAL SUM_CURRENT_PERIOD_BUDGET ----------- --------------- --------------- --------------------------------------- --------------------------------------- 1 2009 9 212501.12 261926.00 1 2009 10 261938.99 263699.00 1 2009 11 219223.47 263535.00 1 2009 12 275635.51 281818.00 1 2010 1 266708.24 0.00 1 2010 2 259362.56 245156.29 1 2010 3 263629.70 279254.58 1 2010 4 238364.34 265906.41 1 2010 5 139351.50 278198.24 1 2010 6 180277.78 278276.52 1 2010 7 213154.91 286405.47 1 2010 8 191378.98 276012.18 1 2010 9 195005.19 296709.50 1 2010 10 216525.84 288910.24 1 2010 11 167723.62 289463.19 1 2010 12 232662.30 312915.56 1 2011 1 272469.84 251869.00 1 2011 2 292625.98 208100.00 1 2011 3 236983.69 238874.00 1 2011 4 275985.36 236383.00 1 2011 5 171039.34 228157.00 1 2011 6 237520.79 235965.00 1 2011 7 183996.86 256302.00 1 2011 8 163116.65 236475.00 (24 row(s) affected) What I am not sure about is how to maintain the sliding window by dynamically generating both the columns and the series names. Anyone ever done something like this? Thanks.
September 19th, 2011 1:32pm

Hi CentralWA, Please refer the first thread to reproduce a pivot table in SSRS and the second thread to display or hidden columns dynamically depending on the selection (one workaround to achieve dynamically generating both the columns and the series names, for there is no build-in feature in Reporting Services to support it): http://social.msdn.microsoft.com/Forums/en/sqlreportingservices/thread/45575334-9970-4862-a99b-3f717f2cfa8b http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/2f0f681b-6fc2-44a6-b257-c8d69d770da6/ Thanks, LolaPlease remember to mark the replies as answers if they help.
Free Windows Admin Tool Kit Click here and download it now
September 21st, 2011 5:06am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics