How to set No. of rows Per page in reports in SSRS 2005 and 2008

  • I have a requirement in reports that the No. of rows in reports should be constant for each page generated by reporting service. Suppose there is a description column for products, which vary from product to product, some products has 1 line description and some has 10 lines or more lines. But the requirement is that each page should have 10 products. How do i achieve this. I need solution for both version of reports 2005 and 2008.

    Shamshad Ali.

  • shamshad.ali (5/24/2012)


    I have a requirement in reports that the No. of rows in reports should be constant for each page generated by reporting service. Suppose there is a description column for products, which vary from product to product, some products has 1 line description and some has 10 lines or more lines. But the requirement is that each page should have 10 products. How do i achieve this. I need solution for both version of reports 2005 and 2008.

    Shamshad Ali.

    There is no way to gaurantee that the 10 selected items will all get on one page. If you have a bunch of big rows then may well go onto the next page.

    The process below will force a new page after each 10 rows.

    1) Alter your dataset to include a row_number(). This will generate a value within the dataset.

    select * , row_number() over (order by productid) as RN

    from production.product

    2) In your report create a parent group to your details row. Set the group by to an expression as shown below. This will divide by 10 and round down. The first group of rows (1 to 10) would return a group value of 0, 11-20 returns 1 etc.

    = floor((Fields!RN.Value-1)/10)

    3) Set the group properties to add page break between the groups.

    Fitz

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply