Support Forum - Prints before preview sometimes

05/13/2019 21:07 Ray Rippey wrote:

I have a variable to cause 2 invoices to be printed. I modified the code to
allow for that, however, if 2 invoices are supposed to be printed I had added
this code to the BeforePrintPreview embed:

  if  loc:numInvoices>1
    SELF.PageRanges.LowerRange = 1
    SELF.PageRanges.UpperRange = RECORDS(PrintPreviewQueue)
    ADD(SELF.PageRanges)
    SELF.Copies = loc:numInvoices
    SELF.FlushPreview
  .

Would this be causing it to print one to the printer before it goes to the
preview? I know if I set loc:numInvoices to 1, it previews like normal.
I'm sure I got this code somewhere here... It's just that we just now found out
that this is happening.

The only other code I can find that has to do with the # of copies is in the
embed BeforeProcessData/4000

ThisReport.Copies=loc:numInvoices

Is there a better way to tell it to print more than 2 copies... without it
printing one to the printer first before the preview?
Thanks,
Ray

05/31/2019 15:47 Oleg Fomin wrote:

> Is there a better way to tell it to print more than 2 copies... without it
printing one to the printer first before the preview?

Excuse me, it is not clear for me why do you need a better way? What is wrong
with existing approach?

Name:
E-Mail: (will not be published)
Subject:Prints before preview sometimes


Message body:

Verification code:

Please, do not include any URLs into the message.
Otherwise, your message will be rejected and IP blacklisted automatically.
Off topic messages will be deleted by moderator.