Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need distinst records from table
Message
De
09/07/1997 14:13:28
Elyse Pomerantz
Dynamic Data Concepts, Inc.
Brooklyn, New York, États-Unis
 
 
À
09/07/1997 12:13:01
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00039077
Message ID:
00039136
Vues:
32
>>I'm setting up a reporting module and I ran into the following problem. I have a SELECT statement that selects records from several files, each record distinct. For example, one file contains names, another addresses, another phone numbers, and another clubs that they belong to. The SELECT statement creates a table using all of the files, so a person may be listed several times if they belong to several clubs or have multiple phone numbers. The user can then choose which fields they want to print on a report or label. The problem arises when they choose only fields such as name and address. I don't want to print multiple labels with the same name and address. Even though the records in the table are distinct, the limited fields that were chosen to print are not. How can I get the label to print only one record if the chosen fields are duplicated?
>>
>>Thanks for any help,
>>Elyse
>
>Run SELECT DISTINCT name, address From ... Into Cursor tmpReport
>and print from the cursor.
>Also you can look at "Print Repeated Value" option of "Print When" dialog in Report Designer.

1. The user selects the fields for each report so it's difficult to determine
which fields to re-select. The printing information is stored in an array
and it would be difficult to pull out the field names. For example:

aPrintLine[1]="alltrim(cFirstName)+' '+cLastName"
aPrintLine[2]="altrim(cCity)+', '+cState+' '+cZip"

2. My main problem is with labels, not reports, and I only want to suppress repeated values if the entire info to print is duplicate, i.e. - if 2 consecutive records have different names at the same address, I don't want the address suppressed. I don't know how this can be done using "Print When."

Elyse
Elyse Pomerantz
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform