Web Connection User Discussions
Question about wwpdf and a fox frx
Gravatar is a globally recognized avatar based on your email address. Question about wwpdf and a fox frx
  Michael B
  All
  Nov 8, 2022 @ 03:36pm

Hi Rick,

Looking for a suggestion or best practice. I have a foxpro report that has embedded images. The goal for this report is to use wwPdf to output in the users browser. On my development machine all is fine, because the images are on the 'c' drive, but in production, the app lives on e.

Is it best to embed the images in the foxpro project along with the report and call the frx that way or is there some other clever way to make this work?

Thanks in advance!

Gravatar is a globally recognized avatar based on your email address. re: Question about wwpdf and a fox frx
  Tore Bleken
  Michael B
  Nov 8, 2022 @ 10:41pm

Don't hardcode the path to the images, just make sure that the image folder is in the path.

If that's not feasable, use a variable for the path to the images.

Gravatar is a globally recognized avatar based on your email address. re: Question about wwpdf and a fox frx
  Rick Strahl
  Michael B
  Nov 9, 2022 @ 11:26am

You should never hard code anything in an application - everything you use should use relative paths.

Reports unfortunately tend to 'embed' full path names if I recall (it's a been a while) and you probably have to fix up the image paths inside of the frx file.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Question about wwpdf and a fox frx
  Michael B
  Tore Bleken
  Nov 10, 2022 @ 01:05pm

Thanks Tore and Rick. My goal is to have one frx that is shared between many tenants. I tried vars and including the frx in the fox project, but nothing seemed to work when running in COM other than hard coding a specific path which as Rick points is of course bad practice.

Maybe I should have asked how everyone is creating complex reports that are intended to be output as PDF. Using the Fox report writer is sooooooooo easy and the wwPDF works great (except for the issue of seeming to have to hard coding images). I'll check the paths as you suggest and see if i can perhaps hack the frx dbf and replace with a relative path.

Gravatar is a globally recognized avatar based on your email address. re: Question about wwpdf and a fox frx
  Tore Bleken
  Michael B
  Nov 10, 2022 @ 10:18pm

Have you tried hacking the frx and change the fixed paths into relative paths?

© 1996-2022