Column Grouping By Month

Hello. Here's my data set:
I'm trying to produce a Reporting Services report that displays counts by month -- but for both calls open and closed under a single month heading. For example:
I don't see a straightforward way to do this. I'm using a Tablix in SSRS 2008 R2. I can easily group counts by months if I'm working with just one column (just the open or closed date), but this isn't so clean. I appreciate any ideas. Thank you.

Hi Bvy,
I have tested on my local environment and you can modify the query in the dataset to count the open and closed for each month and then design the report, finally we will get the same structure as the snapshot you have provided.
Details information below for your reference:
1. Modify the query in the main dataset like below:
;with cte as
select CallCategory,DATEPART(month,DateOpen) DateOpen,DATEPART(month,DateClose) DateClose from [TableName]
cte2 as
select sum(case when c.DateOpen is null then 0 else 1 end) cn,t.callcategory,t.dateopen from cte c right join (select * from (select distinct dateopen from cte) a cross join (select distinct callcategory from cte) as t) t
on c.dateopen=t.dateopen and c.callCategory=t.callcategory group by t.CallCategory,t.DateOpen
cte3 as (
select sum(case when c.DateClose is null then 0 else 1 end) cn,t.callcategory,t.dateClose from cte c right join (select * from (select distinct dateClose from cte) a cross join (select distinct callcategory from cte) as t) t
on c.dateClose=t.dateClose and c.callCategory=t.callcategory group by t.CallCategory,t.dateClose
select c.callcategory,c.cn as [open], isnull(t.cn,0) as [close],isnull(c.DateOpen,t.DateClose) as month from cte2 c full join cte3 t on c.CallCategory=t.CallCategory and c.DateOpen=t.DateClose
2. Design the Report structure using the Matrix instead of the tablix like below:
Row Group:Call_Category
Column Group:Month
3. Preview you will get the result like below:
If you still have any problem, please feel free to ask.
Regards
Vicky Liu
If you have any feedback on our support, please click
here.
Vicky Liu
TechNet Community Support

Similar Messages

  • How to create RunningValue Through Column Groups?

    Hi Everybody i´m trying to do this with a Matrix
    I want the running value of the product quantity for each month of a year,
    resetting the running value
    when a new year is reached
    I have 2 column groups "Year" and as it´s child group "Month".
                         2009                                  
    2010
                         January Febrary March      January   February  March
    Product
    Toolbelt            10           15       20             
    1            10            50
    Well that is the idea...
    In the field of the quantity i´m using an expression like this = RunningValue(Fields!Quantity.Value, Sum, Nothing) .
    With this expression i get the the running value and it´s great, but
    it does not reset thru the years ,
    it continues aggregating the quantity value.
    So i tried with this expression assuming if i set the SCOPE to the Year group i can achieve this
    = RunningValue(Fields!Quantity.Value, Sum, "Year") ,
    But surprise!!, this is not giving me the right aggregation , i´m still dig in it and can´t find what it actually aggregates.
    Am I doing something wrong?.
    All the help is welcome. Thanks.

    Hi UzielB,
    Based on your information, I get your requirement completely, here you want to accumulate the value of month from
    Jan to March whin one year, then return to Jan again whin another year. If I misunderstand you please do not hesitate to let me know.
    Now the issue you are encountering is that the value does not reset through the different years.
     Actually, nomatter it is 2009 or 2010, RunningValue function takes different years as the same scope, so the value does not reset
     through the different years. Just like picture3.
    To workaround the issue, we might need to utilize the subreport in the main report, for detailed steps please follow
    these:
    1.    
    Design the subreport with two column groups
    Year, Month and one row group Product.
    2.    
    Type in the expression in the data textbox
    =RunningValue(Fields!Yourdatafield.Value,sum,"Product") Here
    Product is the row group name.
    3.    
    Add one parameter
    Year to the subreport, of course you should add the parameter year behind the where clause in the T-sql. Such as
    select * from yourtable where Year=@Year
    4.    
    Delete the
    Year column and Product column, here please make sure you just delete the column only rather than deleting the relevant reportitem.
    5.    
    Decrease the height and width of the report to the report control size, then there is no blank space when displayed in the main report.
    6.    
    Drag a matrix to the main report, just add one column group
    Year.
    7.   
    Then drag a subreport control into the data textbox, and then rigth-click the subreport control->select subreport
    properties
    8.   
    In the Subreport Properties dialogbox, please selec the subreport name in the drop-down list of
    Use this report as a subreport
    9.    
    Swith to
    Parameter tab, click Add button to add a parameter, then select the
    Year in the Name drop-down list and
    Year datafield in the Value drop-down list.
    10.  
    Click OK.
    11.  
    Now add another table control into the 
    main report body with one column, and drag the product datafiled into the data textbox. Then group the table by
    Product.
    12.  
    Drag this table into the
    Rows  textbox of the main report. Here make sure the height of the rows in Subreport and table creted in step11 is the same, otherwise the lines in not stay in the same level.
    Preview the report, you will see the report like picture2.
    If you have any question about the steps, please feel free to ask.
    Have a wonderful day
    J
    Challen Fu

  • Variable (Perhaps replacement Path) to group past months together

    Hello.
    I'm trying to perform a query that would group past months data within the current month to aggregate my Key Figures.
    As an example, I have in my InfoCube:
    - Material
    - CalendarMonth
    - Initial Qty (Key Figure)
    - Added Qty (Key Figure)
    - Substracted Qty (Key Figure)
    I'd like to get something like my materials on rows, CalendarMonth on column with my 3 Key Figures on rows as well.  The only thing is that all data pertaining to months prior to "Right now (i.e. August 08)" should be aggregated in August 08, therefore, my first month of data displayed would be August and not January 08 if I have data in this month. 
    This might be very basic to you experts out there but I'm pretty new to the nice BW world and can't figure how to do it.  Any help would be appreciated.
    Thank you.
    P.s. I can't find anywhere (except for the small hints on the right when posting a new thread) how I can format my post as I'd like to put TABS and space but they're getting removed in the preview, is there anywhere the list of ALL possible codes I can use when posting ?

                                August 08     September 08     October 08     November 08     December 08     January 09     February 09     March 09
    MATERIAL-1     Initial Qty        20,000                                   
                   Added Qty                            5,000                         8,000         2,000         2,500                         3,000
                 Subst. Qty                          2,000         6,500                     15,000         2,800         6,400       5,000
                 Total                20,000         23,000        16,500        24,500        11,500        11,200         4,800       2,800
    MATERIAL-2     Initial Qty             u2026             u2026            u2026         u2026                   u2026                    u2026            u2026           u2026
                 Added Qty             u2026                 u2026            u2026         u2026                   u2026                    u2026            u2026           u2026
                      Subst. Qty             u2026             u2026            u2026         u2026                   u2026                    u2026               u2026           u2026
                 Total                     u2026             u2026            u2026         u2026                   u2026                    u2026               u2026           u2026
    Ok, I've finally been able to manage a "similar" output to what I'm trying to achieve.  The total line would actually be a calculated key figure based on the three others.  So in the example above, user as specified March 2009 to be the end calendar period he wants to see the inventory "estimates".  All data prior August 2008 should be shown in August 2008 in their respective Key Figures and then the "Total" would adjust accordingly.  So to answer your question, yes, the same logic need to apply to all 3 Key Figures.

  • SSRS 2008 R2 - Add moving average to column group

    I have a column group of dollar amounts.  The row is a year/month.  I would like to add a moving average column to the right of the last 6 months.  My SQL Server data source is already complex enough and I'd really prefer not to add a column
    there.  Is there anything I can do within the report itself?  Some way to reference the previous records in a matrix?
    Thank you!

    Hi mateoc15,
    According to your description, you have a matrix in your report. Now you want to calculate the average value of last 6 month. Right?
    In Reporting Service, we can put custom code into report to deal with complicated logic. Add one more column/row inside of group and call the functions defined in custom code. For your requirement we modified Robert’s code to achieve your goal. We tested
    your case in our local environment with sample data. Here are steps and screenshots for your reference:
    Put the custom code into report:
    Private queueLength As Integer = 6
    Private queueSum As Double = 0
    Private queueFull As Boolean = False
    Private idChange As String=""
    Dim queue As New System.Collections.Generic.Queue(Of Integer)
    Public Function CumulativeQueue(ByVal currentValue As Integer,id As String) As Object
    Dim removedValue As Double = 0
    If idChange <> id then
            ClearQueue()
                    idChange = id
                    queueSum = 0
                    queueFull = False
                    CumulativeQueue(currentValue,id)
    Else
                    If queue.Count >= queueLength Then
                                    removedValue = queue.Dequeue()
                    End If
                    queueSum += currentValue
                    queueSum -= removedValue
                    queue.Enqueue(currentValue)
                    If queue.Count < queueLength Then
                    Return Nothing
                    ElseIf queue.Count = queueLength And queueFull = False Then
                    queueFull = True
                    Return queueSum / queueLength
                    Else
                    Return (queueSum) / queueLength
                    End If
    End If
    End Function
    public function ClearQueue()
    Dim i as Integer
    Dim n as Integer = Queue.Count-1
    for i=n To 0 Step-1
                    queue.Dequeue()
    next i
    End function
    Add one more row inside of group, call the function defined in custom code.
    Save and preview. It looks like below:
    Reference:
    Moving or rolling average, how to?
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou (Pactera)

  • Matrix report in XML publisher with dynamic column groups

    hi,
    i have one matrix report in txt format having 5 columns under 1 month heading.
    Now i want that all these 5 columns should repeat for multiple months depending upon input parameters.
    S. No.
    Organization Name
    Organization Id
    Project Code
    1
    GRANDWOODS 2
    6825
    1495
    month
    January
    Wrk Count Ven
    Wrk Cont Prw New
    Wrk Amt Ven New
    Wrk Amt Prw New
    Tot Amt New
    New
    0
    0
    0
    0
    0
    Existing
    0
    1
    0
    255000
    255000
    Total
    0
    1
    0
    255000
    255000
    rtf template is as follows:
    S. No.
    Organization Name
    Organization Id
    Project Code
    F CS_11
    ORGANIZATION_NAME
    ORGANIZATION_ID
    PROJECT_CODE E
    month
    Wrk Count Ven
    Wrk Cont Prw New
    Wrk Amt Ven New
    Wrk Amt Prw New
    Tot Amt New
    New
    F WRK_COUNT_VEN_NEW
    WRK_CONT_PRW_NEW
    WRK_AMT_VEN_NEW
    WRK_AMT_PRW_NEW
    TOT_AMT_NEW
    Existing
    F WRK_CONT_VEN_EXISTING
    WRK_CONT_PRW_EXISING
    WRK_AMT_VEN_EXISTING
    WRK_AMT_PRW_EXISTING E
    TOT_AMT_EXIS
    Total
    TOT_CONT_VEN_NEW_EXIS
    TOT_CONT_PRW_NEW_EXIS
    TOT_AMT_VEN_NEW_EXIS
    TOT_AMT_PRW_NEW_EXIS
    TOT E
    E
    now, please help me as to how repeat these 5 columns for multiple months.
    if anybody has some template for matrix report with multiple coloumn group repeatation, pls. share along with sample data.
    regards,
    mohit gupta

    Hi,
    Check this link for developing the matrix report
    Oracle Database and Oracle Applications: Matrix Report in XML Publisher
    Regards
    Srikkanth

  • Group by Month, Group By Year

    I have a date column in my table and it looks like 2009/06/29. Is there a way I can GROUP BY MONTH and GROUP BY YEAR on this column?
    Or do I have to create a YEAR column to GROUP BY YEAR, and a month column to GROUP BY MONTH?
    Thanks.

    When you insert a group on date field you will be having an option in group option "The section will be printed" For each month or year. So you can select for each month or week or quarter or year.
    Regards,
    Raghavendra

  • Grouping by month within date range

    Hi,
    I have a date range which I like to group by months, but not from the 1st to last date of the calendar month but by given start date.  For example the table below represents the date range with some values in a table.  So the
    first month range in the group should be from 06/06/2013 to 08/07/2013.  The 06/07/2013 is absent because it's Saturday.  In fact the data is populated with working days only.  
    Table below shows what I really would like to get:
    There is a simple calculation for each month anniversary date, if the value from the start date, 06/06/2013, here 12 is less than the next month anniversary date, 08/07/2013, which is 9, then it should ignore it.  And only show the value from the month
    who's anniversary date value is less than the first date value, 12.  So the example above shows value 14 for the second month's anniversary date, 06/08/2013.  If the value has been found in any month the show, and ignore the rest. 
    I am just interested if there are any and report which number of month and the value. 
    I can implement this in procedural way, such as in VBA, but because the above looped many times it will take hours to run the process.  I have tried in SQL Server, but first problem I came up with is that I can't group by month from the given start
    date.
     Is this possible to do in T-SQL ?

    I'm not sure I entirely understand your question.  So I'll break the answer into two parts.
    First, as I understand it, you are looking for a way to group data by months, but not all dates in June, 2013 as one group, all dates in July, 2013 as the next group, etc.  Instead you want all dates from June 6, 2013 to July 5, 2013 as the first month,
    all dates from July 6, 2013 to August 5 as the second month etc.  The way to do that is use
    DATEDIFF(month, '20130606', <your date column>) + CASE WHEN DAY(<your date column>) < 6 THEN -1 ELSE 0 END
    So you can assign the month number you want to every row when you select from your table by
    SELECT DATE, VALUE, DATEDIFF(month, '20130606', DATE) + CASE WHEN DAY(DATE) < 6 THEN -1 ELSE 0 END AS MonthNumber
    FROM <your table name>
    Now as I understand it (but am not sure), you want the first value in each "month" (as you are defining "month" which is greater than the value contained in your start date and if no value in a particular month is greater than that value,
    you don't want any row for that month.  For that you could do something like
    Declare @StartDate date;
    Declare @StartValue int;
    Set @StartDate = '20130606';
    Select @StartValue = Value From <your table name>
    Where Date = @StartDate;
    ;With cteMonthNumber As
    (SELECT DATE, VALUE, DATEDIFF(month, @StartDate, DATE) + CASE WHEN DAY(DATE) < DAY(@StartDate) THEN -1 ELSE 0 END AS MonthNumber
    FROM <your table name>
    WHERE DATE > @Date AND VALUE > @Value),
    cteOrdered As
    (Select DATE, VALUE, MonthNumber,
    ROW_NUMBER() OVER (PARTITION BY MonthNumber ORDER BY DATE) As rn
    From cteMonthNumber)
    Select MonthNumber, Value As KickOutValue
    From cteOrdered
    Where rn = 1;
    Tom
    P.S.  Notice that I wrote my date literal as YYYYMMDD.  This is a good idea in SQL Server since '20130806" will always be interpreted as August 6.  But depending on the settings on your server and/or client '06/08/2013' might be dd/mm/yyyy
    and so be August 6, but it might be interpreted as mm/dd/yyyy and be June 8.
    It is also a good idea to express date literals in this forum as yyyymmdd.  There are a lot of us on the forum from the United States and we think 06/08/2013 is June 6 and a lot of us from other places who think 06/08/2013 is Aug 8.  If you give
    your dates as yyyymmdd we don't have to try to figure out what format you are using.

  • Setting the header of a Column group in a Advanced table dynamically

    Hi All,
    There is a requirement to set the Header of a column group in a Advanced table dynamically by fetching the values from a view attribute.
    Code :
    OAAdvancedTableBean spiderTbl1 ;
    Problem:
    It is not able to set the value for the header inspite of getting the handle of the bean.
    Analysis:
    the same piece of code works for
    1) Setting the text of the advanced table
    2) Setting the header of a column in a column group
    Please let me know if there is anything more that needs to be done for setting the prompt of a column group header.
    Thanks in advance!

    I have posted it without giving the complete code by mistake. Below is the code:
    OAAdvancedTableBean spiderTbl1 ;
    OASortableHeaderBean spiderHdr1;
    spiderTbl1 = (OAAdvancedTableBean)webBean.findChildRecursive("SpiderCatTbl1RN");
    if (spiderTbl1!=null){
    spiderHdr1= (OASortableHeaderBean)spiderTbl1.findChildRecursive("AnalogHdr");
    if (spiderHdr1!=null) {
    spiderHdr1.setAttributeValue(OAWebBeanConstants.PROMPT_ATTR,
    new OADataBoundValueViewObject(spiderHdr1,
    "SpiderCategory1",
    "ProjRegPVO1"));
    }

  • SQL Server Reporting Services- Coloring a Cell Background Based on two different column group values

    Hello All,
    I have a matrix report with time scale on the x axis  and Resources on Y axis Showing the tasks assigned to each resource for a period of time. Here I have to color a matrix cell showing task details on tool tip with background color of the cell.
    So Please help me on this.I have a expression like this...
    In my case the color should be filled for the cell with name "Fields!task_name.Value" based on the values of "Fields!Day_Wise.Value " where we have the values for Daywise as S,M,T,W,T,F,S. So i need the background for the cell with name
    task_name as Light Grey on Friday and Saturday, But we have the same name S for sunday also, which should come in different color.
    =iif(Fields!Day_Wise.Value ="F","LightGrey",
    IIF(PREVIOUS(Fields!Day_Wise.Value) ="F","LightGrey",
    iif(Fields!task_name.Value="","White",
    iif(InStr(Fields!task_name.Value,"||")>0,"Maroon",
    iif(InStr(Fields!task_name.Value,"NULL")>0,"Sienna",
    iif(InStr(Fields!task_name.Value,"Pink")>0,"Pink",
    iif(InStr(Fields!task_name.Value,"Red")>0,"Red",
    iif(InStr(Fields!task_name.Value,"Purple")>0,"Purple",
    iif(InStr(Fields!task_name.Value,"Green")>0,"Green",
    iif(InStr(Fields!task_name.Value,"White")>0,"White",
    iif(InStr(Fields!task_name.Value,"Cyan (Teal)")>0,"Teal",
    iif(InStr(Fields!task_name.Value,"Olive")>0,"Olive",
    iif(InStr(Fields!task_name.Value,"Blue")>0,"Blue",
    iif(InStr(Fields!task_name.Value,"Light Blue (Aqua)")>0,"LightBlue",
    iif(InStr(Fields!task_name.Value,"Yellow")>0,"Yellow","Black"
    Thanks
    AJ Hameed

    Hi AJ Hameed,
    According to your description, you want to set the background color for the cells based on the values inside of cells and the values the column group. You want to set grey for cells on Friday and Saturday, set colors based on the task name on other weekdays.
    Right?
    In Reporting Services, there's no problem if we have two different data values in conditional expression, so we can set background color based on Day_Wise or task_name. One issue in this scenario is, we can't have value "S" for both Saturday and Sunday when
    working in a matrix. Otherwise the task_name will overwrite the previous task_name (for numeric values, it will do sum calculation). So we suggest you change the values for weekdays in database. The expression you have posted was correct. It only has a small
    issue: the "Light Blue(Aqua)" also contains "Blue", so when doing conditional judging, the expression will return "Blue" instead of "Light Blue". We have tested in our local environment. For viewing convenience, we used the Switch() function in our expression:
    =IIf(Fields!Day_Wise.Value="Fri" or Fields!Day_Wise.Value="Sat","LightGrey",
    Switch(
    InStr(Fields!Task_name.Value,"White")>0,"White",
    InStr(Fields!Task_name.Value,"||")>0,"Maroon",
    InStr(Fields!Task_name.Value,"Pink")>0,"Pink",
    InStr(Fields!Task_name.Value,"Red")>0,"Red",
    InStr(Fields!Task_name.Value,"Purple")>0,"Purple",
    InStr(Fields!Task_name.Value,"Green")>0,"Green",
    InStr(Fields!Task_name.Value,"Cyan(Teal)")>0,"Teal",
    Fields!Task_name.Value="","White",
    InStr(Fields!Task_name.Value,"Olive")>0,"Olive",
    InStr(Fields!Task_name.Value,"Blue")>0,"Blue",
    InStr(Fields!Task_name.Value,"Aqua")>0,"LightBlue",
    InStr(Fields!Task_name.Value,"Yellow")>0,"Yellow",
    InStr(Fields!Task_name.Value,"Orange")>0,"Orange",
    InStr(Fields!Task_name.Value,"Null")>0,"Sienna",
    true,"Black"
    The result looks like below:
    Reference:
    Matrices (Report Builder and SSRS)
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • Dropdown in column group of a table

    I am building a table with one multiple column groups, each has a number of columns, one of these columns have a dropdownbykey field. I get a ClassCastException on this. It seems like there is a bug in the implementation, because when I move the dropdown out of the column group it works fine.
    Regards
    Juan

    How is the "selectedKey" property of the dropdown-list bound
    You need to bind the property "selectedKey" for the DropdownByKey UIElement
    http://help.sap.com/saphelp_nw04/helpdata/en/08/13dbfb6e779743bb2ca641ebcb3411/frameset.htm

  • Problem with column groups on Interactive Report

    Hi
    I am hoping that someone can help with this problem.
    I am attempting to control both the grouping and ordering within each group of fields in the single row view of an interactive report. Creating column groups appears to be OK at first (sequence, name and description) but if I then attempt to edit the group, the sequence box appears to be empty even though it was filled with a unique number at the time of creating the group.
    In addition, any changes to the order of the fields within the group made using the shuttle box at the bottom of the screen don't seem to be saved even to the Apply Changes button is pressed.
    Anybody know what is happening here and can anyone suggest how to control both the order of the groups and ordering within each group?
    Thanks in anticipation
    Martin

    Moun wrote:
    I am dealing with many interactive projects in my application. Sometimes I have to add a column to the interactive report. When I do so, the column doesn't appear in the interactive report...On the page I have to click on "Actions" then go to "Selected columns" and then display it ! the problem is when I logout and login again
    the column desappear again and I have to do samething again and again...Is there a way to set it appear by defaul always ???After adding new columns to an existing IR, you need to select them for display as a developer, and save the new report as the Primary Default.

  • How to get the difference between two columns in a column group

    Hi All,
    My first time here and really new to programming. I would like to get the difference between 2 columns that are inside 
    a column group.
    Here is my sample table below: The Column Group is PeriodNumber and can only choose 2. like 1 and 2.. I would like to have a third row which will simply calculate the difference between the amounts in PeriodNumber 1 and 2.
                                PeriodNumber          
    Account                    1                            2     
    1) Cash                10,000                15,000
    2) Receivables      12,000                11,500
    3) Equipment          5,000                  5,500
    Total Assets          27,000                32,000

    Hi yabgestopa,
    From your description, you want to get the difference between two columns in a column group. After testing it in my environment, we can use custom code to achieve your requirement. For more details, you can refer to the following steps:
    Copy the custom code below and paste it to your report. (Right-click report>Report Properties>Code)
    Dim Shared Num1 As Integer
    Dim shared Num2 As Integer
    Public Function GetAmount(Amount as Integer, Type as String)
    If Type = "1" Then
    Num1=Amount
    Else
    Num2=Amount
    End If
    Return Amount
    End Function
    Public Function GetDif()
    Return Num1-Num2
    End function
    Right-click the second column to insert a third column with Outside Group-Right.
    Then use the expressions below in the matrix.
    =Code.GetAmount(Fields!Amount.Value,Fields!PeriodNumber.Value)
    =code.GetAmount(Sum(Fields!Amount.Value),Fields!PeriodNumber.Value)
    =Code.GetDif()
    The report looks like below.
    If you have any questions, please feel free to ask.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Column Group Hiding

    Hi,
    In the application, we have used a table (of type 'Advanced Table') and under that I require a column to get hidden in the table. When i navigate to see the columns through "Personalize" link corresponding to the table, I came to know the column i require to hide is represented in the form of column group. And under that column group, it has a sub-category of may columns present under it.
    Will it be ok if i hide only the required column under that column group by setting the rendered property to 'false' or do i have to hide the entire column group itself ?
    Suggestions needed....
    With Thanks,
    Thiyagarajan

    Thanks All for your valuable responses...
    In the same table, i am doing some calculations in the 'processFormRequest' method when the 'submit' button is clicked and the table has nearly more than 25 rows and it is listed as 10 rows per page.
    Once the page gets loaded after the 'submit' button gets clicked, the page displays the table's last 10 records and not from the first 10. Is there any function can be used to point the records in the table in the ascending order instead of descending ?
    With Thanks,
    Thiyagarajan

  • Column grouping?

    Hi
    i am using alv table in my application. iam sorting the alv table and allowing three columns to be grouped. its displays fine initially but after i sort the columns the grouping is gone.
    any suggestions how can i maintain the grouping of the columns even after sorting.
    regards
    chythanya

    Hi
    iam writing this code to do the column grouping.
    DATA lo_cmp_usage TYPE REF TO if_wd_component_usage.
      lo_cmp_usage =   wd_this->wd_cpuse_alv_activity( ).
      IF lo_cmp_usage->has_active_component( ) IS INITIAL.
        lo_cmp_usage->create_component( ).
      ENDIF.
    DATA lo_config_model TYPE REF TO cl_salv_wd_config_table.
        lo_config_model = lo_interfacecontroller->get_model( ).
        lo_config_model->IF_SALV_WD_TABLE_SETTINGS~SET_MULTI_COLUMN_SORT( value = abap_true ).
    lr_field = lo_config_model->if_salv_wd_field_settings~get_field( 'CARRID' ).
    lr_field->if_salv_wd_sort~create_sort_rule( sort_order = if_salv_wd_c_sort=>sort_order_descending ).
    lr_field->if_salv_wd_sort~set_grouping_allowed( value = ABAP_true ).
    clear: lr_field.
    lr_field = lo_config_model->if_salv_wd_field_settings~get_field( 'CONNID' ).
    lr_field->if_salv_wd_sort~create_sort_rule( sort_order = if_salv_wd_c_sort=>sort_order_descending ).
    lr_field->if_salv_wd_sort~set_grouping_allowed( value = ABAP_true ).
    regards
    chythanya

  • Expression Error in Column Group report display

    Logic # 1:  If Column Group: Region. Value is EQUAL to "America Hub", the Value section needs to pull "Rev_Rec Date" Field.
    Logic # 2: If Column Group: Region. Value is EQUAL to "EMEA" or "AMERICA" or "ASIA", the Value section needs to pull "Order Date" field.
    Below is the column group expression I have entered.  However, it displays as “ERROR#” in the report output.  
    I am not sure why the SSRS program show an error in Column Group in Matrix report format
    =sum(IIf(Fields!REGION.Value = "America Hub", Fields!Rev_Rec_Date.Value, Fields!Order_Date.Value))
    Appreciate if you can help me.
    Thanks,
    Josey
    Josey Tang

    Hi Qiuyun,
    Thanks for your feedback and example.  Appreciated.
    I have created 2 expressions. One is in Row Group and the other in Column Group in order to show different values in Row and column fields.
    ROW FORMAT
    Logic # 1:  If Row Group: Region. Value is EQUAL to "America Hub", the Value section needs to pull "Billing Amount" Field.
    Logic # 2: If Row Group: Region. Value is EQUAL to "EMEA" or "AMERICA" or "ASIA", the Value section needs to pull "Booking Amount" field.
    Expression in ROW FORMAT:
    =sum(IIf(Fields!REGION.Value = "America Hub", Fields!Billing_Amount.Value, Fields!Booking_Amount.Value))
    COLUMN FORMAT
    Logic # 1:  If Column Group: Region. Value is EQUAL to "America Hub", the Value
    section needs to pull "Rev_Rec Date" Field.
    Logic # 2: If Column Group: Region. Value is EQUAL to "EMEA" or "AMERICA" or "ASIA",
    the Value section needs to pull "Order Date" field.
    Expression in “COLUMN FORMAT”:
    =sum(IIf(Fields!REGION.Value = "America Hub", Fields!Rev_Rec_Date.Value, Fields!Order_Date.Value))
    The Row Group expression is working properly.  However the Column Group expression shows as ERROR #
    I think I need to help based on the Column Group Logic # 1 and 2 above.
    Josey Tang

Maybe you are looking for

  • Sharepoint 2013 vs Exchange 2010 SP3 search (Error while crawling LOB contents)

    Hi there: We are trying to solve the problem: ERROR CRAWLING LOB CONTENTS when we wish to search Exchange 2010 SP3 public folder content on Sharepoint 2013 Foundation. Quick briefing: Followed this instructions: http://technet.microsoft.com/en-us/lib

  • Building in carriage returns using Report Query

    I am using Report Querys and Report Layouts. I am trying to build in some carriage returns that will be recognized in my rtf template. I tried using 'chr(10)', br's etc, but it doesn't work. It prints the characters instead of doing the carriage retu

  • Foreign curr reval for open items - questions - very urgent

    Hi all, Can anyone explain me the account determination for open item exchange rate difference postings? 1.     What are the accounts meant for under tab Exchange rate difference realized (Loss, Gain) 2.     What are the account meant for under tab v

  • Dispatch Instructions for Direct Supply from Vendor to Customer.

    Dear Experts, Our Company is Project Industry. We have implmented SAP ECC 6.0 in 2008 with SD, FI, MM, PP, QM, PS, DMS modules. In our case 70% Deliveries to customer are from direct dispatch from our vendor to Client. Steps are as follows. 1. Buyer

  • Full width characters

    I have a web application in which users can type any data. During testing I noticed that I can change the input language and select Full Width Japanese or Half Width Japanese as my input language. I typed in the english letter 'A' using these both an