SSRS 2008 - charts by groups with matrices underneath - reporting-services

The report user wants to have groups by business unit and within each group they want to chart a set of same 4 metrics one under another: metric1, metric2... metric4. Under each of the merticN chart they want a matrix showing metricN values in rows where the months are the columns (metricN is actually 3 metrics: current month's, YTD and previous YE which is the same for every month).
Question: I know that it is possible to use list, bound to a group, to show charts by groups. Is it possible to insert a matrix for the same group under the chart (not to the right of it)?
I tried inserting nested rectangles, but a matrix inside a nested rectangle can no longer be bound to the same dataset, needless to say to the group (dataset is disabled).
As a proof of concept I can build a matrix with a chart inside the proper group, which does not solve the task of putting charts above the data. The charts, even so small, look fine in design, but in preview mode SSRS plays some dirty tricks. The resulting chart (occupying 100% of the group box and leving no space for group title, of course) is very ugly - horrible combination of scaling (why?!) and being squeezed into a small area. It looks like SSRS is going mad when a chart is in a confined space. The charts are stretched vertically and horizontally, the lines are thick and fuzzy. Only those charts, that end up in a partial group at the end of the page, look OK from graphical POV.
The most scandalous part is that even though data is correctly groupped by the matrix and reflected in the axis auto-scaling ticks and legends, it is not plotted. The charts remain empty. There must be some 'advanced option' hidden somewhere that is necessary for the charts to work within a matrix, or it is simply bugged.
Edit:
The best I've done so far was adding a Total row above a group and inserting a chart into that cell. It is somewhat closer to the requirement with several drawbacks:
The chart is only above the group name, not above whole matrix
Due to p.1 the chart cannot be made large enough
The matrix's column headers are separated from matrix data by the area
height of the chart
However the chart is still not plotting data. Playing with Category/Series Groups 'Synchronize group in' property is not helping.

To have a chart per group and group data in a matrix one on top of another, one should create a list and insert the required row groups with header rows. Then make group columns except the innermost hidden, delete the detail row and insert both chart and matrix into the innermost child group.
Then put the group fields into the group header cells.
This way the group titles appear at the beginning, then the chart, then the matrix and the last two are repeated in every child group.

Related

SSRS range bar chart, different color when no data

I am looking to change the color in the "gaps" in the range chart that I have built.
Essentially I am trying to build a visualization for the staff to see the availability on bays. The red markings mean the bay is booked, I wanted green then to be in between the red to highlight free bays.
Occupied bays:
I suspect I need to go back to my dataset and add in some date tables to show "null data" to allow a "switch" to work, but I thought someone might know if I could change this without going this way.
An example of the dataset would be:
Following up
here is a screen shot of my output, i added data labels to see if i was going wrong...HOWEVER I also added shadows to my data and my data is actually still there, just hiding behing my secondary bars......
you are right about my data set, i had to add a series grouping to get my appointments all to appear other wise i was just getting the first appointments on the row only to appear....
Following up 2
A further follow up, I have followed #iamdave 's excellent RangeChart.RDL
I have applied my dataset to it but I am now getting the following output, I know I am probably missing something simple, my gut is telling me the cust_id are seperating all the appointments on to seperate lines yet I have both the primary and secondary axis set to "DrawSideBySide = False"
Here is my set up..
here is my latest output, if I could just group all the rows/bars/lines down to the 6 bays it would be great.
You can do this by adding in another data series based on your original dataset, that will require significantly less processing than filling in all your empty periods as suggested by WEI_DBA.
In your dataset, add a new column that returns dense_rank() over (order by BAY) as BayID (order by should be your desired axis label).
This may be best done as a wrapping select statement to preserve the rest of the query logic as is.
In your Range Chart, add in another Values item, with the same Category Field as your current one.
Set the Top Value to 1 and your Bottom Value to 0.
You could also set this to the min and max time of your dataset or the start and end period of your report to only cover the period the Bay was available.
Set it to display on the Secondary Axis for both Vertical and Horizontal axes.
Also select the Do not show this series in a legend option.
Set up the Secondary Vertical Axis in exactly the same way as your Primary Vertical axis.
Set the Secondary Horizontal Axis Minimum and Maximum to the same values as your Bottom and Top above.
Hide both the Secondary Axes.
Select the new Values item and in the Properties window, expand the CustomAttributes section and change DrawSideBySide to False.
If necessary, adjust the order of the Values items in your Chart Data window to make sure the new Range Bar displays underneath your actual data.
Select the original Values item and in the properties sidebar navigate to Data > DataPoint:
Change AxisLabel to =Fields!BAY.Value (Your axis label).
Change Values > X to =Fields!BayID.Value (Value from point 1.).
You should now have a range chart that that displays your data on top of a solid bar, that you can set to any colour you require:

Print all group footer rows on the next page if they won't all fit on the first page

I have a purchase order form in SSRS. It's grouped on the Purchase Order number. There are four rows in the group footer for totals.
Is there a way to keep all rows in the footer together? That is, if all of them won't fit on the page, that all of them will be printed on the next page.
You have two ways of attempting to accomplish this. Using the KeepTogether property for the selected rows or the entire group
Or when SSRS inevitably doesn't do what you want it to do, you can do the ole Rectangle and Textbox trick. Insert a row above the subtotal that is also a group footer. Then insert a rectangle. Once you do this, you can insert a bunch of text boxes and move them freely around and structure them in the same way you had them formatted the 4 separate rows. It would look something like the below. With this way SSRS couldn't split the row onto multiple pages because its all in the same row. For insurance purposes check the KeepTogether box for this row as well.

How can I add TextBoxes to an existing Matrix in an SSRS project?

Why is it that a control that appears in the property list in a BIDS project is not represented in the corresponding .rdl file?
Let me step back a bit; I'm having a heck of a time trying to figure out how to add items to an existing report, either via the XML (.rdl viewed as code) or on the design surface. I can click on a rectangle on the design surface and see a column row above it:
And if I click on the "pipe"-separated segements on that column heading row, I see "MatrixColumn4", "MatrixColumn3", "MatrixColumn2", and "MatrixColumn1" in the designer; for example, here's MatrixColumn3:
However, only one of these columns appears at a time in the Property list - if I select MatrixColumn3 on the design surface, MatrixColumn1, MatrixColumn2, and MatrixColumn4 are not there. The same holds true for selecting any of the others - it turns up temporarily in the Properties list but "hides" all the others:
Stranger yet, when I search the .rdl file (viewed as XML) for "MatrixColumn1" (or "2" or "3" or "4") they do not exist there. In fact, the only reference to "MatrixColumn" in the entire file is this:
<Matrix Name="matrix1">
<MatrixColumns>
<MatrixColumn>
<Width>1.67609in</Width>
</MatrixColumn>
</MatrixColumns>
. . .
This seems exceedingly bizarre - shouldn't there be four sets of <MatrixColumn></MatrixColumn> there?
I want to add another column heading, with a Textbox-as-label and a Textbox below that to display dynamic content, but how can I do it without adding another column heading?, or at least making room for this new column?
I can increase the width of the matrix ("matrix1") by dragging it or by increasing its Size.Width value, but its existing contents expand with it, giving me no room to add TextBoxes inside of it.
Maybe I'm approaching SSRS from a completely wrong mental angle, as I don't see much of a connection between what the report generates and what I see on the design surface and in the XML.
To add another column to a matrix right click the column header and Select Insert column. Then choose either inside group (left or right), or outside group (left or right).
A column created inside the group will repeat for every item in the column group
A column created outside the group will only appear the once to the left or right of the grouped columns.
Are you sure you are referring to a matrix (dynamic columns and rows) and not a tablix (dynamic number of rows only)?
The process for tablixes is the same as for matrixes as described above, just without the inside/outside group option.
Either method described above will include a new column with a single text box to label the column with, and another text box underneath to put the detail in.
You can also do this process by dragging a field from your dataset in the Report Data panel to the appropriate location in your existing table.
Please let me know if this helps, or if I've misunderstood your question and you require a different solution.

SSRS - How to align the vertical axis of 2 chart areas on the one chart

I have basically loosely followed this link
http://www.angelsbiblog.com/2012/02/improve-data-visualization-in-your-ssrs.html
and made the below linked graph. Its one dataset, I have simply pulled in Gross Profit and Sales fields. Neither are calculated fields. I put them in 2 different chart areas, but then as per that link, made the chart areas the same size so they overlay.
*Apologies for a photobucket link instead of inserted image but I don't have 10 reputation points to be able to insert images.
http://i1375.photobucket.com/albums/ag447/AndrewJacksons/IncomeandProfit_zpse074ac02.jpg
what I want to do, is as illustrated by that inserted green arrow in the graph image, is raise up the Zero line for the Income bars (yellow) to the same level as the Profit/Loss(Blue-Red).
I also want the vertical axis to preferably have the same axis, so i dont have to have that secondary axis on the right.
However the main thing is the graphs sharing their zero line. I have made the Profit bars smaller I width than the yellow bars, so in a month of blue profit, it would simply sit neatly inside the yellow income bar.
I haven't added expenses because it should be obvious what they are by the height differential btw Income to Profit or to the Loss.
Any ideas much appreciated.
I have just experienced this problem, but this page did not solve it.
Dan's answer ("simply set the minimum and maximum values for the vertical axes on both areas manually") came close, but did not solve the problem for me because I needed the axis to be automatically calculated. If the maximum of the two datasets is something like 193,456 then you get that exact value as a label on the axis rather than the sensible value of 200,000.
The solution is to allow SSRS to calculate the axis labels automatically but to trick it by using both sets of data in each chart. Then you hide the data set that you don't want the user to see.
In each chart I made the data series of interest a column chart and the other data series a line chart (without markers), as all you need to do is set the fill color for the line series to None. If you try the same with columns for the other series the invisible columns affect the position of the visible columns even if they have been set to zero width.
Make sure both series in the chart use the Primary Vertical axis. Go into properties for the Income series > Go to "Axes and Chart Area", and make sure that the series uses the primary vertical axis:

The width of a list that contains an embedded matrix grows unexpectedly

I have a report in reporting services 2005 that includes a list with an embedded matrix and am attempting to put a border on the list, however, when I run the report in visual studio the matrix is growing past the end of the page and therefore the border is growing with it causing it to grow into the second page. It appears that there was supposedly a fix for this in reporting services 2000 service pack 1 but I am still experiencing the issue in 2005.
The list has a details group that limits the records on a row to 4 using the following expression: =ceiling(rownumber("list1")/4), the matrix has a column group that should recycle those based on the rownumber determined by the list using the following expression: =rowNumber("list1_Details_Group")
I have also attempted to put the list in a rectangle in hopes to stop the matrix from growing to no avail.
How do I effectively stop the matrix form growing past the space allowed by the list control?
I found a solution to this.... the list was initially the width of the report which cause the boarder on it to grow that amount of space between the end of the matrix inside and the end of the list. If I make the list the size of the matix that is embedded it will be the size of the matrix after it grows to accomodate the neccessay values.
In terms of the border, if you want the boarder of the list to line up with the width of the report a few things need to be done. The size of the matrix columns that grow for each row must be exact where if there are 4 columns for each row the width of the matrix column is the width of the report / 4. In addition you must always have 4 columns of data for each row in the matrix. This can be accomplshed in the query by using the % (Mod) operator and adding additional records as needed.