保持小组使用Reporting Services一页 [英] Keep Group on One Page using Reporting Services

查看:124
本文介绍了保持小组使用Reporting Services一页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个报告使用Reporting Services C#应用程序的一部分,我不能找到一些功能我用在其他环境中看到。相信无论是MS Access和Crystal报表有一个名为团结在一起,这样就可以在两页保存数据的特定分组在一个页面上,而不是信息被拆分的选项。

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 and Crystal reports have an option called "Keep Together" so that you can keep a specific grouping of data on one page instead of the information being split over two pages.

我如何做,使用2005报表服务时,我的报告是一个C#应用程序本地渲染和使用.NET报表查看器查看。从本质上讲,我想保留的所有记录了某一年在一个页面上。我使用Visual Studio 2008。

How do I do that using 2005 Reporting Services when my report is rendered locally in a C# app and viewed using the .net report viewer. Essentially, I want to keep all records for a certain year on one page. I am using Visual Studio 2008.

年是其中一个列和行的一年这个数字总是小于页。我的报告只使用一个表,并有逐年最里面的分组,然后另一外组由客户端名称。

The year is one of the columns and the number of rows for one year is always smaller than a page. My report uses just one table and has an innermost grouping by year and then another outer grouping by client name.

目前我可以然而在报告适合两年的数据,如果数据通过第一年开始的一半,然后我得到了以下内容:

Currently I can fit two years of data on the report, however, if the data starts half way through the first year, then I get the following:

例如:

第一页:2004年
1/2,因为数据通过04

Page one: 1/2 of 2004 because the data started half way through 04

所有2005

2006年上半年

第2页:
2006

Page2: Second Half of 2006

我会而要做的就是2006年全年推到第二页。

What I would rather do is push all of 2006 to page two.

我目前正在使用一个表的所有报告中的数据。有一个在表级别一起保留选项,但我需要一个在集团层面。在这种情况下,通过分组一年。

I am currently using a table for all of the data in the report. There is a keep together option at the Table level, but I need one at the Group level. In this case the Grouping by year.

这可以提供将非常感激任何帮助。

Any help that can be provided will be much appreciated.

推荐答案

问题是,我需要在页面上两年,从来没有一年的1/2,即使记录的具体设置,通过一年开始了一半。事实证明,即使有在表级别是团结在一起的选项,没有一个在集团层面。我需要在组级别该选项。而不是使用的格式解决方案我改变了对报告的基本SQL。在那里只有一年半的数据情况下,我创造了所有其他值与正确的日期在今年的另一部分记录,但零。这意味着,如果在网页被格式化适当地容纳两个岁则总是显示两个完整岁和一年绝不会超过两页被打破。我也想过通过Mozy的和约翰·桑塞姆提供的答案是好的,我投了他们俩了。

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.

感谢您的帮助!

这篇关于保持小组使用Reporting Services一页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