Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Looking for a way to change printer status
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00314763
Message ID:
00314973
Vues:
23
>Here's the situation: I have several people printing multiple reports to the same printer. Right now what happens, is the reports come out in the order that they were queued to the printer - so they're all jumbled up. I have let them know that they can set the printer offline, run the printing program, do the reports, then turn the printer back online, and they'll get their reports all together... But I was wondering if there were any dll's or programs that would allow me to do this inside my app? Thanks.
>

There's a much simpler approach - send the output from the reports to a file, and then on completion, build a single file from them and queue it using something like the Win32 CopyFile() API call. This example sends the concatenated output to LPT1 at the end:
REPORT FORM Rpt1 TO FILE Rpt1.TMP
REPORT FORM Rpt2 TO FILE Rpt2.TMP
=STRTOFILE(FILETOSTR('Rpt2.TMP'),'RPT1.TMP',.T.)  && add 2nd report at end
ERASE Rpt2.TMP
REPORT FORM Rpt3 TO FILE Rpt2.TMP
=STRTOFILE(FILETOSTR('Rpt2.TMP'),'RPT1.TMP',.T.)  && add 3rd report at end
DECLARE INTEGER CopyFile IN KERNEL32.DLL ;
   STRING @SourceFileName, ;
   STRING @DestFileName, ;
   INTEGER bFailIfExists
IF CopyFile('Rpt1.TMP','LPT1:',0) # 0
   *  It was copied
ELSE
   *  it wasn't
ENDIF
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform