SSRS Matrix with customized column

I need to create a report in SSRS 2008. it's in the matrix format, but instead of normal columns that grows to the right, they want something like stepped rows only for column
Something like this:
col1
col2
col3
row1
row2
row3
instead of the standard matrix
col1 col2 col3
row1
row2
row3
Can anyone suggest to me how to do this?
Thanks!
EDIT: I include an url that hopefully help to clarify things a bit. I basically need to create a report in SSRS that resemble this below:
(sorry, unable to include image yet since I'm a new member)
http://imageshack.com/a/img633/7375/JB1wPE.jpg

Hi Daniel,
According to your description, you create a matrix in SSRS 2008. Then you want to make columns grows with step-shape.
In Reporting Services, dynamic column headers expand horizontally in a matrix. All the column headers can only be within one row. It’s not supported to put headers into different rows. However, we can make each column header displays in different positions
of a text box, then make it look like step-shape. As we tested in our environment, we set expression for column group like bellow:
=Switch(Fields!ID.Value="P01","P01"&chr(10)&chr(10),Fields!ID.Value="P02",chr(10)&"P02"&chr(10),Fields!ID.Value="P03",chr(10)&chr(10)&"P03")
Then we can get step-shape column headers.
Reference:
Adding a Matrix (Report Builder 2.0)
If you have any question, please feel free to ask.
Best regards,
Qiuyun Yu

Similar Messages

  • Matrix with ComboBox Column

    I want to make matrix with combobox column, it is not dificulte, but did somebody know is it posible with different values in each cell?
    first row ( 0, Zero ), ( 1, One )
    second row ( 0, Zero ), (2, Two ), (6, Six)
    third row ( 0, Zero), (1, One )
    .... ( Value, Description )
    I make something but all cell's have the same set of pair (Value, Description )
    P.S. Sorry for my english

    Hi Andy,
    I have been playing around with this for a while now and (seeing that Ibai actually already gave you a solution) I'm just gonna post where I am up to now. I have a matrix with two columns on it (c_1 and c_2). c_1 holds the value 1, 2 or 3. Whenever the user clicks on c_2 I repopulate the combo box according to the value selected in c_1. The only problem is that it shows the second last selected row and not the one that is currently selected. I am just posting it here so it can maybe someday put someone onto the right track.
            If pVal.FormTypeEx = "MainForm" Then
                If pVal.ItemUID = "m_List" Then 'Matrix
                    If pVal.ColUID = "c_2" Then 'Column 2
                        If pVal.BeforeAction = False Then
                            If pVal.EventType = SAPbouiCOM.BoEventTypes.et_GOT_FOCUS Then
                                Dim oForm As SAPbouiCOM.Form
                                Dim oEdit As SAPbouiCOM.EditText
                                Dim oCombo As SAPbouiCOM.ComboBox
                                Dim oMatrix As SAPbouiCOM.Matrix
                                Dim oCol As SAPbouiCOM.Column
                                Dim i As Integer
                                oForm = oApplication.Forms.ActiveForm
                                oMatrix = oForm.Items.Item("m_List").Specific
                                oCol = oMatrix.Columns.Item("c_1")
                                oEdit = oCol.Cells.Item(pVal.Row).Specific
                                oCol = oMatrix.Columns.Item("c_2")
                                oCombo = oCol.Cells.Item(pVal.Row).Specific
                                For i = oCombo.ValidValues.Count - 1 To 0 Step -1
                                    oCombo.ValidValues.Remove(i, SAPbouiCOM.BoSearchKey.psk_Index)
                                Next
                                If oEdit.Value = "1" Then
                                    oCombo.ValidValues.Add("1", "One")
                                ElseIf oEdit.Value = "2" Then
                                    oCombo.ValidValues.Add("2", "Two")
                                    oCombo.ValidValues.Add("22", "TwoTwo")
                                ElseIf oEdit.Value = "3" Then
                                    oCombo.ValidValues.Add("3", "Three")
                                    oCombo.ValidValues.Add("33", "ThreeThree")
                                    oCombo.ValidValues.Add("333", "ThreeThreeThree")
                                End If
                            End If
                        End If
                    End If
                End If
            End If
    Hope it helps,
    Adele
    PS: Ibai, why do you have a new user name? You are the same Ibai Peña right?

  • Need help with custom column in BI Publisher

    Hi Guru's
    I have started working with BI Publisher Recently and need with below issue
    Can you please let me know how can i create a custom column like % based on two existing measures in the report
    I tried creating it in obiee report and used that SQL to create BI Publisher Report , but the result column in obiee is not working as expected in BI Publisher,
    can some one please help me with this
    Thanks a lot in advance.

    This column can be calculated in BIP RTF template. But if it is a column inside a FOR-loop
    then it may need to be calculated slightly different.
    Like I said, get the xml data and rtf then send it to me : [email protected]
    and will get it fixed for you.
    thanks
    Jorge

  • How can i load data from access database to datagridview with custom columns all days of a month ?

    Hi guys
    I am newbie in vb net and I want your help to solve a problem.
    I have this datagridview with two columns and all days of a month in custom columns.
    [IMG]http://i59.tinypic.com/2qwpj15.png[/IMG]
    I also have one combobox to change Year and a combobox to change Month.
    Here is the code to load data
    Private Sub fill_plan()
    dgMonth.Rows.Clear()
    Try
    Dim i As Integer = 0
    Dim query As String = "SELECT MonID,Unitname,Personel,Udate FROM tblMonth ORDER BY Unitname"
    con.Open()
    cmd = New OleDbCommand(query, con)
    myDR = cmd.ExecuteReader
    If myDR.HasRows Then
    While myDR.Read
    dgMonth.Rows.Add()
    dgMonth.Rows(i).Cells(0).Value = myDR.GetInt32(myDR.GetOrdinal("MonID"))
    dgMonth.Rows(i).Cells(1).Value = myDR.GetString(myDR.GetOrdinal("Unitname"))
    dgMonth.Rows(i).Cells(2).Value = myDR.GetInt32(myDR.GetOrdinal("Personel"))
    i = i + 1
    End While
    End If
    myDR.Close() : con.Close()
    Catch ex As Exception
    MsgBox(ex.Message, MsgBoxStyle.Critical, "Error")
    End Try
    End Sub
    With
    this code the
    personel column
    loads the first
    day of the month.
    I want to load
    the column the date that is
    in the database.

    Hello,
    This can be done with less code
    Private Sub fill_plan()
    dgMonth.DataSource = Nothing
    Dim dt As New DataTable
    Try
    Dim query As String = "SELECT MonID,Unitname,Personel,Udate FROM tblMonth ORDER BY Unitname"
    con.Open()
    cmd = New OleDbCommand(query, con)
    dt.Load(cmd.ExecuteReader)
    dgMonth.DataSource = dt
    Catch ex As Exception
    MsgBox(ex.Message, MsgBoxStyle.Critical, "Error")
    End Try
    End Sub
    The above loads all rows, if you want to limit the rows placed in the DataGridView this is best done in the SQL via WHERE conditions and/or with SELECT TOP x.
    Formatting of the data is best done via the property window for the DataGridView on whatever column you want too. Using the above you now need to set the data property for each column and set dgMonth.AutoGenerateColumns = False, in the end we end up with
    less code
    edit is there a reason for returning the primary key? If so then using my method we can hide that field but I see no reason for having it in this case
    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem.

  • JTable with custom column model and table model not showing table header

    Hello,
    I am creating a JTable with a custom table model and a custom column model. However the table header is not being displayed (yes, it is in a JScrollPane). I've shrunk the problem down into a single compileable example:
    Thanks for your help.
    import javax.swing.*;
    import javax.swing.table.*;
    public class Test1 extends JFrame
         public static void main(String args[])
              JTable table;
              TableColumnModel colModel=createTestColumnModel();
              TestTableModel tableModel=new TestTableModel();
              Test1 frame=new Test1();
              table=new JTable(tableModel, colModel);
              frame.getContentPane().add(new JScrollPane(table));
              frame.setSize(200,200);
              frame.setVisible(true);
         private static DefaultTableColumnModel createTestColumnModel()
              DefaultTableColumnModel columnModel=new DefaultTableColumnModel();
              columnModel.addColumn(new TableColumn(0));
              return columnModel;
         static class TestTableModel extends AbstractTableModel
              public int getColumnCount()
                   return 1;
              public Class<?> getColumnClass(int columnIndex)
                   return String.class;
              public String getColumnName(int column)
                   return "col";
              public int getRowCount()
                   return 1;
              public Object getValueAt(int row, int col)
                   return "test";
              public void setValueAt(Object aValue, int rowIndex, int columnIndex)
    }Edited by: 802416 on 14-Oct-2010 04:29
    added                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        

    Kleopatra wrote:
    jduprez wrote:
    See http://download.oracle.com/javase/6/docs/api/javax/swing/table/TableColumn.html#setHeaderValue(java.lang.Object)
    When the TableColumn is created, the default headerValue  is null
    So, the header ends up rendered as an empty label (probably of size 0 if the JTable computes its header size based on the renderer's preferred size).nitpicking (can't resist - the alternative is a cleanup round in some not so nice code I produced recently <g>):
    - it's not the JTable's business to compute its headers size (and it doesn't, the header's the culprit.) *> - the header should never come up with a zero (or near-to) height: even if there is no title shown, it's still needed as grab to resize/move the columns. So I would consider this sizing behaviour a bug.*
    - furthermore, the "really zero" height is a longstanding issue with MetalBorder.TableHeaderBorder (other LAFs size with the top/bottom of their default header cell border) which extends AbstractBorder incorrectly. That's easy to do because AbstractBorder itself is badly implemented
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6459419
    Thanks for the opportunity to have some fun :-)
    JeanetteNo problem, thanks for the insight :)

  • Data of matrix(with userdatasource columns) dissapear in  form_add mode

    Hi all,
    Why when i put the mode of my userform in ADD_mode the data of my matrix (with userdatasource data in columns,not linked to one table) disapear?.
    How i can do to not lost data? Exist any way?
    Thank you all again.
    Regards.

    Aitor,
    I guess you are using UDO, and set it  the ObjectType to form.
    It is a default behavior that B1 will clear the form for new entry, when it switchs to add mode.
    Would you specify the scenario more? Why would you like to keep the data in the form from Find / OK to Add mode?
    Kind Regards
    -Yatsea

  • How to get value in previous column and another row from Matrix with Custom Code?

    I want to calculate the value of tb_Open and tb_Close. I try to use custom code for calculate them. tb_close is correct but tb_Open is not correct that show value = 0 .
    This is example report:
    * I have 2 Dataset , Dataset1 is all data for show in my report. Dataset2 is only first Open for first month
    * First value of Open is item field in Dataset2 and this value only for first month (january). But for other month Open value get from Close in previous month.
    Detail for Red number:
    1. tb_Open -> tb_Close in previous month but first month from item field in Dataset2
    expression =FormatNumber(Code.GetOpening(Fields!month.Value,First(Fields!open.Value, "Dataset2")))
    2. tb_TOTAL1 group on item_part = 1
    expression =FormatNumber(Sum(CDbl(Fields!budget.Value)))
    3. tb_TOTAL2 group on item_part = 3 or item_part = 4
    expression =FormatNumber(Sum(CDbl(Fields!budget.Value)) + ReportItems!tb_TOTAL1.Value )
    4. tb_TOTAL3 group on item_part = 2
    expression =FormatNumber(Sum(CDbl(Fields!budget.Value)) - ReportItems!tb_TOTAL2 .Value)
    5. tb_Close -> calculate from tb_TOTAL3 - tb_Open
    expression =FormatNumber(Code.GetClosing(ReportItems!tb_TOTAL3.Value,ReportItems!tb_Open.Value))
    My custom code:
    Dim Shared prev_close As Double
    Dim Shared now_close As Double
    Dim Shared now_open As Double
    Public Function GetClosing(TOTAL3 as Double,NowOpening as Double)
        now_close = TOTAL3 + NowOpening
        prev_close = now_close
        Return now_close
    End Function
    Public Function GetOpening(Month as String,NowOpen as Double)
        If Month = "1" Then
            now_open = NowOpen
        Else    
            now_open = prev_close
        End If
        Return now_open
    End Function
    Thanks alot for your help!
    Regards
    Panda A

    Looks okay to me.
    Perhaps the variables should be declared as public (?)

  • Matrix with Info Columns from different Table

    Hi, how can i manage to have a column in a matrix that doesn't represent a value of the table the other columns are using?
    For example, i have a matrix and this matrix has values of the UDT (@Table) and one column contains the projectcode. now i want one column in my matrix to show the project name of the OPRJ. how can i manage that, so that the value of this column in the matrix changes when i change the value of the other column with the project code?
    best regards
    Philipp

    Hi
    1) You can fill the matrix from Recordset.
    For example: UDT is [@O01_USERTABLE].
    PrjCode foreign key to the Projects table (OPRJ - not exposed through the DI API).
    So, if you type correctly PrjCode, you can fetch description using method below.
    Dim sSql As String = ""
    sSql = " SELECT U.PrjCode AS PrjCode, S.PrjName As PrjName" & _
               " FROM [@O01_USERTABLE] AS U, OPRJ AS S" & _
               " WHERE U.PrjCode = S.PrjCode"
    oRS = SBO_Company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
    oRS.DoQuery(sSql)
    If oRS.RecordCount > 0 Then
      Dim i As Integer = 0
      oRS.MoveFirst()
      While oRS.EoF = False
        i = i + 1
        oForm.DataSources.UserDataSources.Item("uNr").Value = i     ' 1" matrix column for row number
        oForm.DataSources.UserDataSources.Item("uPrjCode").Value = oRS.Fields.Item("PrjCode").Value
        oForm.DataSources.UserDataSources.Item("uPrjName").Value = oRS.Fields.Item("PrjName").Value
        oMatrix.AddRow()
        oRS.MoveNext()
      End While
    End If
    2) On ManageDataEvent, call Matrix_FetchDescriptions(...)
    Public Sub ManageDataEvent(ByRef BusinessObjectInfo As SAPbouiCOM.BusinessObjectInfo, ByRef BubbleEvent As Boolean)
      Dim oForm As SAPbouiCOM.Form = SBO_Application.Forms.Item(BusinessObjectInfo.FormUID)
      If BusinessObjectInfo.EventType = SAPbouiCOM.BoEventTypes.et_FORM_DATA_LOAD Then
        If Not BusinessObjectInfo.BeforeAction Then
          Try
           oForm.Freeze(True)
         Dim oMatrix As SAPbouiCOM.Matrix
         oMatrix = oForm.Items.Item("mtx00").Specific
         If oMatrix.RowCount > 0 Then
           Call Matrix_FetchDescriptions(oForm, -1)
         End If
          Catch ex As Exception
          Finally
         oForm.Freeze(False)
         oForm.Update()
          End Try
        End If
      End If
      oForm = Nothing
    End Sub
    ' Update column Name
    Private Sub Matrix_FetchDescriptions(ByRef oForm As SAPbouiCOM.Form, ByVal iRow As Integer)
      Dim oMatrix As SAPbouiCOM.Matrix
      Dim oColumn As SAPbouiCOM.Column
      Dim oCell As SAPbouiCOM.Cell
      Dim oEdit As SAPbouiCOM.EditText
      Try
        If SBO_Company.Connect Then
         oMatrix = oForm.Items.Item("mtx00").Specific
         If oMatrix Is Nothing Then Throw New Exception("ERROR: matrix object is nothing")
         Dim iNrRows As Integer = oMatrix.RowCount ' iRow
         If iNrRows > 0 Then
           Dim i As Integer = 1
           For i = 1 To iNrRows
             Dim sCode As String = ""
             Dim sName As String = ""
             Try
                  ' Matrix column PrjCode
               oColumn = oMatrix.Columns.Item("ePrjCode")
               oCell = oColumn.Cells.Item(i)
               oEdit = oCell.Specific
               sCode = oEdit.Value
               sName = GetNameByCode(sCode)
               If Not sName.Equals("") Then
                     ' Matrix column PrjName
                oColumn = oMatrix.Columns.Item("ePrjName")
                oCell = oColumn.Cells.Item(i)
                oEdit = oCell.Specific
                oEdit.Value = sName
               End If
               If iRow = i Then Exit Sub
             Catch ex As Exception
             Finally
             End Try
           Next
           oForm.Refresh()
         End If
        End If
      Catch ex As Exception
        ' log exception
      Finally
        oMatrix = Nothing
        oColumn = Nothing
        oCell = Nothing
        oEdit = Nothing
        System.GC.Collect() 'Release the handle to the table
      End Try
    End Sub
    To get Name using Code...
    Private Function GetNameByCode(ByVal sCode As String) As String
      If sCode.Trim.Equals("") Then Return ""
      Dim sName As String = ""
      Dim oRS As SAPbobsCOM.Recordset
      Try
        oRS = SBO_Company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
        Dim sSql As String = "SELECT PrjName FROM OPRJ WHERE PrjCode = '" & sCode.Trim & "'"
        oRS.DoQuery(sSql)
        oRS.MoveFirst()
        While oRS.EoF = False
          sName = oRS.Fields.Item("PrjName").Value()
          Exit While
        End While
      Catch ex As Exception
      Finally
        If Not oRS Is Nothing Then
          System.Runtime.InteropServices.Marshal.ReleaseComObject(oRS)
          oRS = Nothing
        End If
      End Try
      Return sName
    End Function
    Note: Matrix_FetchDescriptions() have second argument (iRow As Integer) what may be used to indicate in what row you need to update PrjName column.
    May be ItemManagment event when item pressed can be used... Try
    HTH
    BR
    Sierdna S.

  • Matrix  with one column browse one photo

    hai everybody
    i am going to  attached  photos in each and every columns ...
    pls....

    I dont know what you mean exactly? In matrix you want to show images or you want to store images through matrix (as attachments)?
    If you want to show images in matrix, the matrix column must be image type as
    <column uid="colPic" type="117" title="" description="" visible="1" AffectsFormMode="1" width="40" disp_desc="0" editable="0" right_just="0" val_on="Y" val_off="N" backcolor="-1" forecolor="-1" text_style="0" font_size="-1"><databind databound="0" table="" alias=""/><ExtendedObject/></column>
    If you want attach image to matrix, the filed you have binded to matrix must be subtype link as
    oUserFieldsMD.TableName = "ATTACH"
                oUserFieldsMD.Name = "PATH"
                oUserFieldsMD.Description = "path"
                oUserFieldsMD.Type = SAPbobsCOM.BoFieldTypes.db_Memo
                oUserFieldsMD.SubType = SAPbobsCOM.BoFldSubTypes.st_Link
                oUserFieldsMD.EditSize = 250
                lRetCode = oUserFieldsMD.Add
    Then when you dbl click on field, the browse dialog will be shown automaticaly.

  • How to make a unbound datagrid (wpf) with custom columns

    I need to create a flex grid where I have to show different Items on a single cell (one or more button, some label). The number of item can change on different cells so is not possible to create a predefined data source. So I am looking how to setup
    a simple usecontrol that can accomodate the button and use this as column template.
    I have two question:
    1)how can I make the usercontrol able to grow up as the number of button increase and how can I make the datagrid row height "autosize" to accomodate the usercontrol and show all the content
    2) how can I add a empty row on the datagrid and access a single cell (and the usercontrol) to set and read its property.
    I've also tried to do this using a simple wpf grid but its miss many things (head and row fixed header, visible grid) 
    Thank you
    Alessandro
    alex

    I have done a part of the work
    I've generated a dataset with few row and set as itemsource to get the rows on the datagrid
    Then I have wrote a small usercontrol with a single button and a  public sub
    public sub set_text(text as string)
    me.button1.text=text
    end sub
    On the grid I've added the usercontrol as celltemplate
    <DataGridTemplateColumnHeader="Mycontrol1">
    <DataGridTemplateColumn.CellTemplate>
    <DataTemplate>
    <local:UserControl1x:Name="controllo1"/>
    </DataTemplate>
    </DataGridTemplateColumn.CellTemplate>
    Then with this code I can call the set_text sub of a single control on a cell:
    Dimobj
    AsContentPresenter=
    griglia.Columns(2).GetCellContent(griglia.Items(1))
    DimmyDataTemplate = obj.ContentTemplate
    Dimtarget
    = CType(myDataTemplate.FindName("controllo1",
    obj), UserControl1)
     target.Set_text("text to show")
    All work fine till this point.
    I have 2 question:
    1)how can I handle events from my usercontrol (ex. user click a button?)
    2) how can I dinamically add column using the prevous template? Is possible to manipulate direclty the xaml or the only way is to use
    griglia.Columns.Add() ...
    Thank you.
    alex

  • Problem with checkbox column in matrix

    Hello.
    I have a little problem with checkbox column in matrix.
    Column is binded to the UserData.
    It has ValOn="Y", ValOff="N".
    I use C++. It is wird problem. In matrix I have 10 columns - scrollbar role and if You want see checkbox column, You must role to the right. If this column is on the screen, and I use:
    checkcell->PutChecked(VARIANT_TRUE);
    then the checkbox is cheched, and if the checkbox isn`t on the screen and I use this comment - it nothing happening.
    I tried to use ValOn="Y", PutChecked...
    The problem i solved if the column is on the screen - if the column is first in matrix or second, but if it`s last I have a big problem.
    My column with checkbox is not editable, but I tried to make it editable, check it, and then make it uneditable - the same efect.
    How can I solve it ?
    Sorry for my english.
    Kamil Wydra

    Hello Kamil,
    I am not sure about your problem, but here is an example of how to use checkbox in UI API.
    First, create the matrix with checkbox column in Screen painter, and the output is an xml file, like this. Type as 121 indicates that it is a check box.
    - <column AffectsFormMode="0" backcolor="-1" description="" disp_desc="0" editable="0" right_just="0" title="Rented" type="121" uid="Rented" val_off="N" val_on="Y" visible="1" width="41">
      <databind alias="U_RENTED" databound="1" table="@VIDS" />
      <ExtendedObject />
    Second, bind the column to table from DB. This is a bug of 2004 Screen Painter, so if you are using 2005 Screen Painter, there is no problem.
    Third, when you open the form, you can check and uncheck the cell.
    BTW, please set the editable of the column to true.
    Hope this helps,
    Nick

  • SSRS Matrix Issue. Expression calculating in row with no data.

    I have a matrix with multiple column groups for different sales channels. With in each group there are several columns and some with expressions for calculations. The rows are based on sales reps. Now not every sales rep sells in every channel, so there
    are some columns in which a rep will have no data. I want them be blank or show a 0. I can do both of those. The issue I am having is in the expressions for reps that have no data, it is still showing a calculation. It seems to populate that cell with whatever
    the first result of an actual calculation is. See below. For rep D and E they have no calls or sales in this particular sales channel; however, the closing ratio is showing 30.23% (which is the closing ratio for rep A). I need this to be blank or 0 or N/A,
    anything other that a wrong %. I have tried numerous iif and isnothing statements, e.g. =iif(Fields!count_of_customers.Value = 0,0,Fields!count_of_customers.Value/iif(Fields!Calls.Value = 0,1,Fields!Calls.Value)) plus other i have found on the internet
    but none of them work. Can someone please help? Sorry it is not a picture of the report. They need to confirm my account before I can attach pictures. But this is the set up of the report.
    Figure A
    Phone Field
    Rep Calls
    Sales Closing Ratio
    Premium Rep
    Calls Sales
    A 1000
    323 32.3%
    $100,250 A
    50 5
    B 200
    10 5% $50,000
    B 0
    0
    C 300
    15 5% $25,000
    C 25
    5
    D 0
    0 32.3%
    $0 D
    300 50
    E 0
    0 32.3%
    $0 E
    100 15
    F 500
    100 20%
    $300,000 F
    0 0

    Hi RobTencents,
    After testing the issue in my environment, I can reproduce it. To fix this issue, please try to use the expression below to instead the original one:
    =iif(sum(Fields!count_of_customers.Value) = 0,0,sum(Fields!count_of_customers.Value)/iif(sum(Fields!Calls.Value) = 0,1,sum(Fields!Calls.Value)))
    If there are any other questions, please feel free to ask.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • How to fill column value of a matrix with specific color when there is no value in that specific cell?

    Hi All,
    I need to create a 5/5  matrix in SSRS report. The data will be :
    Col_Side   Col_Header   Col_data
    1                  1                1
    1                  1                 1
    1                  2                1
    1                  5                1
    1                  5                1
    1                  5                1
    2                  3                1
    2                  5                1
    3                  1                2
    3                  1                2
    3                  1                2
    4                   2               1
    4                   4               1
    5                   1               1
    5                   1               1
    5                   5               1
    So, the matrix column will be Col_Header and matrix row will be Col_Side and count(Col_data) will be on the data.
    Finally, it will create a 5 by 5 matrix with Count(Col_data) as its data for each combinations. If there is no combination (for ex: in the above data we do not have no combination of (1,3) , (1,4) , (2,1) etc..) then the matrix will be filling that corresponding
    cell with zero.
    Here I need to fill the cells with some colors based on some criteria.
    I need to fill (5,3), (5,4), (5,5) combination with "Red" color.  Like this , I need to give different colors in each of the cells. Here, (5,5) combination will be having 1 in its cell.  (5,4) and (5,3) will be having zero in its corresponding
    cells. I 'm trying to fill all the 3 cells with "Red" color. But, I am able to fill only (5,5) with "Red" color. Since the other 2 cells (5,3) and (5,4), has zero in their cells, it will not fill the cells with "Red" color. 
    How can I fill those two cells (5,3) and (5,4) with red color?
    I know this is very vague. I have no option to give the picture here..
    Please suggest

    Hi Julie,
    According to your description, there is a 5/5 matrix with three fields: Col_Side, Col_Header, Col_data. You drag Col_Side field to Rows, Col_Header to Columns and Col_data to Data, then filling blank cells with zero using expression. Now you want to fill 
    (5,3), (5,4), (5,5) cells with red color using expression, but it has no effect on cells (5,3) and (5,4).
    According to my test, the expression has on effect on cells (5,3) and (5,4) since there is no corresponding data and the cells are blank. As a workaround, we can insert data for cells (5,3) and (5,4) in dataset, then use expression by following steps:
    In the dataset, insert two sets of data (5,3,0), (5,4,0).
    Right-click the cell of data, click Text Box Properties.
    Click Fill in left pane, click (fx) button, then type the expression like below, then click OK.
    =iif(Fields!Col_Side.Value=5 and Fields!Col_Header.Value >=3 ,"red","white" )
    The following screenshot is for your reference:
    If you have any more questions, please feel free to ask.
    Thanks,
    Wendy Fu

  • Find the difference between two columns in an ssrs matrix ? MSCRM

    Hi All,
    I am working in reporting part of our project (On-line MSCRM 2013) & in reporting services.
    I am trying to create report using fetch xml based. Below is the snap what we required the result.
    Kindly help me, how to get the difference in both column. (Its a matrix table where year is grouped).
    We need difference between both year Like (Plan Revenue of 2013 & Plan Revenue of 2014 difference in Plan Revenue Diff section) and same for Actual
    Revenue.
    https://social.microsoft.com/Forums/en-US/054d5ca4-0d38-4dc6-84a8-88866cc228fe/find-the-difference-between-two-columns-in-an-ssrs-matrix-mscrm?forum=crmdevelopment
    Thanks,
    Mohammad Sharique

    Hi Bro,
    I used parametrized option for year and done the report,Currently we are getting values in Difference column now i want to show
    that value in percentage. How can we show the percentage based on that value. Means i want to show the Difference in Percentage. 
    Kindly help me i tried but getting some issue. Below i am mentioning the code and snap with result.
    Below expression using to showing Plan Revenue in Percentage for year.
    =
    Sum(IIF(Fields!new_year.Value =Parameters!StartYear.Value,cdec(Fields!new_planrevenueValue.Value/1000), cdec(0)))
    - Sum(IIF(Fields!new_year.Value =Parameters!EndYear.Value,cdec(Fields!new_planrevenueValue.Value/1000), cdec(0)))
    /IIF(Sum(IIF(Fields!new_year.Value = Parameters!StartYear.Value,cdec(Fields!new_planrevenueValue.Value/1000), cdec(0)))>0,
    (Sum(IIF(Fields!new_year.Value = Parameters!StartYear.Value,cdec(Fields!new_planrevenueValue.Value/1000), cdec(0))))
    ,1)
    )*100))
    Result issue is as below in snap with highlighted in red colour.
    Kindly help me on this issue also :)

  • SSRS Matrix not showing all the entry for a Column Groups

    I created a Matrix in my SSRS report and for some reason if the COLUMN GROUP has more than one
    entry it only shows the first one and not the second or consequent entries.
    I opened a question in SO and here is the link:
    http://stackoverflow.com/questions/23248421/how-to-add-column-in-a-ssrs-table-based-on-criteria
    All help is appreciated.

    Hi SiKni8,
    According to your description, you have a matrix report. If a user has more than one start date and end date, you want to put all those start dates and end dates into one single row for this user. Right?
    In Reporting Service, for all data fields textbox appearing at intersection of rows and columns, the matrix will use Sum aggregation function by default. If the data can’t be calculated by aggregation function, it will return the first one of records. This
    is the reason why you only get the first start date and end date for each user. In your scenario, it is impossible to append more columns at the end of the matrix without setting column group. And we can never append columns dynamically based on the numbers
    of the records. So for your requirement, we find a workaround which we think is the most related to the answer you want. We use custom code to get both StartDate and EndDate, then return them as string. After that we append those strings and put the whole
    string into a cell. Your case has been tested in our local environment. Here are steps and screenshots for your reference:
    Put the custom code below into your report:
    Dim Num As String = ""
    Dim tempstr As String = ""
    Function AggregateString(Title as String, StartDate as String, EndDate as String) 
    If Title = Num Then
       tempstr = tempstr + "(" +StartDate+" , "+EndDate+")  "
    Else
      tempstr=""
      Num = Title
      tempstr =tempstr+"("+StartDate+" , "+EndDate+")  "
    End If 
    Return tempStr 
    End Function
    In our sample report, we created a matrix based on your description. It looks like below:
    In textbox next to [Title], put the expression below into it:
    =runningvalue(Code.AggregateString(Fields!Title.Value,Fields!StartDate.Value,Fields!EndDate.Value),Last,"Title")
    Ps: In our report, we set the type of date as string when creating table and dataset. If your date type is different, use Cstr() function and convert it into string.
    Save and preview. The result looks like below:
    Reference:
    Matrices (Report Builder and SSRS)
    RunningValue Function (Report Builder and SSRS)
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

Maybe you are looking for

  • Liquid damage on MacBook Pro will data be lost?

    I have a MacBook Pro that I purchased two years ago. I spilled liquid on it and now it won't turn on. I know I will have to get a new one but I was wondering if there was any way for my old data like pictures and documents to be salvaged. Is there an

  • Can I get a refund for my iPad if it's faulty?

    I have the original iPad that I bought at the end of august last year. But it thinks that there are headphone plugged in when the clearly isn't. I have booked a genius bar appointment for Friday and was wondering if the fault is a legitimate one if I

  • I can't delete iCal event from iPhone

    My iCal seems to sync just fine on my laptop, iCloud and my iPhone, EXCEPT for a couple events that I cant delete off of my phone. They were originally setup as recurring events - to remind me every week about a voice conference I was to have with a

  • Getting error in idoc FD 008

    Hello , i am getting an error in idoc which is related with Tax code &  Tax rate conversion in EDI .  The Message number is FD 008  and message is  "Assigning a new tax key for and VAT .000 not possible   . Can anyone please help me what could be pos

  • If your Iphone 2 is disabled, how can you restore it without losing the contents? We know the right passcode.

    We are trying to restore a disabled Iphone 3. It does not have active phone service, but is used for apps. We know the correct passcode but my son entered it wrong too many times and it disabled. The phone says to connect to ITunes but that is not wo