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!

Print Record if the First 15 Characters Match

Status
Not open for further replies.
Sep 11, 2008
25
US
I am using Crystal 11. I have a table called SIT_Site that contains the field called Site. I need to create a report that compares the 1st. 15 characters in the SIT_Site.Site field and only prints duplicates (the records where the 1st. 15 characters match). How would I accomplish this please?

Thank you,

Old Gray Mare
 

Create a formula:

left(SIT_Site.Site,15)

Group on that formula. Put any other fields you want to see in the details section, then do a count on any one of them. The count goes into the group footer.

In the group selection formula, it will be:

count(somefield,{@yourformula}) > 1

You may want to suppress the details section.

 
Hi, Brian: Thank you for your formula. I changed it to:

Left({SIT_Site.Site},15)

I am getting the 1st. 15 characters of all site records, but I only want the site records where the 1st. 15 characters are duplicates. It seems I need an IF in there somewhere, and perhaps a DO While Printing?

What am I missing?

Thanks again,

Old Gray Mare
 
You should reread the rest of Brian's post and follow the instructions for grouping and group selection.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top