I am creating charts for data that is very simple: Students with grades from different subjects, from 2 semesters
Autumn semester which is 'Report 1'
Spring semester which is 'Report 2'
My query is:
SELECT DISTINCT txtPupilID, txtSubjectName, txtForename, txtSurname, txtGrade, intReportID
FROM ReportDB
WHERE (intReportID = '1')
UNION ALL
SELECT DISTINCT txtPupilID, txtSubjectName, txtForename, txtSurname, txtGrade, intReportID
FROM ReportDB
WHERE (intReportID = '2')
order by txtPupilID
I have to create charts for each subject and print them 9 on a page. My graphs worked fine and after a long time trying many things, I finally managed to print the graphs horizontally and vertically, using the ceiling function {=(ceiling(RowNumber(nothing)/3)}. However, this function seems to 'break' my chart because I now have 2 graphs for each subject instead of 1 (i.e. 1 graph for Report 1 and 1 graph for Report 2).
So instead of having one chart for the subject 'English', where grades from Autumn and Spring semesters are shown next to each other, I have 2 charts for 'English', one for Autumn and the other for Spring. I have attached screen shots of the charts below:
What I had before the ceiling function:
What I now have after the ceiling function:
Does anyone have any idea how to fix this problem? Does it lie somewhere in my dataset? grouping/sorting issues?
Report screenshot:
Related
I have a report showing a table showing details, it has about 380 rows.
I want to add a simple bar chart using the same dataset.
In the chart is one value and one group: value = sum(amount) and category group = description order by sum(amount).
This is working fine, but chart is showing about 120 bars, because of 120 distinct descriptions. I only want to display the top n.
Can this be done in reporting services itself or do I need to do this is a query?
I found the answer myself.
There is a filter operator 'Top N' which can be used. It seems the field used in expression doesn't matter.
However it seems Reporting services first performs the topN en than sort the remaining data. So I had to make a second dataset anyway.
Here is the view of table in ''conception'' view:
Conception view
And here's what it gives:
Executed view
As you can see my Column group entitled [Poste_Histo___Etat_Description_Abrégé] breaks out into 3 categories when I run the report: Comblé, Vacant and Vacant_att
I want to blend Vacant and Vacant att into just 1 category and name it Vacant, so to have only 2 categories when the report is being run.
I tried multiple functions and there was one that got me close, but event then, it only renamed Vacant_att to Vacant and didn't add the 2 columns though:
=IIF(InStr(Fields!Poste_Histo___Etat_Description_Abrégé.Value, "Vacant") Or InStr(Fields!Poste_Histo___Etat_Description_Abrégé.Value, "Vacant_att"), "Vacant", "Comblé")
So my goal is to figure this out and ultimately, portray these same values on a graph in the same manner: that is to have only "Vacant" and "Comblé" as categories.
p.s. If it makes any difference, all the «Expr» are the following formula:
=Sum(IIF(InStr(Fields!Poste.Value, ""+"300") Or InStr(Fields!Poste.Value, ""+"100"), 1, 0))
It's point is to only get the values for that end with 300 or 100.
Thanks a lot to any1 who helps!
I ended up finding my answer myself lol. For any1 having eventually the same problem, here is my approach:
1- In the Query Designer pane of my dataset, I created 2 Calculated members:
One being Comblé including the [Comblé] category and the other being Vacant in which I combined [Vacant] and [Vacant_att].
2- I used the formula mentioned in my question as partly successful and replaced the 1 with the newly created calculated members correspondingly. So:
For Vacant:
=Sum(IIF(InStr(Fields!Poste.Value, ""+"300") Or InStr(Fields!Poste.Value, ""+"100"), Fields!Vacant.Value, 0))
For Comblé:
=Sum(IIF(InStr(Fields!Poste.Value, ""+"300") Or InStr(Fields!Poste.Value, ""+"100"), Fields!Comblé.Value, 0))
3- So this gave me the right numbers BUT (as per the pic attached) as long as I had [Poste_Histo___Etat_Description_Abrégé] as a Parent Group in my Tablix, which was no good since this dimension has 3 categories originaly (Vacant, Vacan att. and Comblé) I ended up with 3 columns who have 2 columns each (my newly created Calculated members - Vacant and Comblé)... so 6 columns
Table 1.0
4- Finally to tackle this issue, I created 2 columns both out of the parent group [Poste_Histo___Etat_Description_Abrégé] : Vacant2 and Comblé2. And I simply copy pasted that same formula in these but only to discover that the values were all 3 times larger (sum of the 3 columns). As a simple way out, I just divided each formula by 3 and . As so:
=(Sum(IIF(InStr(Fields!Poste.Value, ""+"300") Or InStr(Fields!Poste.Value, ""+"100"), Fields!Comblé.Value, 0)))/3
And voilà!
p.s. in Table 1.0, Vacant2 and Comblé2 are a percentage of the ratio of each calculated member over the sum of the two.
I have the following sql:
SELECT
project_title + ' (' + pack_type + ')' AS label
, ordered
, received
FROM [v_stock_and_despatch] ORDER BY [order]
that returns the following table:
label ordered received
Item A 60 76
Item B 63320 63960
Item C 415240 415226
Item D 23150 23150
Item E 147948 187992
Now, in Reporting services I need to show this as a sequence of radial gauges.
I know how to create a one off guage, but I don't know how to create a collection.
The value field for a one off guage looks like this:
=Fields!received.Value /(Fields!ordered.Value) * 100
Can anyone help?
Create a table for your data details, and drag a Gauge item into one of the cells. Your existing expression should work for the gauge's value. The table will give you a row for each of your projects, and the gauge on each row will use the Received and Ordered values for that project.
In my example I've switched the column labels for Received and Ordered, so the values appear as less than 100%.
The same technique will work with Chart items.
I have a report in ssrs 2008, its data source is based on ssas.
I created a pie chart which shows total cost per shape. Dataset of the pie consists of only 4 fields.
Say i have 2 shapes, each of them has total cost. But in addition to that i also get a third slice in the pie which shows total of the other two.
How do i get rid of it?
Ok i figured it out luckily.
The problem was that my dataset returned the total, so i just filtered it in dataset filter expression.
I'm pretty sure there is a way not to return total inside dataset in the first place, if anyone knows, i will be glad to learn
In your dataset you want to change the expression to [Dimension].[Hierarchy].[Attribute].members or [Dimension].[Hierarchy].children. If you do [Dimension].[Hierarchy].members you will get the All member included.
Example: [Date].[Month].members will return each month plus the all member. [Date].[Month].[Month].members will return the members without the All member.
I'm trying to produce a gantt style chart by using the SSRS 2008 R2 ranged bar chart. Gantt chart is for tracking task start and end dates, where task may be stopped and started with these intermissions recorded.
DataTable columns: TaskName, StartDate, EndDate
I can get the chart to display the first row for each TaskName on my chart but I have some instances where there are more than one table row per task with differing dates. i.e. I may start a task, do another task for a bit then step back to a task.
I followed this example to get to this stage: http://pnarayanaswamy.blogspot.com.au/2010/09/range-bar-chart-gantt-chart-using-ssrs.html
Is this request possible with this chart object, if not what would you suggest?
Yes, this is possible. It's actually in the link you refer to:
To view all the sub task data series group in one line, you need to set this DrawSideBySide to False for all the sub task data series.