>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.)
ERASE Rpt2.TMP
REPORT FORM Rpt3 TO FILE Rpt2.TMP
=STRTOFILE(FILETOSTR('Rpt2.TMP'),'RPT1.TMP',.T.)
DECLARE INTEGER CopyFile IN KERNEL32.DLL ;
STRING @SourceFileName, ;
STRING @DestFileName, ;
INTEGER bFailIfExists
IF CopyFile('Rpt1.TMP','LPT1:',0) # 0
ELSE
ENDIF