4

I have a Report which displays 6-groups(5-Rows in each Group) of information. The report is having some filter which can be modified by user. When first time report get loads without any filter its page rendering in report viewer and Print page is perfect, But when filters been added in Report information its get unusual.

Simple explanation given in below image:

enter image description here

Could anyone please suggest anything to fix number of rows/groups in each page?

8
  • Is that shaded area with the parameters part of the report? If so, can you move the Brand and Sub Branch rows to the right of the year and month? Feb 4, 2019 at 8:55
  • @AlanSchofield: No, it is not shaded and also i can't move it to the right side as per the designing restrictions.
    – Irfan
    Feb 4, 2019 at 8:58
  • Is the black box with the 1.Page a static text field using Global report parameters? Or does that come from the Dataset? If it's from the dataset, adding a parent group and adding a group by that field with a page break between groups should fix that. Also, you should make sure that the report objects containing the groups has Can-grow property set to True.
    – Steve-o169
    Feb 4, 2019 at 14:35
  • Prevent the filter-info-area from expanding. Feb 4, 2019 at 16:30
  • 1
    What I wanted to say is that obviously this golden(?) area does expand (get higher) when you specify filter criteria. This shifts all other controls on that page downwards, and the last rows (that were meant to be displayed on that page) move to the next page. Therefore, you should try to find a solution to display the filter parameters (if at all) in a way that does not move the layout, Maybe by setting the CanGrow property of that area to false. Feb 8, 2019 at 2:02

1 Answer 1

3
+50

I will provide two methods to solve the issue

(1) Try to prevent the text boxes from expanding

I will assume that you are showing the report parameters (filters) as mentioned in the following link:

Then, you should set CanGrow property to False from the Textbox properties pane as mentioned in folowwing article:

enter image description here

Also make sure that Allow height to increase property is not checked in the Text Box Properties Dialog Box

enter image description here

Helpful links:

(2) Limit the number of rows per page

While searching on this issue, i found the following solution which can be used as a workaround to distribute rows per pages:

You can specify the limit number of rows per page with a conditional approach. If it is the first page then 10 (2 groups) as example, and for other pages 15 (3 groups).

You should follow these steps:

  1. Go to Report >> Report Properties >> Code , in the Custom Code section, enter the following:

    Public Function PageNumber() as String
        Dim str as String
        str = Me.Report.Globals!PageNumber.ToString()
        Return str
    End Function
    
    Public Function TotalPages() as String
        Dim str as String
        str = Me.Report.Globals!TotalPages.ToString()
        Return str
    End Function
    
  2. Now create your Group with Page Break as below SSRS expression:

    = IIf ( CInt(Code.PageNumber()) = 1, Ceiling((RowNumber(Nothing)) / 10), Ceiling((RowNumber(Nothing)) / 15) )
    

The result will be like the following image:

enter image description here

References and helpful links

(3) Update based on the OP comments

Another method to keep group rows on the same page is by setting the Keep together propery to true:

Row_Group >> Properties >> Keep together = True.
2
  • 1
    thanks a lot, your second suggestions worked. but another solution also i found that can help others. Row_GroupPropertiesKeep together set 'True'. Bydwy thanks a lot for your precious time for the solution.
    – Irfan
    Feb 13, 2019 at 0:18
  • 1
    @jap_jap i will add this to the answer so it will be more informative
    – Hadi
    Feb 13, 2019 at 7:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.