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

Double print

Status
Not open for further replies.

lous

Technical User
Mar 8, 2002
53
US
I have a Crystal Report (version 7) that was designed to print items that have more than one location assigned to them in the same area. The selection formula is as follows:

{location1.mapstck_location} > "P01000A11" AND
{location1.mapstck_location} < &quot;P99999X11&quot; and
{location2.mapstck_location} > &quot;P01000A11&quot; AND
{location2.mapstck_location} < &quot;P99999X11&quot; AND
{location.mapstck_location}<>{location2.mapstck_location}

The report data is set up as follows:

item description location1
location2

However, when printed it prints everything double and the second entry is just the reverse from the first.

Here's an example:

ITEM DESCRIPTION LOCATION
1234 Book Title Here P01-001-A11
P02-001-A11
1234 Book Title Here P02-001-All
P01-001-A11
4567 Next Book Title P99-099-A11
P98-099-A11
4567 Next Book Title P98-099-A11
P99-099-A11
8901 Another Book (etc etc etc)

How can I get rid of the extra entry with the locations reversed?
 
Looks like you have a table join problem.

SQL doesn like more than one 1-many table joins as it multiplies out the combinations in each table.

Can you use SQL to join the Location1 and Location2 tabls into a UNION view and then join your data to that table? Editor and Publisher of Crystal Clear
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top