.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Compare the value of ColumnGroup in Matrix to Parameter selected

Posted By:      Posted Date: April 14, 2011    Points: 0   Category :

I have a SSRS 2005 matrix with one column group and one row group. The column group is based on a calendar month which means the matrix will output 12 columns since there are 12 months within a year.

My report has two parameters; month and year. The end-user would like to display blank columns for months not selected in the parameter. Each month is assigned a number 0-11 (jan = 0, Dec = 11).

If an end-user ran the report and selected Feb as the month, the user would only like to see data in the first two columns and have all other columns be blank which is what I'm trying to illustrate in the example below.


  ColumnGroup ColumnGroup

View Complete Post

More Related Resource Links

Get ServerReport selected Parameter value to use in vb query


I'm using ReportViewer in Asp.net 2.0 to view a SSRS report. I need the value of the selected parameter to use in a vb query. The parameters are populated on the server and its a single selection. Doing searches I've come across  ReportViewer1.ServerReport.GetParameters() but I can't figure out if I can use this to determine which value the user has selected in the parameter dropdownlist. Any help would be appreciated.

sum of only selected column in matrix

i have a simple matrix where is display yearly sales: i want to show avg_1_year, avg_2_year, which uses the formula : yearly amount / number of month... for avg_1_year: 2010 amount / 8 (since we are in august).. customer       2010      2009    2008 2007  avg_1_year  avg_2_year  A                    500     200      200  200      500/8         (500+200)/20 i dont know how to get values of 2010 for avg_1_year and of 2010+2009 for avg_2_year

one parameter is selected hide others

Hi All, I have created a report using SSRS 2008. There are four drop down boxes(A,B,C,D) for separate parameters. There are two values for drop down box A. Cat1 and Cat2. What I want is when Cat2 is selected, other dropdown boxes(B,C,D) should be hidden. But still one of the values from each dropdown box is needed to be selected. Those remaining dropdown boxes has N/A value group. I want to select those N/A when Cat2 is selected. Can anyone tell me how to do this pls? Thanksshamen

How to sum selected matrix column in SSRS


anybody can help me to solve my problem??

i have a matrix report and i want to calculate just column 1 and column 3...

So any idea to solve my problem?

Thanks before :)



SSRS 2005 Matrix results affected by defaulting being set on report parameter?


We discovered some very odd matrix behavior a couple days ago and just today found out what in the RDL seems to be causing the issue.  The issue is that certain cells in the matrix will not be populated if a certain report parameter is defaulted.

The basics:  A matrix report with 6 report parms two of which are passed to the underlying procedure call.  There are 6 datasets behind the report.  4 are related to getting date and timespan information to allow for parameter defaulting.  1 gets a list of customers to populate a selection drop down and the last gets the data.

The data query takes a customer name and an end date.   Via the report parameters the end date parm is defaulted based on a dataset which is chained through the other parms and associated datasets.

The matrix is used to show a months worth of activity by day.  There are two int32 data points in each matrix cell one is a total and one is a failure count.  The data as returned by the reporting proc is already summarized so no aggregate is needed in the matrix.  However, using SUM or not in the matrix cell makes no difference to the strange outcome.

When the report is run with the end date parameter being defaulted one of the rows will incorrectly show 16 cells.  The cells appear as if there is no data.  However, if the proc

How do I remove a parameter value from one paremeter after it is selected in another?


I have two single valued parameters each populated from the same dataset.  After a value is selected in the first parameter I want to remove it as an available value from the second.

So the first parameter list is A,B,C

The users selects B, and then list of values in the second parameter changes from A,B,C to A,C.


howto: display only hierarchy-members (levels) which are selected in the parameter (SSAS and SSRS)


Hi all,

I'm a SSRS/MDX beginner, so this might be a basic question. Sorry for that.

I have a hierarchy, which I use as a parameter. The Hierarchy has 3 levels (level1, level2, level3).

Sample Hierarchy

Now I want to achieve the following:

  • If a user selects CH1 --> the report should show only the CH1 (which is the sum of CH11 + CH12 + CH13)
  • If a user selects CH11 and CH12 and CH13 --> the report should show only these leafs (no aggregations)
  • If a user selects CH1 and CH11 and CH12 and CH13 --> the report should show the leafs and CH1 (seperate)

I guess, this is not that hard, but somehow I don't get it.

