水晶报表:仅显示每个组中的第一条记录 [英] Crystal Reports: Showing only first record in each group

查看:618
本文介绍了水晶报表:仅显示每个组中的第一条记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我搜索以获得所需的答案,但没有找到正确的iam寻找 - 请帮助我。



请按照我在水晶报告中的步骤: p>

使用水晶报表命令(我创建了一个查询以获取所需的业务号码)
- >其中获取5个商业号码



注意:每个企业都有很多收据编号(第一批收据,第二批收据...这样....) - 这些收据细节存储在table_receipts。



在table_business - 我有关于业务号码,客户,产品详细信息的所有详细信息...



请了解链接:



table_business - table_customer - table_product - table_receipts



表之间的关系是:




  • table_business.Bno = table_receipts.Bno

  • table_customer.Cno = table_customer.Cno

  • table_product.Pno = table_product .Pno



创建Crystal报告命令后;我只是拖动水晶报告中需要的表(table_business,table_customer,table_product,table_receipts)



现在我创建了一个业务编号BNo的组



我需要使用参数显示所选择的商业号码的所有详细信息 - 除了收据之外,它的到期。



所有收据(所有分期付款收据)。我只需要显示只有第一张收据(即:收据编号starst与字母F)



希望你了解我的要求 - 请帮助我在这方面。 / p>

期待您的宝贵回复。
这是我为同一个问题尝试,它的工作原理。

解决方案

这是一个两步过程,涉及使用运行总字段和在专家部分中抑制。



第一步是创建运行总字段(在参数字段下面)
右键单击它,然后单击新建并命名您的字段即CountFirstOnly
在左侧,您将看到您可以执行功能的字段。



选择收据字段。将其转到字段以进行汇总和选择计数。



在评估下对每个记录选择



在更改组时重置并选择您的分组编号并单击确定



将该字段拖到报表中。



第2部分:专家部分



打开部分专家的细节,然后点击抑制X-2



您的公式应为:CountFirstOnly> 1



单击确定



刷新您的报告



希望这样做了。


I searched to get the required answer but not found exactly what iam looking for - please help me.

Please follow the steps i made in crystal report:

Using crystal report command (i created a query to get the required business number) --> which gets 5 Business numbers

Note: Every business is having many receipt numbers (1st installment receipt, 2nd installment receipts... like that....) - these receipt details are stored in table_receipts.

In table_business - i have all details about business number, customer, product details...

Please understand the links:

table_business - table_customer - table_product - table_receipts

Relationship between tables are:

  • table_business.Bno=table_receipts.Bno
  • table_customer.Cno=table_customer.Cno
  • table_product.Pno=table_product.Pno

After creating the crystal report command; i just drag the required table in crystal report (table_business, table_customer,table_product,table_receipts)

Now i created a group for Business Number "BNo"

I need to display all the required details about that selected Business Number using parameter - its coming fine except receipts.

I mean its showing all receipts (all installment receipts). I need to display only the first receipt only (i.e: receipt number starst with letter "F" )

Hope you understand my requirement - Please help me in this regard.

Expecting your valuable reply. Regards, Sensa.

解决方案

Here is what I tried for the same issue and it worked. It's a 2 step process involving using Running Total Fields and Suppressing in Section Expert.

First step is to create a Running Total Field (Right under Parameter Fields) Right click on it and click New and name your field i.e. CountFirstOnly On the left you will see the fields you can perform functions on.

Select the receipts field. Bring that over to field to summarize and select count.

Under Evaluate select For Each Record

Reset on Change of Group and select your grouping, in this case business number and click OK

Drag that field into your report.

Part 2: Section Expert

Bring up the section expert on details and click on the suppress X-2 button

Your formula should be: CountFirstOnly >1

Click OK

Refresh your report

Hopefully this did the trick.

这篇关于水晶报表:仅显示每个组中的第一条记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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