none
Insert a blank row into report after every account number change

    Question

  • I need a trick to insert a blank row into report after every account number change. User want's to see the blank even when exported to excel.

    Thanks in advance for your help.


    svk


    • Edited by czarvk Friday, July 26, 2013 11:13 PM
    Friday, July 26, 2013 11:12 PM

Answers

  • I have an example to demonstrate how SSRS table row can be inserted(acting as a saperator) base on condition of a report item. This row can be used as a saperator between two group of rows(can be an account number i.e ID field. "ID" and "Mydate" are two fields from my dataset.

    In SSRS we have "Previous" function to retrieve previous field value, however we don't have "Next" function. So "Previous" function can be used to achieve both previous and next table row values with a trick.

    Refer the following steps,
    1. Drag ID and Mydate field in the table row as shown in the snapshot.
    2. Right click the row property and select "Insert Row Above"
    3. Change the background color of row to gray.
    4. Select the inserted row and in the property window select "Visibility>>Hidden Property Expression".
    5. Paste expression =IIF(Previous(Fields!ID.value) <> Fields!ID.value,False,True)
    6. The above logical expression is to compare previous and next table row value i.e ID field. So whenever there is any difference in the previous ID and next ID field, the grayed-background row will be visible.

    Hence we can saperate two group of rows by a saperator(gray row) base on the condition.


    Regards, RSingh


    • Edited by Ch. Rajen Singh Saturday, July 27, 2013 10:14 AM add screen shot
    • Proposed as answer by Ravi A Davawala Saturday, July 27, 2013 11:12 AM
    • Marked as answer by czarvk Saturday, July 27, 2013 11:49 PM
    Saturday, July 27, 2013 10:12 AM

All replies

  • I have an example to demonstrate how SSRS table row can be inserted(acting as a saperator) base on condition of a report item. This row can be used as a saperator between two group of rows(can be an account number i.e ID field. "ID" and "Mydate" are two fields from my dataset.

    In SSRS we have "Previous" function to retrieve previous field value, however we don't have "Next" function. So "Previous" function can be used to achieve both previous and next table row values with a trick.

    Refer the following steps,
    1. Drag ID and Mydate field in the table row as shown in the snapshot.
    2. Right click the row property and select "Insert Row Above"
    3. Change the background color of row to gray.
    4. Select the inserted row and in the property window select "Visibility>>Hidden Property Expression".
    5. Paste expression =IIF(Previous(Fields!ID.value) <> Fields!ID.value,False,True)
    6. The above logical expression is to compare previous and next table row value i.e ID field. So whenever there is any difference in the previous ID and next ID field, the grayed-background row will be visible.

    Hence we can saperate two group of rows by a saperator(gray row) base on the condition.


    Regards, RSingh


    • Edited by Ch. Rajen Singh Saturday, July 27, 2013 10:14 AM add screen shot
    • Proposed as answer by Ravi A Davawala Saturday, July 27, 2013 11:12 AM
    • Marked as answer by czarvk Saturday, July 27, 2013 11:49 PM
    Saturday, July 27, 2013 10:12 AM
  • Hi Svk,

    From your description, you want to display a blank row after each account number, right? In this case,we can drag [AccountNumber] field into a row group, then add a row inside the group (right-click the handle fo the row>Insert Row>Inside Group-Below) and leave this row blank. In this case, when you preview the report, there will be a blank row after each account number.

    If you have any questionss, please feel free to ask.

    Regards,
    Charlie Liao

    If you have any feedback on our support, please click here.


    Charlie Liao
    TechNet Community Support

    Saturday, July 27, 2013 1:59 PM
    Moderator