none
Adding a few rows after the group footer totals row RRS feed

  • Question

  • I have an ASP.Net application (C#) with an rdlc report, which is populated by a datatable, called TimesheetEntries. The table is structured as shown below:

    EntryDate,Username,ClientName,ProjectName,Hours,Cost

    In displaying the report, I am grouping for ClienName, and then by ProjectName, and in the group footer I have a subtotals row like so:

    ClientA    Project1   User1   3.0    90.00

                    Project1   User2   1.0    30.00

    Project Totals                     4.0  120.00

    Client A   Project2   User1    3.0    90.00

    Project Totals                     3.0    90.00

    Client Totals                       7.0  210.00

    ClientB    Project3   User1   3.0    90.00
    Project Totals                     3.0    90.00

    Client Totals                       3.0    90.00


    This has been working OK so far, but now the customer wants me to add a few more rows under the totals row, to show the Annual Fees charged to the Client. This information is coming from another table in the DB. The customer wants the report to look like below:

    ClientA    Project1   User1   3.0    90.00

                    Project1   User2   1.0    30.00

    Project Totals                     4.0  120.00

    Client A   Project2   User1    3.0    90.00

    Project Totals                     3.0    90.00

    Client Totals                       7.0  210.00

    Annual Fees 2012                     100.00

    Annual Fees 2013                     100.00

    Client Total Fees                       410.00

    I am a little confused as to how to do this; I thought of adding an additional field in the datatable, called fees and the for the first row of each client populate it with the value, and finally display that under the totals. This can work but it will not give me the year breakdown they want. Some clients have fees issued for 2012 and 2013, some for 2013 only and some no fees at all, so I don't know upfront how many such fields to include in the datatable.

    Any ideas? I would really appreciate a swift reply.

    Chris.


    Chris

    Tuesday, January 22, 2013 8:35 PM

Answers

  • I ended up solving this issue by adding an extra field in the datatable used to bind the report onto. For those rows containing project fees, the field has the value "Project Fees" whereas for those rows that contain annual fees, the field has the value "Annual Fees".

    I then added an extra row group by the Field's name, so as to get the break-down I wanted. I also had to rearrange some report elements and totals along with configuring visibility of sole rows based on the field's value.

    This seems to be working for the time. Let me know if anyone is interested more on this.

    c.


    Chris

    • Marked as answer by Chris Loucas Wednesday, January 23, 2013 12:24 PM
    Wednesday, January 23, 2013 12:23 PM