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

How to select 1 of several rows to print?

Status
Not open for further replies.

bhfmc

IS-IT--Management
Jun 18, 2003
29
US
When I print ID and address code I get this output:
198621755 PR
@00004399 MA
@00004399 PR
I want my output to be:
198621755 PR
@00004399 MA
In other words, how can I instruct crystal reports to print ID & address code IF a row with that ID has a code of MA; however, if the ID has no row with a code of MA but has a row with a code of PR, print that row. In any case print 1 and only 1 row per ID. Thanks.
 
What you want to do is the following:

1) Create a group based on ID
2) Move all fields to group header; suppress detail section
3) Sort by address code based upon the following formula field:

If {address} = "MA" then "A" else "Z"

This will cause the MA address codes to "float to the top" but still allow PR codes to be displayed, if that is all there is.

Let me know if you need a sample or further explanation.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top