0
votes

In Crystal reports, I have a detail line that includes fields from multiple TSQL tables. Detail lines print twice because multiple records are returned from one of the tables. I want only the first record returned for each of the tables with fields in the detail section.

I have tried to use field formatting to suppress after RecordNumber>1 but this only suppresses the field. I have Select Distinct records selected in database options.

I am not seeing a way to do this with Crystal options or formatting. Am I wrong? The only option seems to be a TSQL command to pre-process the table.

2
please remove the sql-server tag if you're looking for a Crystal-specific solution, thanks! - bartover
Thanks...Tag removed - Paul Garrett
what is the output when used Select Distinct Records - Siva
Have you tried using subreports. Sometimes it's the only way with Crystal. - reckface

2 Answers

0
votes

A cheap work-around could be to set up a suppressed running total variable that resets on group change, and then, suppress the detail section if the variable RTotal is greater than 1.

However, you're likely running into issues because the tables have not been joined properly. If you don't correctly identify the relationship between SQL tables using their respective ID columns, Crystal Reports will cross join those tables--giving you duplicate rows.

0
votes

You can check the Table Link. Then on the Fields Right click and Format Field. Click on Suppress Duplicate if you want to see Unique value.

Other way would be creating a group from the detail value and suppressing Details.