简体   繁体   English

在Crystal Report的“详细信息”部分插入空白行

[英]Insert blank line in Detail section of Crystal Report

I have an issue concerning inserting blank line in Detail Section of Crystal Report (using SAP Crystal Report with VS 2013) For example, if there is only 01 record , it should be always 05 lines instead of 01 lines. 我有一个关于在Crystal Report的“详细信息”部分插入空白行的问题(在VS 2013中使用SAP Crystal Report),例如,如果只有01条记录,则应该始终为05行而不是01行。 The below is the form created in Excel 以下是在Excel中创建的表单

在此处输入图片说明

And here is the form created with Crystal Report: 这是使用Crystal Report创建的表单:

在此处输入图片说明

I googled a lot but no solution is satisfied in my case. 我在Google上搜索了很多,但对我的解决方案没有满意的结果。

Please help. 请帮忙。 Thanks in advance! 提前致谢!

I will suppose that you mean you need to always show 5 lines. 我假设您的意思是您需要始终显示5行。 So, if you have 2 items, there will be 3 blank lines. 因此,如果您有2个项目,将有3个空行。 I will suppose you will never have 6 items (since you did not answer to Raphael question yet). 我想您将永远不会有6个项目(因为您尚未回答Raphael问题)。 I will suppose you can only work on the Crystal Reports design (otherwise you may try what Raphael suggested). 我想您只能从事Crystal Reports设计(否则,您可以尝试Raphael的建议)。

  1. Let the details section showing the item fiels as you did. 让详细信息部分像以前一样显示该项目。
  2. Create blank new details section. 创建空白的新详细信息部分。 Fill the lines of the grid. 填充网格线。 Put the number of the item using text boxes (2, 3, 4, 5). 使用文本框输入项目编号(2、3、4、5)。 Note that you will have now the sections Detail A, Detail B, ..., Detail E. 请注意,您现在将拥有详细信息A,详细信息B,...,详细信息E部分。
  3. Use the "Section Expert" to edit the "Supress" formulas of each black detail section. 使用“ Section Expert”编辑每个黑色细节部分的“ Supress”公式。 The formulas may be: 公式可以是:

    Count ({ItemTableName.Id}) >= 2 OR recordNumber < Count ({ItemTableName.Id}) //Detail B suppress formula Count({ItemTableName.Id})> = 2 OR recordNumber <Count({ItemTableName.Id})//详细信息B禁止公式

    Count ({ItemTableName.Id}) >= 3 OR recordNumber < Count ({ItemTableName.Id}) //Detail C suppress formula Count({ItemTableName.Id})> = 3 OR recordNumber <Count({ItemTableName.Id})//详细信息C禁止公式

    Count ({ItemTableName.Id}) >= 4 OR recordNumber < Count ({ItemTableName.Id}) //Detail D suppress formula Count({ItemTableName.Id})> = 4 OR recordNumber <Count({ItemTableName.Id})//详细信息D禁止公式

    Count ({ItemTableName.Id}) >= 5 OR recordNumber < Count ({ItemTableName.Id}) //Detail E suppress formula Count({ItemTableName.Id})> = 5 OR recordNumber <Count({ItemTableName.Id})//详细信息E禁止公式

You may need to adapt this solution if you have groups or if the initial assumptions are not true. 如果您有小组或初始假设不正确,则可能需要调整此解决方案。

Here is a RPT file as an example . 这是一个RPT文件作为示例

首先,您需要修复详细信息部分,然后,如果总共有6行和1行包含数据,则需要5个空白行,然后设计详细信息部分,然后在详细信息部分下->报告部分将空白留空,并在页脚中放置页脚详细信息然后检查结果->它在6行之后也显示空白行,它转到下一页第7行

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM