Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Mailmerge
Message
De
27/10/2011 07:41:30
 
 
À
27/10/2011 05:11:39
Hong Yew
People Quest
Malaisie
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2008
Network:
Windows 2008 Server
Database:
MS SQL Server
Divers
Thread ID:
01527451
Message ID:
01527457
Vues:
71
>Hi all
>
>MSWord mailmerge generates a letter per record. I need to generate letters with One to Many data from 2 tables.
>I am looking at possibility of doing mailmerge without using MS Word.
>
>Is this possible or is there a better alternative
>
>Your advice is much appreciated
>
>Thanks & Best Regards


I did this once

You need to add a field that indicates when the detail ends

You can control whether to advance a record with the NextIf in the mergefield code

http://office.microsoft.com/en-us/word-help/field-codes-nextif-field-HP005186175.aspx

It was a mailmerge to customers with open invoices

I had a code A for the header, D for detail, and T for Total


The last mergefield of the header (cust name, address, et) had
 {NEXTIF {MERGEFIELD type } = "A"}
The body - listing the open invoices
{  if { mergefield type} = "D" { mergefield invoiceamount} }
The field most to the right of the body
{  if { mergefield type} = "D" { mergefield daysopen} }  {NEXTIF {MERGEFIELD type } = "D"}
At the end of the page to print the total
{  if { mergefield type} = "T" { mergefield totalamountopen} }
Gregory
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform