×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Foxypreviewer

Foxypreviewer

Foxypreviewer

(OP)
I am running FoxyPreviewer v3.00.247 2023.12.10 Windows 11.
My problem is that when outputting to a PDF data from the previous PDF (in this case a previous invoice) is superimposed on the current PDF. Almost as if the previous PDF data is not being cleared. In older versions I issued a RELEASE after each Foxypreviewer session
Now I am leaving Foxypreviewer as recommended
Here is the startup code
DO FOXYPREVIEWER.APP WITH "CLEAN"
_Screen.oFoxyPreviewer.cUser = ********
_Screen.oFoxyPreviewer.cSerial = *******************
_Screen.oFoxyPreviewer.nRenderMode = 2
mFullFoxyVer = _Screen.oFoxyPreviewer.cVersion

Here is the code I use to produce the PDF
IF nFoxyVersion >=3
REPORT FORM (mReportName) TO FILE (mDestination)
ELSE
DO FoxyPreviewer.App WITH "CLEAN"
REPORT FORM (mReportName) OBJECT TYPE 10 TO FILE (mDestination)
DO FoxyPreviewer.App WITH "CLEAN"
ENDIF

Should this be the other way around ie because the mVersion is 3 or greater I should be using the CLEAN option
I guess I am asking if the CLEAN option clears any old data?
TIA John

RE: Foxypreviewer

I would expect any version TO FILE to overwrite and not extend a file or even overlay results.

How about solving the issue by adding a timestamp to the filename? I.e. set mDestination=...+ ttoc(Datetime(),1) or ...+Dtos(Date(), if date is sufficient.
You also can easily ERASE (mDestination) before running the report as that doesn't error if no file (mDesitination) exists. It could only become problematic when anything keeps a file handle open.

If you generate files and mail them, I would also move them to an archive directory of sent items, if you don't rely on sent mail items to keep that record, then in the next run there should bve no files to overwrite anyway.

Chriss

RE: Foxypreviewer

(OP)
Hi Chris
I doubt that is the problem
Each file generated (mDestination) has a unique name consisting of the customer code and invoice/docket number plus each pdf generated is deleted when the email has been either successfully sent or even if not sent due to a connection error.
My client is generating and sending hundreds of invoices throughout the day so I suggest the problem is in the generation of the PDF
In the past we fixed problems like this by re-booting the workstation suggesting that some buffers were full (maybe workspace in the Windows Temp folder)
I am getting the client to re-boot his workstations and the data server. If that fixes the problem I will post here
Thanks for answering anyway
Regards
John

RE: Foxypreviewer

(OP)
Further to this issue:
My client re-booted his computers and the problem went away which brings me to why is this still happening?
Is this a FoxyPreviewer issue or a Windows issue?
Is there any way to clear the workspace without re-booting the computer?
Thanks
John

RE: Foxypreviewer

Well, according to the documentation of FP3 the meaning of CLEAN is:

Quote (new in FP3)

Clean - A faster initialization, loading only the needed ReportListeners for all the outputs. The good and old "OBJECT TYPE" mode will not be available, but "REPORT FORM YourReport.Frx TO FILE xxxxxx.pdf" will do the same job. Recommended setting. It was not set as default to keep backwards compatibility.
See https://www.foxypreviewer.com/p/new.html

So that's not what you want to use with OBJECT TYPE in your REPORT FORM commands.

I can't imagine the report engine to reuse anything of previous report runs, unless you generate graphics and refer to them,i.e. I don't think it's FPs fault. There's also no cleaning of TEMP folders, for example, with a restart, unless you explicitly run a temp cleaning.

Anyway, I think you should look into other places and how you build up the report.

Chriss

RE: Foxypreviewer

(OP)
Thank you for your thoughts on CLEAN etc
From experience re-booting the workstation has worked for years and because it works in this case I will stay with that option
From yesterday when each and every invoice was blended with others to today (after the re-boot) when all invoices print correctly the only difference was the re-boot I am happy to continue along those lines.
Regards
John

RE: Foxypreviewer

Completely understandable.

Just notice I didn't post my thoughts, just quoted what's said on the FP homepage. Also, if you ignore "OBJECT TYPE" mode will not be available and still run REPORT FORM calls with OBJECT TYPE after initializing WITH "CLEAN", I can't help you.

the other part of it saying: It was not set as default to keep backwards compatibility. means, IMHO, you can stick to all your REPORT FORM commands as used with previous FP versions up to 2.99 when you don't use the WITH "CLEAN" initialization.

Anything else and what you already seemed to have experíenced before changing to FP3 is very very likely also not coming in from the version change but a systematic problem you already had before, isn't it?

If you want the FP developers to address problems you should use their github to report an issue.

Chriss

RE: Foxypreviewer

(OP)
Agreed...

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close