如何在水晶报告中的DETAIL SECTION中设置MAXIMUM记录数? [英] How to set MAXIMUM number of record in DETAIL SECTION in crystal report?

查看:330
本文介绍了如何在水晶报告中的DETAIL SECTION中设置MAXIMUM记录数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在水晶报表中的DETAIL SECTION中设置最大记录数量
我使用具有预先打印格式的报表。
这允许六行的行被打印。
所以在报表中,如果我得到更多然后六行详细部分,那么应该设置在报告的下一页。
现在说我得到8行细节部分,然后第一页与六行应设置&其余2行应设置在第二页&应在第二页详细信息部分中自动添加6行空白。

How to set MAXIMUM number of record in DETAIL SECTION in crystal report I 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)后
recordnumber 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

但它只有当我只需要设置页面的最大行,但
它不工作,如果没有详细信息,不要添加任何黑色的行SECTION
,但我想添加空行。

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

例如:
订单说明数量

Ex: Order Description Quantity

推荐答案

这是可能的,但它是一个黑客。我很肯定没有什么内置的水晶将为你做这个。

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

详细部分。

在第一个细节部分(详细信息b)中,转到部分专家,然后单击抑制(不向下钻取)旁边的公式按钮。在公式中,您需要放置以下内容:

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

  • < = 6

  • Details c should be <=3
  • Details d should be <=4
  • Details e should be <=5
  • Details f should be <=6

是6行的固定宽度。

希望这有助于。

这篇关于如何在水晶报告中的DETAIL SECTION中设置MAXIMUM记录数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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