Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Too large
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
InstallShield
Titre:
Divers
Thread ID:
00631088
Message ID:
00692299
Vues:
59
>
I think the trouble is the list files command.
what you want is to list the records in the cursor not the files on your disk.
so a command more like
list to printer
might be more what you are looking for
or list fieldname off to to printername ... something which will loop though each record in your newly created cursor.
Bob Lee


Hi Bob
>Thanks for your idea about using a temp cursor. I tried it, but cannot get it to print. The text merge letter is in TextHold but it insists on printing a list of the Database Table/DBF files. Here is the code in the OK button (after I have selected a mailmerge letter & a single person to run through the mail merge routine). Maybe you can spot what I'm doing wrong.
>Bill
>
>*===========OK Button======
>local m.recno, afile, m.lctemp, m.count, lcHold
>*--------------
>
>if m.ToFile = .F. && ToFile prints to a disk file
> m.filename = SPACE(20)
> thisform.text1.refresh
>
> CREATE CURSOR TextHold (lineid c(80))
> afile = JUSTPATH(SYS(16,1)) + "\" + "TextHold"
>else
> afile = m.filename
>endif
>
>SET CONSOLE OFF
>SET PRINTER OFF & as per Tamar's advice
>SET TEXTMERGE TO (afile)
>SET TEXTMERGE ON NOSHOW
>WAIT WINDOW "Preparing report...Please wait" NOWAIT
>SET TEXTMERGE DELIMITERS TO
>SET MEMOWIDTH TO 80
>
>IF thisform.prnscope.value = 1
> \\<>
>ELSE
> IF NOT EMPTY(forexpr)
> forexpr = "FOR "+forexpr
> ENDIF
> IF NOT EMPTY(whileexpr)
> whileexpr = "WHILE "+whileexpr
> ENDIF
> SELECT (m.savearea)
> m.recno = RECNO()
> m.count = 0
> SCAN &forexpr &whileexpr
> if m.count > 0
> \<>
> else
> \\<>
> endif
> m.count = m.count + 1
> EJECT PAGE
> ENDSCAN
> GOTO RECORD m.recno
>ENDIF
>
>SET CONSOLE ON
>SET PRINTER off
>SET PRINTER TO
>SET TEXTMERGE OFF
>SET TEXTMERGE TO
>if m.ToFile = .F.
> WAIT WINDOW "Printing the report..." NOWAIT
> SELECT TextHold
> GETPRINTER()
> LIST FILES TO PRINTER
> endif
>* modi file (afile) && use for preview button
>
>IF AT("FOR",forexpr)<>0
> forexpr = SUBSTR(forexpr, AT("FOR",forexpr)+4)
>ENDIF
>
>IF AT("WHILE",whileexpr)<>0
> whileexpr = SUBSTR(whileexpr, AT("WHILE",whileexpr)+6)
>ENDIF
>
>m.ToFile = .F.
>m.filename = SPACE(20)
>thisform.refresh
>
>SELECT letters
>RETURN
>*===========
In the beginning, there was a command prompt, and all was well.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform