本文介绍了如何在水晶报表的细节部分设置最大记录数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何设置水晶报表DETAIL SECTION的最大记录数我正在制作具有预印格式的报告.这允许打印六行行.所以在报告中,如果我得到超过六行的详细信息部分,那么它应该设置在报告的下一页.现在说我在详细部分得到 8 行,然后应该设置有 6 行的第一页 &剩下的 2 行应该设置在第二页 &应在第二页详细信息部分自动添加 6 行空格.

How to set MAXIMUM number of record in DETAIL SECTION in crystal reportI am making Report which has Pre-Printed Format.Which allows Six Lines of row to be PRINTED.So in report if i get More then Six row in detail Section then it should be set on next page of report.Now say i get 8 rows in detail section then First Page with Six rows should be set & remaining 2 rows should be set on second page & 6 rows blank space should be automatically added in second pages detail section.

我尝试过:详细部分的部分专家和反对新页面添加公式后(x-2)记录号 mod 6 = 0

I have tried like :section expert for the detail section and against New Page After add the formula (x-2)recordnumber mod 6 = 0

但它只在我只需要为页面设置最大行但如果细节部分的行较少,则不添加任何黑行但我想添加空白行.

But it only works when i just have to set Maximum row for Page butIT DO NOT ADD ANY BLACK ROW IF THERE ARE LESS ROW IN DETAIL SECTIONbut i want to add blank row.

例如:订单说明数量

推荐答案

这是可能的,但它有点 hack.我很确定 Crystal 中没有任何内置功能可以为您做到这一点.

This is possible to do but it is a bit of hack. I'm pretty sure there is nothing built in to Crystal that will do this for you.

首先,您需要在详细信息部分的报表中添加一个新的公式字段,使用以下公式:

First you need to add a new formula field to your report in the Detail Section, with the following formula:

(RecordNumber Mod 6)

我将这个公式称为 mod_record.

然后,您需要在主要详细信息部分下方添加 5 个新部分.在您刚刚添加的每个新部分中添加一行.

You then need to add 5 new sections below your main Detail section. Add a single line to each of the new sections you have just added.

在第一个详细信息部分(详细信息 b)中,转到 Section Expert 并单击 Suppress (No Drill-Down) 旁边的公式按钮.在公式中,您需要输入以下内容:

In the first detail section (Details b) go to Section Expert and click the formula button next to Suppress (No Drill-Down). In the formula you need to put the following:

If OnLastRecord = true Then
  If {@Mod_Record} <= 1 Then
      false
  Else
      true
Else
  true

除了一个更改之外,每个详细信息部分的公式都是相同的.您需要将每个部分的 <= 1 替换为以下内容:

The formula is the same for each detail section apart from one change. You need to replace the <= 1 with the following for each section:

  • 详细信息 c 应为 <=3
  • 详情 d 应为 <=4
  • 详细信息 e 应为 <=5
  • 详细信息 f 应为 <=6

这会给人一种印象,细节部分是固定宽度的 6 行.

This will give the impression that the details section is a fixed width of 6 lines.

希望这会有所帮助.

这篇关于如何在水晶报表的细节部分设置最大记录数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-14 11:31