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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal Reports - Supress values in details section

Status
Not open for further replies.

Devi16

Programmer
May 3, 2011
6
US
I did add two details section in the report

Col1 Col2
Details A -- CMM 2113204040000
Details B -- NXG 2113204040000
Details A -- CMM 2113204040000/1
Details B -- NXG NONE

Details -A is from one database and Details-B is from another database. I did create a group header by Details A col2 field .So above is an example.

What I want is when in the group if Details A col2 is equal to details B Col2 then other details should be suppressed .

EX:

Col1 Col2
Details A -- CMM 2113204040000
Details B -- NXG 2113204040000
Details A -- CMM 2113204040000/1
Details B -- NXG NONE

The output should be


Col1 Col2
Details A -- CMM 2113204040000
Details B -- NXG 2113204040000

(last two rows should be suppressed) .Please let me know how can we do to suppress the duplicates in the details section.

Appreciate your help!




 
Could anyone help me to solve above issue?

 
perhaps, create a formula:
//{@testsame}
IF {table1.DetA} = {table2.DetB}
then 1
else 0


use the above formula as criteria for suppression:
ie: {@testsame}=0

 
Thanks for the reply .
DetA and DetB are not tables but they are details section in the report.
 
i used {Table1.DetA} and {Table2.DetB} as placeholders, you would replace them with the fields you want to test against.
 
Thanks for the reply .It worked for the duplicates .But I have some values which need to be displayed when the values are different

EX: 1) which is obtained

Col1 Col2
Details A -- CMM 2113204040000
Details B -- NXG 2113204040000
Details A -- CMM 2113204040000/1
Details B -- NXG NONE

Output :

Col1 Col2
Details A -- CMM 2113204040000
Details B -- NXG 2113204040000

Ex :2)
Col1 Col2
Details A -- CMM 0006078
Details B -- NXG NONE

then the output should be

Col1 Col2
Details A -- CMM 0006078
Details B -- NXG NONE

Ex(2) should not be suppressed . But Ex(1) last two values should be suppressed (as they are duplicates)

To be simple , if the count of details A is greater than 1 then apply above logic .But my question is how to get the count of details A and count of details B

Please let me know.




 
Could anyone help me to solve above issue?
 
The explanation of your criteria is not clear.

-LB
 
Hi LB,

I am sorry for late reply .

I want to attach the report exported but no direct attachment to the post. So pasted it .

Page 1:

021080562
CMM 021080562
NXG 021080562
CMM /021080562
NXG NONE

021081176
CMM 021081176
NXG NONE
CMM /021081176
NXG NONE
CMM 021081176 IADBRP
NXG 021081176 IADBRP


CMM 021180040359612671
NXG NONE
0221015
CMM 0221015
NXG 0221015
CMM 0221015 SA
NXG NONE

CMM 0241210
NXG 0241210
CMM 0241210 SA
NXG NONE

CMM 03810381B0639
NXG 03810381B0639
CMM 0381.0381B.0639 IDB-OC
NXG NONE

CMM 03810381B0640
NXG 03810381B0640
CMM 0381.0381B.0640 IDB SF
NXG NONE
03810381B0641
CMM 03810381B0641


- CMM line is Details A section (database 1)
- NXG line is Details B section (database 2)

-First five sections has one record in each section but in 6 group you can see 6 recors(3 records in each section). In that I want to display one record in a section .The condition is both field values should be equal


Ex: 1)
CMM 00010001390015006004
NXG 00010001390015006004 (as these are equal ,they should be displayed)

CMM 000100013900150060004
NXG NONE (as the vales are different they should be suppressed)

CMM 0010001390015006004
NXG NONE (as the vales are different they should be suppressed)


But if the group has one values per section .The details should not be suppressed(even if the values are different)


Ex:2

CMM 0006001
NXG NONE (this section should be suppress)

CMM 0006001/IDB-C-PD
NXG 0006001/IDB-C-PD (this section should be displayes)

The output should be

CMM 0006001/IDB-C-PD
NXG 0006001/IDB-C-PD



Ex:3

CMM 021180040359612671
NXG NONE (this should be displayed as no duplicates in this section)


Please let me know if that is clear .

Thanks,

Devi
 
Try a section suppression formula like this on detail_a and detail_b:

count({table1.col1},{table1.groupfield}) > 1 and
{table1.col2} <> {table2.col2}

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top