Solved

Specify Gradient Range

Posted on 2013-11-14
3
1,151 Views
Last Modified: 2013-11-15
Hello,

I am using SQL Server Reporting Services 2008 R2. I use Visual Studio 2008 to develop my reports.

I have a report that contains a Line Chart. The Y-axis of the chart has a range of 0 up to 100. While in design view of the report, if I go to the chart and right-click directly above the X-axis and directly right of the Y-axis, the shortcut menu will allow me to click on Chart Area Properties. After the dialog box appears, I click Fill in the left pane. Now I can set background fill options. I go to Fill Style and choose Gradient, I set the primary color to Automatic, the secondary color to Red, and the Gradient Style to TopBottom (in my case the Automatic [or default] color is white).

When saving my settings and previewing the report, the chart is filled with solid red starting at 0 (on the Y-axis) and as it goes up toward 100, the red begins to fade, until everything is white by the time it reaches 100. All this is expected behavior.

What I would like to be able to do is to limit the gradient range between 0 and 20. I want the solid red, which starts at 0, to begin to fade so that by the time it gets to 20, the red is completely gone, and everything from 20 to 100 is the automatic white color.

I was thinking that if I go back to the Chart Area Properties dialog box, and specifically, the Gradient Style dropdown list, I should be able to enter some kind of expression that would control the range of the gradient. I have tried creating a couple of different expressions, but have had no success. Does anyone know how I can do this?

Thank you
0
Comment
Question by:brian_appliedcpu
  • 2
3 Comments
 
LVL 37

Accepted Solution

by:
ValentinoV earned 500 total points
ID: 39650399
The functionality you're looking for is called StripLines.  Select your Y-axis by clicking it.  The Properties window now shows Chart Axis.  Locate the StripLines property and click the ellipsis button to get to the ChartStripLine Collection Editor.

Add one StripLine and set the following properties to get your red-white band from 0 to 20:

BackgroundGradientEndColor: Red
BackgroundGradientType: TopBottom
StripWidth: 20

That should do it, just one is needed because the default white background will be used for the remaining chart background area.

Ref. How to: Highlight Chart Data by Adding Strip Lines (Report Builder 3.0 and SSRS)
0
 
LVL 2

Author Closing Comment

by:brian_appliedcpu
ID: 39651289
Thank you ValentinoV
You nailed it. That is exactly what I needed.
Thank You!
0
 
LVL 37

Expert Comment

by:ValentinoV
ID: 39651551
Glad to hear I could help!  That feature surely is hidden quite well ;)
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Time Corrections for Reports Working with a report, we made some interesting discoveries about the time corrections/updates We are using the following Parameters: Starting Entered Date (Date) formatted as Data type: "Date/Time" Ending Entered …
Introduction In the following article I’ll be discussing and demonstrating several different ways of how images can be put on a report. I’m using SQL Server Reporting Services 2008 R2 CTP, more precisely version 10.50.1352.12, but the methods ex…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now