Tablix inline bar chart
I am creating a table and want to have a single inline bar as a visual indicator in a column for each row. I have read the Table Inline Charts portion of http://msdn.microsoft.com/en-us/library/aa964128(SQL.90).aspx and also found the information below on Bob Meyers' blog. However, the one thing I want to do and can't figure out how to do it, is to display a data label right at the end of each bar. For example: Department A ---------- 22.5% Department B ------- 16.0% Department C ---------- 33.7% Any ideas? From blog 1. Add an embedded image to your report that will serve as the "bar" (a simple horizontal gradient usually looks nice) 2. Add a column to your table, and place an Image report item in the detail row cell. 3. Select the embedded image from step 1 as the source for the Image report item. 4. Set the padding on the Image report item to adjust the size and position of the bar within the cell 5. [Here's the kicker] Create an expression for the right (or left) padding that divides a field value by some maximum value, clamps it to a given range if necessary using Math.Min/Max, and then multiplies by the total size of the bar. Example: image1.Padding.Right=((1.0-(Math.Min(Math.Max(Fields!TotalSales.Value,0),100000)/100000))*72) & "pt" Thanks, bwin13
January 12th, 2011 4:57pm

Hi bwin13, I have read the section Table Inline Charts in the article you posted, and also tested both approaches. For the first approach which you are using, I’m afraid we are not allowed to add data label in the cell of bar image. So, we can only use another column to display data values. In order to display a data label right at the end of each bar, we need to use the data label in chart. But from my understanding, the second approach To use a chart for inline visualization might not be appropriate for your needs because charts can only be placed in header or footer. Since this is a limitation that using chart in detail row isn’t natively supported within Reporting Services 2005 and 2008, new visualization data controls Sparkline and Data Bar has been provided in Reporting Services 2008R2. For more information about Sparklines and Data Bars, please refer to: http://msdn.microsoft.com/en-us/library/ee633676.aspx Thanks, Tony ChainTony Chain [MSFT] MSDN Community Support | Feedback to us Get or Request Code Sample from Microsoft Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Free Windows Admin Tool Kit Click here and download it now
January 16th, 2011 6:44am

Hi Tony, Thanks for the info on Sparkline and Data Bar. I will check it out. Thanks, Bwin13
January 18th, 2011 4:16pm

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

Other recent topics Other recent topics