I have a matrix report that has five hierarchy levels. There can be from one
to perhaps twenty columns.
How do I filter out a row based on the absences of any data in all the
columns. In other words if any value under a column has a value the records
shows and if a record has no values it is filtered out.
I do not wish to do this in the query because there are other calculations
dependant on counting those recocrds.
I tried the filter .=Len(Fields!MyDataColumn.Value) = 0 but it gave me an
error that reads:
An error occurred during local report processing.
An error has occurred during report processing.
The processing of the FilterExpression for the matrix 'matrix1' cannot be
performed. Cannot compare data of types System.Int32 and system.String.
Please check the data type returned by the FilterExpression.
The data displays what looks like dates or percentages but is really a
varchar(15) datatype
If solving this problem gets me my results then great. However if another
direction is required then I wish to be directed there.
Thanks,
Doug
Hi Doug,
Regarding this issue, I think that we first need to think about what the key factors caused those blank fields in the output matrix report. Apparently the reason is that there are lack of
matched data for some column value and some row value. Assume that the column values are 2002,2003,2004,... and 2008, while the row values are "SubCategory1","SubCategory2" and
"SubCategory3".
If there are only data for (2002, Subcategory1) and (2003, Subcategory1), but no (2004, Subcategory1), then the row with the value Subcategory1 should not be displayed, right?
Unfortunately there is no property that you can set to have the row invisible for a Matrix data region . One method I can think is that you create a T-SQL query with first using PIVOT to
generate same result as the data shown in your matrix and then using an outer SELECT statement to filter those records from the PIVOT query with the condition WHERE column1<>NULL and
column2<>NULL and ... and column20<>NULL.
After that you can create a new dataset with the query and you can use a Table to display the report.
If you want to use Matrix data region, you need to first filter your original dataset to remove the related rows, for example remove all the rows contain Subcategory1 if you could not find any
records for any match (e.g. (2004, Subcategory1)). However I think that either way is not a simple job.
This requirement is indeed complex to be implemented in SSRS. Good luck!
Please feel free to let me know if you have any other questions or concerns. Have a nice day!
Best regards,
Charles Wang
Microsoft Online Community Support
===========================================================
Delighting our customers is our #1 priority. We welcome your
comments and suggestions about how we can improve the
support we provide to you. Please feel free to let my manager
know what you think of the level of service provided. You can
send feedback directly to my manager at: msdnmg@microsoft.com.
===========================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notifications.
Note: The MSDN Managed Newsgroup support offering is for
non-urgent issues where an initial response from the community
or a Microsoft Support Engineer within 1 business day is acceptable.
Please note that each follow up response may take approximately
2 business days as the support professional working with you may
need further investigation to reach the most efficient resolution.
The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by
contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
============================================================

Signature
This posting is provided "AS IS" with no warranties, and confers no rights.
=========================================================
Borivoj Maras - 25 Jul 2008 07:26 GMT
Hi Charles
I have a similar issue. I have a matrix that contains sales information.
Months are on rows and products are on columns. Users choose which products
should be displayed from a multi-select list, so number of products changes.
All products have ‘Units Sales’ value, but only some products have ‘Money
Earned’ information. I would like to hide the column ‘Money Earned’ for
products that have only ‘Units Sales’ value.
The source of data is SSAS 2005 Cube and MDX query returns something like:
2008/05 Product1 $5000 123
2008/06 Product1 $8000 234
2008/05 Product2 null 321
2008/06 Product1 null 432
If this is not possible in reporting services 2005, is it possible with
tablix in SQL 2008?
Thanks,
Maras
> Hi Doug,
> Regarding this issue, I think that we first need to think about what the key factors caused those blank fields in the output matrix report. Apparently the reason is that there are lack of
[quoted text clipped - 43 lines]
> This posting is provided "AS IS" with no warranties, and confers no rights.
> =========================================================
Borivoj Maras - 25 Jul 2008 07:44 GMT
To make it easier to understand what I am trying to accomplish:
Right now I am getting:
Product1 Product2
$ # $ #
2008/05 5000 123 - 321
2008/06 8000 234 - 432
But I would like to get:
Product1 Product2
$ # #
2008/05 5000 123 321
2008/06 8000 234 432
> Hi Charles
>
[quoted text clipped - 64 lines]
> > This posting is provided "AS IS" with no warranties, and confers no rights.
> > =========================================================
Charles Wang [MSFT] - 28 Jul 2008 09:34 GMT
Hi Borivoj,
Could you please have a new thread so that we can better monitor the issue and assist you more
dedicatedly?
Best regards,
Charles Wang
Microsoft Online Community Support
=========================================================
Delighting our customers is our #1 priority. We welcome your
comments and suggestions about how we can improve the
support we provide to you. Please feel free to let my manager
know what you think of the level of service provided. You can
send feedback directly to my manager at: msdnmg@microsoft.com.
=========================================================

Signature
This posting is provided "AS IS" with no warranties, and confers no rights.
=========================================================