【问题标题】:Crystal Reports get field headers to show only onceCrystal Reports 使字段标题仅显示一次
【发布时间】:2020-06-16 20:23:06
【问题描述】:

我有一个包含 4 个组的报告。我正在尝试为每个顾客显示第一组信息、第二组信息、第三组信息一次(顾客是最高组)。我遇到的问题是其中一个字段可以有多个答案,因此如果我将这些字段放在组标题部分中,它只会显示第一个响应。它在详细信息部分显示所有响应,但我得到了很多冗余。如果先前的字段 = 字段似乎并没有完成这项工作,我已经尝试了一些抑制。以下是我希望为每个组看到的内容:

Group 1 header
Field 1           Field 2           Field 3
Field 1 content   Field 2 content   Field 3 response 1
                                    Field 3 response 2
                                    Field 3 response 3

Group 2 header
Field 1           Field 2           Field 3
Field 1 content   Field 2 content   Field 3 response 1
                                    Field 3 response 2

Group 3 header
Field 1           Field 2           Field 3
Field 1 content   Field 2 content   Field 3 response 1
                                    Field 3 response 2
                                    Field 3 response 3
                                    Field 3 response 4

【问题讨论】:

  • 组头中只放字段头,详细字段值
  • 我也试过了,因为赞助人下有 3 个组,如果我这样做,则不清楚哪些标题属于哪些详细信息。
  • 您能展示一下您的数据表的架构吗?

标签: crystal-reports


【解决方案1】:

我假设您有 1 个名为“Table”的表,其中包含 4 列:“Patron, Field1, Field2, Field3”。

所以,你的数据应该是这样的:

Patron1, Field1Content, Field2Content, Field3Response1
Patron1, Field1Content, Field2Content, Field3Response2
Patron1, Field1Content, Field2Content, Field3Response3
Patron2, Field1Content, Field2Content, Field3Response1
Patron2, Field1Content, Field2Content, Field3Response2
Patron3, Field1Content, Field2Content, Field3Response1
Patron3, Field1Content, Field2Content, Field3Response2
Patron3, Field1Content, Field2Content, Field3Response3
Patron3, Field1Content, Field2Content, Field3Response4

然后,我会尝试以下解决方案:

  1. 按 {Table.Patron} 分组。
  2. 将字段 {Table.Patron} 放在此组标题中。
  3. 按 {Table.Field1} 分组。
  4. 按 {Table.Field2} 分组。
  5. 将字段 {Table.Field1} 和 {Table.Field2} 放在此组标题中。
  6. 使用部分专家在此组标题中标记“为以下部分添加基础”选项。
  7. 将字段{Table.Field3}放在详细部分

如果需要按“Field3”排序,创建第三组(按Field3分组)。

如果字段“Field1”和“Field2”只有一次“Patron”出现,这将起作用。如果不是这种情况,您将不得不进行调整。如果您需要帮助,请告诉我。

编辑:最后的细节。要放置列标题的标签,您将需要上面的另一个组标题,没有选项“underlay following section”。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-09-23
    • 1970-01-01
    • 1970-01-01
    • 2015-01-19
    • 1970-01-01
    • 2012-11-29
    相关资源
    最近更新 更多