Solved

Specify Gradient Range

Posted on 2013-11-14
3
1,191 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Steps to solve SSRS SQL 2008 R2 User Access Control (UAC) Permission Error With the introduction of SQL Server 2008 R2 and Vista (Windows 7 as well) came new enhanced security features. One of the features included was User Access Control (UAC) t…
A recent questions about how to add SSRS named instances, couldn't find any that talks about SQL server 2008, anyway I decided to help by creating some screen shots. The installation is straightforward, you just pop the SQL server 2008 installati…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

730 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