ssrs with visible filter - sql

I have the above SSRS Report. I used adventurewoorks2014. Any adventureworks will do. My problem is that I want to filter by month in this example October 2011 so that the corresponding graph will turn yellow and others are still in blue and visible.
In other words, whenever I choose a value from the top the corresponding graph should turn yellow and I can still see other graph but in blue. Any question please let me know. Many thanks in advance
----Query FROM Adventureworks
SELECT [SalesOrderID]
,[OrderDate]
,DATENAME(MONTH,[OrderDate])+' '+DATENAME(YEAR,[OrderDate]) AS MonthYear
FROM [Sales].[SalesOrderHeader]
enter code here
--------Parameter query
SELECT distinct
DATENAME(MONTH,[OrderDate])+' '+DATENAME(YEAR,[OrderDate]) AS MonthYear
FROM [AdventureWorks2014].[Sales].[SalesOrderHeader]

Create an expression on the backcolor for the graph which sets to yellow if the corresponding label is the same as the selected parameter and blue if not.
Note that if the parameter is changed then the report will need to be regenerated in order for the colour to change. There is no alternative to this behaviour in SSRS.

Related

How contact sql with tableau so that if there was a mistake in report he marked it as red?

Suppose i have data source for tableau to perform report.
dbo.myreport
Also i check is the value(s) right or wrong?
Let me provide picture to be more clear
i create query that check is the value(s) right or wrong. For example 6,6 is wrong and in dbo.checkmyreport i have structure
date;variable;value;right-wrong
07.05.2021;x1;6,6;wrong
how to do to if value from dbo.checkmyreport marked is wrong then it must automatically must be marked as red in tableau report.
Is there possible?
I'm assuming that you have already added this data into Tableau and kept the column names as such right? And you have already created the desired bar chart.
In Tableau add the "right-wrong" dimension to the Color marks and set the colors as appropriate. That should let you color all the bars that are labelled as "wrong" in a specific color.

SSRS Matrix Report : Colors condition

I have a matrix table created with Rows as Days ,Columns as Months and quantity of rainfall as the data field(got all this information from same table 'Rainfall'). I have taken this data from a dataset containing multiple tables in SQL. All of this information displays properly.
Now I have many tables with date field in my dataset in tables other than 'Rainfall'.
In the data field of the matix I need to be able to add my own colors using a Switch case.
The Condition I need is "if a certain date from one table matches the date in my report then i want xxx colour."
eg: there is a table called fertilization which has 3 dates. Now if these 3 dates also exists in my matrix then that block should be colored blue.
Can anyone help me. Thanks!
You can also manage it from sql side while retrieving data from Rainfall table.
You can do this using by right clicking the field that you want the dynamic color on and selecting properties. Select Border and then where it says color hit, click the Fx button. Here you can write a custom expression that will change the background color based upon your code.

SSRS MAtrix/Tablix

I have a report in SSRS report builder 2008 that has a chart that is a definitive size. I would like to make the matrix table fit neatly under the report as it would in excel. However it expands way past the report. I have tried turning can grow can shrink to false did not work. I have tried putting a rectangle and placing the matrix in there with no success. I tried setting the size in the tablix properties but it extends or shrinks below based on the data in the tablix. The tablix is just 6 lines the top line is a expression for the date and then there is previous year previous cumulative current yeat and current year cumulative and receipts %to last year. i have included the expresssions I used in the tablix not that I think it is causing the issue Any help will be greatly appreciated
=Sum(Fields!ID2013_Inventory.Value)
=Sum(Fields!ID2013_Inventory.Value)
=RunningValue(Fields!ID2014_Inventory.Value,Sum,"RECEIPTS_IND_DEC")
=SUM(Fields!ID2014_Inventory.Value)/SUM(Fields!ID2013_Inventory.Value)
Sorry I didn't follow up your comment earlier, it's been busy here...
There is a sledgehammer approach to this that will work, not sure if there is a more elegant way but here goes.
Fist some basics...
Determine how wide your matrix needs to be, let's say 25cm
Let's assume you have a couple of columns on the left that are both fixed at 2cm each. That gives us 21cm to put our varying columns in.
For now assume we only have 28 days, so we need to set the column width of the column group to 0.75cm (21/28).
Test and make sure everything looks OK.
Now here's comes that sledgehammer!
Make another 3 copies of your matrix and adjust the column widths for the next three number of days (so 29,30 & 31).
Now set the visibility of the of each matrix so that it only shows when the related number of days are returned in the dataset.
I don't know what your dataset looks like so I can't give much advice on determining the number of days returned but I often create another dataset that gets the value, in your case something like
SELECT COUNT(DISTINCT MyDateColum) as DateCount FROM MyDates
Or I guess you could probably base visibility on the month and whether its a leap year or not.
Hope that helps, if any of it is unclear let me know and I'll try to get back a little quicker this time.

Displaying column names at the top in MDX like in SQL

Is it possible to display the column name on top in MDX query.
Below is the Result of my MDX query. I want to display the Year column name at the top (Marked in Red)
blank amount(Measure)
ALL 1000
2010 500
2011 500
In above blank section, I want to display the attribute name of the dimension i.e. YEAR.
Thanks in advance
This information is available in the result that is coming back as answer to the MDX query, no matter if you get it back in multidimensional or in tabular form.
But what is displayed is totally dependent on the tool displaying the data.

Changing background color of birt report according to groups

I am generating a BIRT report as shown by image embedded, I am grouping by custmeer such as ACM , AFL etc ...
As you can see I use background alternative color as blue and white, to achieve this I simply use the highlight tab of detail row as(row["__rownum"] % 2 Equal to 0).
now , if I move into more complexity such as different color combination for different groups e.g for group(customer in this case) yellow-white, for group2 red-white etc....
I am using this.getStyle().backgroundColor ='color', but the problem lies into selecting the individual groups, may be some sort of in condition would do the trick, but I am lost
The simplest way to set a row's background colour in BIRT is by adding conditions to the list in the Highlight tab within the Property Editor for the row. It looks as though you have already done this to set alternative lines to blue - by adding extra conditions with additional colours, you can set the background accordingly. This method is most useful where only a small number of colours are required, since you have to set up a different condition for each colour.
Where a larger selection of colours is likely to be required, it would make more sense to do conditional formatting within an event script - you can find an example here.
EDIT: Adding a running group count in BIRT:
Add an aggregation item to your table - you can do this by dragging an aggregation item from the Quick Tools section of the Palette, for example.
In the Aggregation Builder dialog, set the Function to be COUNT, the expression to be 1 and the Aggregate On to be the group you want to count (eg. Customer)
Insert a second aggregation item with the Function set to be RUNNINGCOUNT, the expression to be 1/row[first aggregation name] and the Aggregate On to be Table.
The second aggregation item will be a running count of the groups in the report.