Broken SSRS Linechart - reporting-services

I am creating a line chart in SSRS. The problem is: I need to display all the date range so I set the horizontal axis as Scalar. However, the line chart will not able to connect each data point in the sequential order.
Anybody had similar issues?

You could try to sort the data beforehand in your dateset or try sorting it via the sorting tab in the properties for your respective grouping.

Related

Repeating SSRS Matrix Column Headers SSRS 2015

I have an Excel Pivot that I want to reproduce in a SSRS Matrix.
The Excel Pivot looks like this:
Notice the first column header "Full Face Masks" repeats on each column.
My SSRS matrix looks like this:
Notice how "Full Face Masks" does NOT repeat, despite repeating turned on.
As suggested, I've added an image of the Design View:
I've read through DOZENS of answers/sites related to repeating column headers.
I've even gone through the XML line-by-line to see if I can find an answer, but no luck.
So, in SSRS 2015, how do I make my report look like the Excel Pivot image. I KNOW it's possible -- I've seen it done but yeah... I can't figure it out.
[1 - Excel Pivot]: https://i.stack.imgur.com/kVNnG.png
[2 - SSRS Matrix]: https://i.stack.imgur.com/EKmq7.png
[3 - Design View]: https://i.stack.imgur.com/du4f8.png
This is a common problem which occurs when you use groups. You need to do the following thing to resolve this:
Add a row above the group, this row will be created as outside the group. Put the values that need to be repeated in the matrix and shown on the report.
Remove Group columns from the matrix. Do not remove the group, only remove group column from the matrix.

SSRS - add textbox data to a chart

I've created a report in SSRS. The report has a chart in where points are plotted on a scatter chart. My issue now is that we need a line of best fit, which is not directly supported by SSRS.
In order to work it out (as there are a lot of calculations involved to get it from the data we've got) I've had to use custom code. As such, the values are now contained in text boxes (txtDate1, txtValue1, txtDate2, txtValue2).
Does anyone know how I'd be able to get these into my chart (so a point at the locations described in [txtDate1][txtValue1] and [txtDate2][txtValue2])? Or would I have to go back to SQL to figure this out in there?

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.

How to reference in SSRS report (in client mode) objects from application

I have a report created in SSRS in client mode, which is run disconnected: I create the data source in code and pass to the report as a DataView. It works ok.
But I need to be able to reference from the project to some objects (variables, whatever) from my application, as follows:
I need some totals that are not calculated based on data in report. e.g. the reports show total sales in a period, with own total, but I need to display a field in report footer - previous month total (actually they are about 10 other "previous" totals).
I need to have some columns show / hide based on some settings in the application (e.g. I have application option : Show Previous month sales)
Any thoughts on how to do this?
Thank you
Q1-> In order to use data in your reports, you need to specify the data inside of a Datasource object. You cannot simply use the variables if that is what your intentions were. So yes, you are doing this the right way. *** Sorry, you could theoretically used Report Parameters for this.
Q2-> This is the real reason to use Report Parameters. You can pass parameters to the report to do exactly this. If the HideColumn parameter (for example) is set to true, you could hide all the columns that need to be hidden.
http://msdn.microsoft.com/en-us/library/ms251750%28VS.80%29.aspx
For question 1 - the data - the easiest approach would be to create a DataTable in memory and add it as another dataset OR to add fields for your original dataview that contain these values.
Question 2 - To hide or show the columns based on settings make the column visibility an expression based on the value of a parameter, in your code behind set the parameter value to your application setting.