Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

SSRS - Want to display the same chart multiple times based on DB result

Posted on 2013-12-23
5
Medium Priority
?
3,891 Views
Last Modified: 2014-02-05
Hi, i am relatively new to SSRS, but not new to development or SQL Server. I have a project to create some executive reporting and was wonding if what i want to do is possible.

I have a pie chart that i create which is based on City, the chart shows a breakdown of inventory per city. So for example, in Miami there are 10 of item 1, 15 of item 2, 4 of item 3, etc.

My DB query returns the inventory counts grouped by city.

Is there a way to repeat the same pie chart on a report multiple times, dynamically driven by the data set? If my data set only had results for Miami and JAcksonville, i would have two charts. If it returned Miami, jacksonville, orlando, pensacola, and tampa there would be 5 charts.

Is this possible in SSRS or do all the charts / reports need to be pre-defined? IF its possible how would it be done? FYI this is SSRS 2012 and i am currently using the report builder.

Thanks in advance
Mike
0
Comment
Question by:mikegrad7
[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
  • 2
5 Comments
 
LVL 8

Expert Comment

by:vr6r
ID: 39736741
Yes, SSRS can do that easily.  All you need to do is include the chart in the detail section of your report.  For example in your case your report will be grouped by city, so in the detail section where your inventory rows would go, just drag a chart control from the toolbox into that detail section.  

The values for the chart will be automatically set from the current row in your dataset - all you need to do is select which dataset rows you want the chart to display.
0
 
LVL 37

Expert Comment

by:ValentinoV
ID: 39737436
vr6r's comment is right except for a small part: charts cannot be nested in a detail section of a tablix.  So to be able to nest the chart you first need to add a group to this detail section.  In the Row Groups pane double-click the (Details) item and add a group there.  The trick here is to group on the lowest level in your table.  In your case that would be City (or CityID if you've got that?).
0
 
LVL 1

Author Comment

by:mikegrad7
ID: 39742518
So if i add a chart to the group in the detail section, it will create a chart for every group? This sounds like what i am looking for, but i am skeptical on what the layout might look like. Ill give it a try and see what happens.
0
 
LVL 37

Accepted Solution

by:
ValentinoV earned 2000 total points
ID: 39744538
"So if i add a chart to the group in the detail section, it will create a chart for every group?"

Exactly!  The easiest is to try it out, you'll see immediately how it works out.  Just create the chart as if it wasn't nested in a table, it works identical.
0
 
LVL 1

Author Closing Comment

by:mikegrad7
ID: 39836070
Thanks! Did the trick!
0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

Written by Valentino Vranken. Introduction: The first step of creating a SQL Server Reporting Services (SSRS) report involves setting up a connection to the data source and programming a dataset to retrieve data from that data source.  The data…
How to use Variables  and Custom code in SSRS report and Assembly reference to use compile shared code in SSRS. Its big question for all who are working with SSRS. It is easy to create assembly and refer in SSRS report, still there are some steps…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

604 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