抑制字段(如果在Crystal Reports中重复)的公式 [英] Formula for Suppressing Field if duplicate in Crystal Reports
问题描述
我有一个视图,其中显示水晶报告数据,我有字段如关税,租金,股票,毛和净。我的问题是,如果有人改变数据库中的资费,它将显示2行相同的记录与不同的资费这是从数据库的角度来看的正常行为,但是如果相同的ID具有不同的费率或者在新记录中重复出租,则我想将每月租金的字段抑制为0.
I have a view which shows data on crystal reports where I have fields like tariff,rental,shares,gross and net.My problem is if someone changes the tariff in database it would show 2 rows of the same record with different tariff which is normal behavior from database point of view but I want to suppress the field of monthly rental to 0 if the same id has different tariff or the rental is repeated in new record.
ID Tariff Rental
1 20 390
1 15 390
如果基于id的重复,我希望抑制报表上的Rental字段。我已在水晶报表中使用此公式检查上一个字段数据,并禁止重复。
I want the field of Rental on reports to be suppressed if duplicates based on id.Currently I have used this formula in crystal report to check previous field data and suppress if duplicate.
{DatabaseField} =上一个({DatabaseField})
{DatabaseField}=Previous({DatabaseField})
它工作正常,但如果id不相同,它也会抑制我不想要的。我希望它只抑制相同的id。
It is working fine but if the id is not same and the rental is repeated then also it will suppress which I don't want.I want it to suppress only for same id.
推荐答案
公式进入字段抑制。
在租用栏位
{ID} =先前({ID})
和 {rental} =上一个({rental})
该报告将禁止租借。
我想这将为您工作。
这篇关于抑制字段(如果在Crystal Reports中重复)的公式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!