Here my sample mdx-query (the hierarchy I'm writing about is "Lieferantenstruktur" and the parameter "@Lieferant" (BOLD)):
(right now, only the leaf-level [Lieferant] is returend by the query)

SELECT NON EMPTY { [Measures].[Einheiten] } 

, NON EMPTY { ([Lieferantenstruktur].[Lieferantenstruktur].[Lieferant].ALLMEMBERS 
* [Artikel].[Artikel Kategorie].[Artikel Kategorie].ALLMEMBERS 
* [Artikel].[Artikel Gruppe Code Name].[Artikel Gruppe Code Name].ALLMEMBERS 
* {[Kundengruppen].[Kundengruppen].[Verkaufskanal].ALLMEMBERS 

Specifying a parameter in a matrix filter - the data type automatically changes to 'text' when it



When specifying a parameter in a matrix filter (Report Builder 2) the data type automatically reverts to 'text' when it should be 'date/time'.  Removing the parameter and re-adding it displays it correctly as 'date/time' but this isn't saved when clicking 'OK'. 

The problem only becomes apparent when the parameter is set to 'allow multiple values'.  Once this is selected the report throws up the following error:

"An error has occured during report processing. The processing of FilterExpression for the tablix 'Tablix1' cannot be performed.  Cannot compare data types System.String and System.Object[]. Please check the data type returned by the FilterExpression."

Is this a bug with Report Builder 2 or is there something wrong with my report model?

Any help/guidance greatly appreciated.

how to compare to check box list and show selected in first checkbox list


how to show first check box chkched which in show in second check box list

 <table> <tr> <td> <b>Author</b> </td> <td> <b>Reader</b> </td> </tr> <tr> <td> <div style="BORDER: thin solid; OVERFLOW: auto; WIDTH: 200px; HEIGHT:200px"> <table id="Chklist_Author" border="0"> <tr> <td><input id="Chklist_Author_0" type="checkbox" name="Chklist_Author$0" /><label for="Chklist_Author_0">Select</label></td> </tr><tr> <td><input id="Chklist_Author_1" type="checkbox" name="Chklist_Author$1" /><label for="Chklist_Author_1">1029.Aarti</label></td> </tr><tr> <td><input id="Chklist_Author_2" type="checkbox" name="Chklist_Author$2" /><label for="Chklist_Author_2">1025.Akash

Compare a parameter with is null returns an error


When I try to execute a query that compares a parameter with is null, I get an error "The specified argument value for the function is not valid. [ Argument # = 1,Name of function(if known) = isnull ]"

This occurs with SQL Server CE 3.5 SP2 for Windows Mobile. With SQL Server CE 3.5 without SP1 or SP2 this error doesn't accurs.

Artur Almeida

dim connection As SqlCeConnection
  dim sqlcmd As SqlCeCommand
    connection = New SqlCeConnection("Data Source=\Storage Card\MyDatabase.sdf")
    Dim strSql As String = "Select * from MyTable where (@MyParam is null or MyField= @MyParam ")
    Dim param As New SqlCeParameter("@MyParam", DbType.DateTime)

Dropdown list in ASP.NET - How to get value selected

am sure this must be very simple, but unforunately I can't figure it out.
I have the following code which populates the dropdown lists from the database. This works fine. Now, when the user selects a particular employee name from the list, I want to get the Employee Id of the selected employee. i.e. I need to get the "Eid" value. I can do this if the EId is loaded in the dropdown list, but in this case only the employee name is displayed. Please let me know howI can get the Eid value even though it is not loaded in the dropdown list.
I would really appreciate your help

Gridview that exports selected rows to Excel

his seems like a messy workaround, but I ended up using two Gridviews - one to display my data and show my checkboxes, and the other which was invisible amd would eventually end up as my Excel spreadsheet.

Enterprize library 4.1 getting output parameter after adding record in db, plz guide



I need to get output parameter (flag) from db after saving record in database. I am using Microsoft Enterprise Library 4.1 for DB. I am inserting record using I Data reader.

Please guide


Compare List


i have got two list<string> containing datas

i would like to compare the both list and the result to new list whch does not contains the same data.(basically unique data)

eg shown below..

list A       list b          list c

a             a                 d

b           d                    c

c            f                   e

f            e

plz let me knw..

How to let user edit selected gridview columns, not entire row



I've got a gridview I would like to let the user edit a couple of columns.  Seems like everything I'm coming across so far makes the entire row editable.  

Hopefully the solution isn't too complicated.  Can someone point me in the right direction?


Row command working on all rows not selected one?



I have this code that hides a column in a gridview.  (The column houses another nested gridview).

    Protected Sub GridView1_RowCommand(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCommandEventArgs) Handles GridView1.RowCommand
        If e.CommandName = "Select" Then
            If GridView1.Columns(0).Visible = False Then
                GridView1.Columns(0).Visible = True
                GridView1.Columns(0).Visible = False
            End If
        End If
    End Sub

The trouble is that if I click the select link on one row that action to hide is carried out on all rows.  How can I set this up so that it only hides the row that is selected?


Use a column as parameter for a sds in another column; gridview


Hola, I have a gridview which is bound to a sds which returns 7 columns and I added two columns from the GUI.  What I want is to fill up the 9th column with DDLs and these  DDLS will get their data from a different sds which is using a stored procedure with a single parameter.  I created the 9th row, used template field, made the sds for 9th row, the stored_procedure, threw a DDL in Item template and all  I need now is to pass a parameter in the first column to the sds in the 9th column.  I can code this but i'm getting tired of aspx.cs :) and would like to do it from the GUI.

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend