SSRS Cumulative Chart or S graph - reporting-services

How to create a Column chart with a cumulative line graph running over the columns. I have a dataset that returns the columns months,Qty1 and Qty2 . Now I need a column chart that compares these two quantities for every month in the column and a cumulative line for each Qty running over the column charts.
Thanks !

To get a line chart on top of your bar chart:
(Assuming you're using Visual Studio to design your report, these steps may be different in other environments):
Create your bar chart with the monthly bars that you want.
Click on the chart, then in the ChartData window that pops up, click the green "+" in the Values section, and add the field that contains the value you want to use in your line chart.
Once the value is added, right click it in the ChartData window, and choose "Change Chart Type" - change to a line chart.
Tweak your category, series, and axis settings until it renders in a manner you like.
NOTE: If your cumulative field isn't already a running aggregate, you're going to need to either add such a field to your dataset, or use an expression to work out the aggregation; the line chart won't do that for you.

Related

SSRS Bar Chart Grouping by Date Range

I have a dataset that calculates the actual business days. I've added a bar chart with #beginningdate and #enddate parameters. When I preview the report it only brings back one bar (the first range "1-10 Days") in the report.
The report renders with all 8 bars on the chart I'm only using the #enddate parameter, but the performance on the report is horrible.
Here's my ranges for the chart:
I'm sorting the grouping with the following expression:
Notice the As of Date parameter...this takes a long time to render.
What I need is to get the bar chart (as shown above) shown the same when I have set-up the grouping when I enter a date range.
As you can see below, the report only returns one bar in the chart even though I have 2 date parameters and changed my dataset AND A.EFFECTIVEDATE BETWEEN (#ASOFDATE) AND (#ENDDATE)
How do I make this work to pull back the bars in the chart when adding a date range?
Hopefully this makes sense.
Thank you,
I figured this issue out. What you have to do is right click on the X axis. Under the Axis Options go to intervals and change it from Auto to 1. This fixed my issue and I can now run a chart with a date range.
My chart looks like this with a date range.

SSRS chart should look like my excel chart

I am doing an SSRS report which needs to have a chart that looks like this
Excel chart
and so far on my ssrs report I have this
SSRS chart
how could I make my ssrs chart the same on my excel chart?
Thank you in advance
First thing is to put all your data together. You want to compare different years with the same date. You'll need to change your date field to just use the month and day:
=FORMAT(FIELDS!YourDateField.Value, "MM-dd")
For the axis label, use the Day of the Week:
=FORMAT(FIELDS!YourDateField.Value, "dw")
For your markers, go to Series Properties->Markers tab and set Marker Type to Auto to let SSRS assign a different type to each. If each year is a different series, you can assign them individually.
You can right-click on an Axis and go to properties to format them to look more like the Excel version.
There's a bit more differences but mostly formatting.

Jaspersoft Studio : issues while drawing graph

I am new to JasperReports / Jaspersoft Studio and struggling a bit with Charts. The experts may find it very primitive and it is possible that I could be missing some very basic stuff here.. Here is a brief of what I am trying to do
1) Data source is csv with following fields
Sr_No, URI, total_time_taken, no_of_requests, avg_time_per_req, most_expensive_req, timestamp_of_exp_req
2) The csv has around 40,000 lines in it
3) I want to create a report which has all the 40,000 lines in it (A simple columnar report based on all the fields, sorted by no_of_requests in descending order). This is piece of cake in JasperStudio !
4) Next, I want a summary page with "top 10" URIs in a pie chart where value of the pie series is no_of_requests and key is URI (Pretty straight forward)
I have created a report in JasperStudio with data source as csv. I have selected all the fields and applied no filter to my query for the primary dataset (i.e. the default dataset that I get while creating the report). This helps me print all the 40,000 lines in the "Details" band of the report...so the first part is taken care off.
For summary page I need a pie chart where my challenge is to get "top 10" records from the entire dataset. Thankfully my "top" criteria is based on no_of_requests field and my data is already sorted based on that field. Still, I need a subset of the data to draw a meaningful chart. To achieve this, I tried to create a new dataset with just two fields, the URI (which is the key for the Pie) and no_of_requests (which is the value). I also applied filter expression "($V{REPORT_COUNT} > new Integer(10)) ? false : true" to the my new dataset so that I get "top 10" records from my already sorted data. I verified that the filter is working correctly by running it in "Data Preview" tab of "Dataset and Query" dialogue. I have chosen the new dataset as the "Dataset" for my Pie chart..
When I run the report (in preview mode of JasperStudio), I get 40,00 0 lines printed corrected (in the Details band) but the summary is empty. It draws no pie chart.
I tried same with a Bar Chart, but result is the same. The summary in that case shows just X and Y axis with no data points. The graph is empty.
Am I missing something?
Any help in this regards will be highly appreciated.
I have created two variables which I am gonna use in my pie chart to select the Top N Values from the Dataset. To achieve This I have used $V{REPORT_COUNT} Variable as follows
IF($V{REPORT_COUNT}<=N,$F{Your_Field},"") - If the Variable is a String IF($V{REPORT_COUNT}<=N,$F{Your_Variable},0) - If the Variable is Integer.
Substitute N with your desired number.If you need top 10 values then N=10
Now I have used these two Variables to create my Pie Chart.
I have written a blog for the same as I could not upload images here.
Please do check the same for detailed solution.
http://www.rajeshsirsikar.com/selecting-top-n-values-from-a-csv-datasource-jaspersoft-studio/

