Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Print jobs printing out of sequence
Message
De
07/08/2006 16:18:59
 
 
À
07/08/2006 14:01:04
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01140791
Message ID:
01143600
Vues:
8
>Did they recently install a newer version of Word or Crystal Reports?
>
Thanks for responding........

I have paid much attention to the version of Word. Right now it's Word 2003. I don't know when it was installed on the workstation, but I don't think it was recently.

We're still using the same very old version of Crystal Reports.

Both Word and Crystal Reports are printing the documents correctly. They just come out of the printer in a different sequence than they appear to enter it.

Is it possible that Word is buffering its print output. I create the Word Application when the system starts. Do you think it would help if I created and destroyed a Word instance for each document and force it to flush the buffers? That doesn't sound practical (I'd be doing this hundreds of times per day) but I'm looking for anything that works.

......Rich




>
>>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform