Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Print jobs printing out of sequence
Message
From
07/08/2006 14:01:04
 
 
To
27/07/2006 13:19:45
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01140791
Message ID:
01143527
Views:
7
Did they recently install a newer version of Word or Crystal Reports?


>For an insurance application, I have a VFP 6 application which monitors a printqueue table (via a timer) and when it spots a new record, prints a series of documents related to a specific policy. The documents are in either Word or Crystal Reports format. This application has been in place for several years and has suddenly started printing the documents out of sequence. Here is the relevant code from the timer control
>SELECT * FROM frfrmque ;
>  WHERE pqid = curPrintQueue.pqid AND NOT DELETED();
>  ORDER BY fqid;
>  INTO CURSOR curForms
>
>IF _TALLY > 0
>
>  CREATE CURSOR printed (printdoc C(30))  && see Note 1
>  SELECT curForms
>
>  SCAN
>    IF fqid = "  2"  && See Note 2
>      DO prtforms
>    ENDIF
>
>    DO CASE
>      CASE fqrectype = "F"
>        Thisform.PrintForm
>        Thisform.PrintedForm(curforms.fqrectype,curforms.fqoutput)  && See Note 1
>      CASE fqrectype = "R"
>        lcType = TRIM(fqoutput)
>        Thisform.Print&lcType
>        Thisform.PrintedForm(curforms.fqrectype,curforms.fqoutput)  && See Note 1
>      CASE fqrectype = "D"
>        lcType = TRIM(fqoutput)
>        Thisform.Print&lcType
>        Thisform.PrintedForm(curforms.fqrectype,curforms.fqoutput)  && See Note 1
>      CASE fqrectype = "S"
>        Thisform.PrintSeparator
>        Thisform.PrintedForm(curforms.fqrectype,curforms.fqoutput)  && See Note 1
>      CASE fqrectype = "P"
>        Thisform.PrintType = ALLTRIM(curForms.fqParam)
>        Thisform.PrintSeparator
>        Thisform.PrintedForm(curforms.fqrectype,curforms.fqoutput)  && See Note 1
>    ENDCASE
>  ENDSCAN
>
>  SELECT printed  && See note 1
>  LIST TO PRINT OFF NOCONSOLE
>ENDIF
>
>
>Note 1: The PRINTED table was added so that I can verify that the jobs were sent to the printer in the correct sequence. A new method (PrintedForm) was added to the form and is called after every print job is created. The method translates the codes in the table to English and then appends a new record to the PRINTED table. At the end of the SCAN, this table is LISTed to the printer.
>
>Note 2: After the cover sheet is printed, this program LISTs the contents of the CurForms cursor to the pritner (while translating the codes to English)
>
>I've been having the users compare the two new documents (from Note 1 and 2) to make sure that they are identical. In all cases, this has been true. However, when they compare it to the order in which the documents emerge from the printer, there are differences. All the documents are there, but the order is jumbled.
>
>
>Everything indicates to me that the documents are being sent in the correct sequence. Can anybody think of a reason they would come out of the printer differently?
>
>Do you think it would help to put a check at the top of my SCAN to wait until the printer queue is empty? I think I know where to find an API call which would tell me this, but I'd feel much more comfortable using code from the people here.
>
>Any and all suggestions will be much appreciated
>
>Thanks to all............Rich
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform