[英]How to limit row number per group without change new page in crystal report
Is there any way to limit row number per group without change new page in crystal report 2008. The reason i do that is due to customer using printer EPSON LQ 300 (dot matrix) always will print in landscape if detech my layout in landscape. 是否有任何方法可以限制每组的行数而不更改Crystal Report 2008中的新页。我这样做的原因是由于客户使用打印机EPSON LQ 300(点矩阵)时,如果对我的布局进行反技术处理,总是会在横向中打印。 Because they need the record always print in 1 page (Letter size) for 2 groups and each group must show 5 records.
因为他们需要记录,所以总是在1页(信纸大小)中打印2组,每组必须显示5条记录。 Example:
例:
But, in CR2008, if you set the row per group from group section expert, definitely it will change to new page, but I do not want it change to new page. 但是,在CR2008中,如果您从“组”部分专家设置每个组的行,则肯定会更改为新页面,但是我不希望它更改为新页面。 Any Idea?
任何想法?
In one page (Letter size): 一页(字母大小):
Group Name: Customer-ABC
NO INVOICE AMOUNT
1) INV001 USD100
2) INV002 USD100
3) INV003 USD100
4) INV004 USD100
5) INV005 USD100
Group Name: Customer-ABC
NO INVOICE AMOUNT
6) INV006 USD100
7) INV007 USD100
8) INV008 USD100
9) INV009 USD100
10) INV010 USD100
I don't think there is a direct way to accomplish this with groups... but you might be able to employ a workaround and rig it to act like 5 records per group/10 per page. 我不认为有直接的方法可以通过组来完成此操作...但是您可以采用一种变通方法并将其绑定为每组10条/每页5条记录。 I am assuming the following for purposes of this illustration:
为了说明起见,我假设以下内容:
There may be invoice data for multiple clients in one report. 一个报告中可能有多个客户的发票数据。 Each page will display ten records maximum per page across two subsections.
每页将在两个小节中每页最多显示十条记录。 If, for example, there are less than 10 invoices for a given client the first section would display 5 invoices, the second second would display 4 and the invoice data for the next client would start over at the beginning of the next page.
例如,如果给定客户的发票少于10张,则第一部分将显示5张发票,第二部分将显示4张,而下一个客户的发票数据将从下一页的开头重新开始。
With that: 接着就,随即:
You can accomplish this by creating a manual running total to track your record count per client group. 您可以通过创建手动运行总计来跟踪每个客户组的记录数来实现此目的。 You'll hide your actual group header, print the group header names in the detail lines, then use that record count along with a remainder() formula to conditionally hide or display the group names in the details, create new pages at certain intervals, etc. You will also use recordnumber - which will give you the actual current count of records across the entire report to separate section for each new client.
您将隐藏实际的组标题,在详细信息行中打印组标题名称,然后使用该记录计数以及restder()公式有条件地隐藏或显示详细信息中的组名称,以特定的间隔创建新页面,等等。您还将使用recordnumber-这将为您提供整个报告中记录的实际当前计数,以每个新客户的单独部分显示。
Step overview: 步骤概述:
The result should be that the Da looks like a group header and displays the company name at the top of each group of 5 records. 结果应该是Da 看起来像一个组标题,并在每组5条记录的顶部显示公司名称。 The "New Page before" in Dc will force a new page to be created after every 10th record within each client group .
Dc中的“之前的新页面”将强制在每个客户组中的每第10条记录之后创建一个新页面。 The GH1 "page before" will force a new page to start each time the client changes but the condition prevents it from occurring for the first group in teh report.
每次客户端更改时,GH1“之前的页面”将强制启动新页面,但这种情况会阻止该页面在报告中的第一组发生。 If you have a separate report header page you may not care about that anyway.
如果您有单独的报告标题页,则可能根本不关心它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.