Report viewer RDLC report grouping

    Question by:
    On

    Topics:

    Hello,
    When we create a grouping for RDLC report, we can insert a total for that grouping on the footer section by using =sum(fields!quantity.value). It works when the value in integer, but can we stack them as string and display them on single line on the footer section of the group. For example something like this:

    group: Country
    detail line:                           quantity
                                               2
                                               3
                                               5
    group footer:        2,3,5

    ----------------------------------
    In above example:
    I am showing the data of detail line just to explain what I need, but I am going to supress it in my report and just show one line group footer which contains the data of detail line separeted by comma.
    Thanks!

    Good Question?
    0
     

    ?

    The member who asked this question verified this comment provided the solution that solved their problem.

    Accepted Solution on 2007-11-29 at 15:26:48ID: 20378401

    Sure, in the SQL query add an extra column
       CASE WHEN quantity=0 THEN 0 ELSE 1 END AS NonZeroCount
    Then, just use
      =Sum(Fields!NonZeroCount.Value)
    to get the number of non-zero records for  particular group.

    I have used the list/table combo before to do what you want, and it does work, however it always takes a fair bit of persistent playing around with to get it to do what you want. Drillthrough reports (and/or sub-reports) would indeed make life significantly more simple, so long as you're ok not having all the information in a single report...

    Top Expert Contributor

    Essential articles and videos from the Experts

    More valuable questions with Expert answers

    201511-LO-Qu-074

    Extend your technology team with the Experts Exchange community.

    — trusted by —

    Who answers my questions?Our community has technology experts around the world.

    Zberteoc

    Expert in:

    • MS SQL Server
    • MS SQL Server 2005
    • MS SQL Server 2008
    • Query Syntax
    • Databases

    Brian Crowe

    Expert in:

    • MS SQL Server
    • MS SQL Server 2008
    • Visual Basic.NET
    • Query Syntax
    • Crystal Reports

    Doug Walton

    2

    Articles

    Vikas Garg

    6

    Articles

    Expert in:

    • MS SQL Server
    • MS SQL Server 2008
    • MS SQL Server 2005
    • Query Syntax
    • SSRS

    Tone' Shelby

    1

    Articles

    Expert in:

    • DB Reporting Tools
    • MS SQL Server
    • MS SQL Server 2005

    nareshnookala

    1

    Articles

    RELATED TOPICS view all topics

    1. Crystal Reports
      (34,213)
    2. MS SQL Server
      (154,632)
    3. MS SQL Server 2005
      (71,583)
    4. SSRS
      (8,513)
    5. Databases
      (52,982)
    6. .NET Programming
      (131,070)
    7. MS SQL Server 2008
      (48,057)
    8. Oracle Database
      (77,134)
    9. Query Syntax
      (46,071)
    10. MS Access
      (214,005)