Keep Group on One Page using Reporting Services

后端 未结 6 2740
甜味超标
甜味超标 2021-02-19 23:49

I created a report as part of a C# application using Reporting Services and I cant find some functionality I am used to seeing in other environments. I believe both MS Access a

相关标签:
6条回答
  • 2021-02-20 00:22

    Ok, what you need to do is to first define the reports page size to be large enough to encompass your entire data region.

    See:

    http://msdn.microsoft.com/en-us/library/bb677374.aspx

    You then need to add Page Break Points to the Group in your Matrix. See below:

    http://msdn.microsoft.com/en-us/library/ms156434.aspx

    0 讨论(0)
  • 2021-02-20 00:25

    Please click on a group which you want to keep together in same page under Row Group section. After clicking on the desired group make "Keep Together option as True" in properties section. That's it. It worked for me.

    0 讨论(0)
  • 2021-02-20 00:27

    The problem was that I needed two years on a page and never 1/2 year even if the specific set of records started half way through the year. It turns out that even though there is a "Keep Together" option at the table level, there is not one at the group level. I needed this option at a group level. Instead of using a format solution I altered the underlying SQL for the report. In cases where there was only 1/2 year of data I created records for the other part of the year with correct dates, but zeros for all other values. This means that if the page is formatted properly to hold two years then it will always show two complete years and one year will never be broken over two pages. I also thought the answers provided by Mozy and John Sansom were good and I voted them both up.

    Thanks for the help!

    0 讨论(0)
  • 2021-02-20 00:34

    Just to add a bit to John's answer. For SSRS 2005 the List and Table objects do have a KeepTogether property, which means they will try to keep everything on one page. I think the best approach is to follow John's advice first though.

    0 讨论(0)
  • 2021-02-20 00:39

    Use the Rectangle element and copy and paste all the controls into it. On tke rectangle properties check the box for keeping contents together. Don't include a border if you don't want extra lines.

    I had a number of items outside of the matrix element that I need for a footer. I only wanted them on the last page, so I couldn't use the standard footer section. By putting them in rectangle I avoid page breaks in the middle of the group.

    0 讨论(0)
  • 2021-02-20 00:44
    1. Insert a "List" into the report.
    2. Under its "Tablix Properties" set the "Dataset Name" property to your dataset name.
    3. From the design view right-click on the list and then select "Row Group > Group Properties".
    4. On the "Group Properties" window, click "Add" button under "Group Expressions" then choose the field that you want to group within a page.
    5. After that you can insert a "Table" for your detail data inside the row group.
    6. Once you render the report the report will keep data inside the group together between page breaks.
    0 讨论(0)
提交回复
热议问题