Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Suppressing Duplicate Records

Status
Not open for further replies.

maas2011

Programmer
Dec 28, 2011
16
BH
Hello All,

I am facing some difficulties in suppressing the duplicated columns.

My report looks like:

Group Header #1: Deal_NO

Details: Deal_No, Amount, Type, Related_Deal, Rate

Group Footer #1: Deal_NO

and the data is:

123

123, 1000, SELL, 144, 0.33
123, 1000, SELL, 165, 0.44
123, 1000, SELL, 167, 0.76

What I want is to display the first line only which is : 123, 1000, SELL, 144, 0.33

I placed for all the columns in the properties -> suppress -> formula which is {Deals.Deal_No} <> NEXT ({Deals.Deal_No})

and I tried to replace the amount with a formula @Amount
if {Deals.Deal_No} <> NEXT ({Deals.Deal_No}) Then Amount else 0, but it showed me the second line 123, 1000, SELL, 165, 0.44
and the amount 1000 was suppressed. So, can you please help in showing the first line only

Thanks
 
depending on the end goal of your report, you could display the detail records in the Deal_NO group header and then suppress all the detail records.
 
My request is that I want to modify the formula which is in the details sections
 
Also, why when I am placing the @amount formula, the 100 will be 0 where it should be one them (1000) showing

123
144
123, , SELL, 165, 0.44
167
 
maas2011

You are going to need to explain exactly what you are trying to achieve here as your posts are confusing (to me at least). For example you say you want to see only the first row of data (which there are several ways that would achieve this including what fisheromacse suggested), but then go on to say you want the amounts in subsequent rows to show zero (there would be no subsequent rows if the first part worked). The most recent post only serves to confuse me more.

If you wanted to suppress the 'duplicated' rows without moving the details to the GH, you could do a conditional suppression on the details section using the following formula:

Code:
Not OnFirstRecord and
{Table.Deal_No} = Previous({Table.Deal_No})

If you wanted only the duplicated fields to be suppressed, you could use the "Suppress if Duplicated" option within the field format editor.

To keep the subsequent rows but amend the amounts to 0 on subsequent rows, you could use the following formula.

Code:
If      Not OnFirstRecord and
        {Table.Deal_No} = Previous({Table.Deal_No})
Then    0
Else    {Sheet1_.Amount}

There are a lot of skilled people that will be happy to help, but you need to explain exactly what you want.

Cheers
Pete
 
Thanks pmax for your help.

I will try this and I will get back to you.

In summary: I want to show only the first line and on the other lines I will show only the related deals columns (if they are not duplicated) for each group
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top