[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

SSRS 2008 chart: set line colors

Posted on 2014-01-09
8
Medium Priority
?
1,543 Views
Last Modified: 2014-01-15
Hi experts,

I have an issue on a line chart.
My chart plots project hours for 12 months:
    x-axis: jan to dec,
    y-axis: total of hours

I have 2 value groups: plan-hours and actual hours for each project.

Now I want the report to plot the values for plan and actual using the same color but using a different pattern, so that each project gets the same color.

I have attached a screenshot of my chart definition in SSRS for more details on my chart.

Does anybody have a clue on that?

Thanks a lot in advance :-)

Chart definition in SSRS
0
Comment
Question by:Lupo09
[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
  • 4
  • 4
8 Comments
 
LVL 37

Expert Comment

by:ValentinoV
ID: 39768084
To give them the same color: right-click each line in the designer and select Series Properties.  Switch to the Fill page and specify your preferred color.

The line style is set through the Border page.
0
 

Author Comment

by:Lupo09
ID: 39768277
Hmm, that won't work as the user is free to select as many projects as he wants.

I don't know how many lines there will be at run time, I only know that each project will be represented by two lines: one cor the actual values and one for the plan values.
0
 
LVL 37

Accepted Solution

by:
ValentinoV earned 1500 total points
ID: 39770284
Ow right, I see what you mean now!  In that case the approach needs a little more creativity.  To ensure that each project uses its own color the best option is to add a color field to your dataset.  Hopefully your query can be edited?  Let me know if you need help with this part. (Currently I don't even know what your data source is, but I assume a regular SQL Server DB?)

Once you've got the color field in the dataset you can just use that in the Color property of both series.
0
What’s Wrong with Your Cloud Strategy ?

Even as many CIOs are embracing a cloud-first strategy, the reality is that moving to the cloud is a lengthy process and the end-state is likely to be a blend of multiple clouds—public and private. Learn why multicloud solutions matter in this webinar by Nimble Storage.

 

Author Closing Comment

by:Lupo09
ID: 39770314
Yes that works as a workarround (because i have to foresee the maximum number of projects that may be selected).

My apprach is:
In my SQL string I use the DENSE_BANK() -clause in order to get a unique number for each project
Then I use the case clause to assign a color to the first 20 numbers
I have to do it that way since I have some 100 projects, I cannot assign colors to each project. Instead I find the number of selected projects which I limit to 20 (only up to 5 or 6 are sensible I think)

Now I have a color for each project in the selected resultset.
And now I can assign the color field to both of the series and use different patterns in order to distinguish them.

Thanks!
0
 
LVL 37

Expert Comment

by:ValentinoV
ID: 39770442
Glad to hear you got it to work!  And indeed, limiting the number of projects seems sensible, the chart becomes unreadable otherwise anyways...

Something I was thinking: as you may already know, SSRS uses color codes represented in RGB and a color consists of three times a number in the 0 - 255 range in hexadecimal.  As you've given each project a unique number perhaps it's an option to come up with a formula that generates a unique color code per project instead of hard-coding the actual colors.  Some food for thought :)

Good luck with the project!
0
 

Author Comment

by:Lupo09
ID: 39770469
Interesting idea!

I will think aboout it,
thanks!
0
 
LVL 37

Expert Comment

by:ValentinoV
ID: 39770471
BTW: I just noticed you've given my answer a B-grade, what's the reason for that?
0
 

Author Comment

by:Lupo09
ID: 39781641
Oh, hey...

yes, I thought, I figured out a proper way to assign colors to projects on my own, and this is "only" a workarround since the number of selectable projects is limited (which is not a real problem in reality, of course).

Thanks!
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Written by Valentino Vranken. A while ago I wrote an article called Chart Optimization Tips (http://www.experts-exchange.com/articles/Microsoft/Development/MS-SQL-Server/MS-SQL_Reporting/Chart-Optimization-Tips.html).  This article explained how …
Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …

656 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