Conditional background color in line charts

I am currently trying to convert our charts over from PQ Systems Chartrunner to SSRS 2008 charts. I am currently working with a line chart in SSRS 2008 and am trying to get the background color to change for the different sigmas. I am able to calculate and chart the standard deviation sigma lines, but I have not been able to change the color of the background between the lines.
What I have so far in SSRS:
In the Chartrunner chart, the Red/Yellow/Green zones:
Is there a way to do this in SSRS 2008?
Yes, you need to look at using Strip Lines in your report:
Highlight data by adding Strip Lines.
This is a decent link, too:
Axis Strip Lines in SSRS.
Because you can make these expression based, the bands can be determined at run time. It should work in your case as you always have a set number of bands, just different values when you run the report.
Here's a simple example, based off the following dataset:
Most important thing to note is that I've included the limit rows max, mid, and min in the dataset; these makes the Strip Lines easier to create.
Create a simple chart:
Select the Y Chart Axis and expand the StripLines collection:
You can see that I've set IntervalOffset and StripWidth, based on the fields in my dataset. End result:
So you can see it's possible to do this dynamically as required. It's a simplified example but the concept is readily transferable; you should be able to adapt it to your requirements.

RuningValue not working to give Cumulative Stacked Chart

I have a dataset that is showing the correct data, but putting it into a stacked bar chart and using the RunningValue function to try and plot it cumulatively is giving numbers that start way higher than they should.
My data is aggregated at the database, giving a dataset of:
Date of data
Count
Sum of Value
Filter Item 1
Time Since Date
Stacking Category
5 other fields
I am plotting with Time Since X along the X axis, Stacking Category is my Series field (there are 4 possible options), and my Y is using this function:
=RunningValue(IIF(Parameters!VolumeOrValue.Value="Volume",
Fields!Count.Value,
Fields!SumValue.Value),Sum,Nothing)
This should show me in the first X bar only 1 of the series, with a count as 1, or value of 100. Instead I get 3 of the series, with Counts summed up to 2500, which is more than the total sum of all of the count fields.
Can anyone point me to where my problem is?
Edit: Setting the CategoryField in the Series Properties dialog to match the Catgory that is set for the chart means that each bar is increasing by the right amount, but each stacked slice starts at the size of the entire value of the last bar. I need to get the reset to work properly, but I can't set any "Groupings" as normally recommended, and choosing any field name or Series name causes an error.
I managed to get it working quite simply...
Clicking on the Field on the right hand side of the chart on the Drop Series Fields Here section has a Group properties which when expanded has a name of the grouping. Plugging this into the RunningValue function as the last argument got it working properly (after removing the CategoryField setting).