Crystal Reports & SQL Reporting Services Training Consultants
Account Log in:
Username:
Password:
Be humble and polite, but don't let anyone push you around
 
Institute of IT Trainers - Freelance Trainer of the Year 2006 & 2009
Liverpool Business Connect Member
  Maximum Impact Solutions Limited - Reporting Solutions, Creating Answers
Reporting Solutions - Creating Answers, Crystal Reports, Dashboarding (Xcelsius) & SQL Reporting Services

The Maximum Impact Solutions Blog Feed ME!!!!

13
April

How Do I Insert a Page Break After a Specific No of Rows in a Table in SSRS?

Recently a couple of my SQL Server Reporting Services clients have asked, how can they add a page break after a specific number of records in a tablix object.

This is a modification of my orginal blog post How Do I Set Number of Records per Page in SSRS?

To give them a bit more flexibility I decided to add a parameter, that allowed them to change the number of records per page

Solution:

  1. Create a new report, and the required datasource and dataset
  2. Create a Parameter field:

    • General -
      Name: NoRecords
      Prompt: Enter No of Records Per Page
      Data Type: Integer
      Select Parameter Visibility: Visible

    • Default Values -
      Specifiy Value - Value 25


  3. Add a Tablix object to the canvas
  4. Add the required fields to the tablix
  5. Click on any cell in the tablix
  6. Right Click on the Detail Row selection button
  7. Select Add Group - Row Group - Parent Group
  8. In the Tablix Group dialog box, in the Group By expression box, enter:

    =CEILING(RowNumber(Nothing)/Parameters!NoRecords.Value)

  9. Press the OK button

    This adds a Group 1 section to the tablix, and in the Row Group Section at the bottom of the screen

  10. In the Row Groups section at the bottom of the screen, select the down arrow of Group 1
  11. Select the Group Properties
  12. In the Group Properties dialog box:

    • General - Name: Page_Break_Group

    • Page Breaks - Between each instance of a group

    • Sorting - Select the Sort expression column and press the Delete button

  13. Press the OK button

  14. On the tablix, Right click the Group 1 column
  15. Select Delete Columns
  16. in the Delete Columns dialog box, select the Delete Columns only
  17. Press the OK button
The report now only displays 25 records per page, but will change based on the value entered in the parameter


If you have any questions, leave us a comment below, or need any assistance, please do not hesitate to Contact Us
1

sana

13
October
Page break problem in rdlc with list type tablix

MAKE A COMMENT

Name *

Email Address *

Comment *

To prove you are human what is:

12 + 69 =