FoxPro Programming
Creating a PDF file from a Report form .. command
Gravatar is a globally recognized avatar based on your email address. Creating a PDF file from a Report form .. command
  n/a
  All
  Dec 18, 2014 @ 03:43am
I need to transparently and without operator intervention, produce a PDF from a FRX generated report.

Will the classes in 'Internet and Client Tools 5.0' fulfil the above requirement?

Thanks
John

Gravatar is a globally recognized avatar based on your email address. Re: Creating a PDF file from a Report form .. command
  n/a
  johnE
  Dec 22, 2014 @ 12:05pm
There are a few options out there that will create PDFs from FRX forms. I've been using XFRX for many years, and it works flawlessly.

Here's an example of how it's integrated into our code. The report is called "Count", and XFRX's 'PrintReport' method uses the Foxpro FRX to create a PDF.

* APPL_PHYSICAL_PATH=c:\inetpub\wwwroot\fpp\
m.cFilePath=request.servervariables('APPL_PHYSICAL_PATH')
m.cFileName=[images/count]+[-]+SYS(3)+[.pdf]

SET REPORTBEHAVIOR 90
oPDF = CREATEOBJECT("wwXFRX9")
oPDF.nEmbeddingType =1
oPDF.lResetPageNo =.t.
oPDF.PrintReport([Count],m.cFilePath+m.cFileName)

IF NOT EMPTY(oPDF.cErrorMsg)
response.writeln([<p>Error creating PDF: ]+oPDF.cErrorMsg + felweb.xfrxErrorMsg +[</p>])
ELSE
* link to PDF, then auto-open the PDF
response.writeln([<p><a href="]+m.cFilename+[" target="_blank">]+;
[View/print the Parts Inventory Count PDF</a></p>])
endif

oPDF = .null.
RELEASE oPDF
ENDIF

The PDF-only version of XFRX is $149. It's rock-solid, and I would highly recommend it.

.. Geoff



I need to transparently and without operator intervention, produce a PDF from a FRX generated report.

Will the classes in 'Internet and Client Tools 5.0' fulfil the above requirement?

Thanks
John


Gravatar is a globally recognized avatar based on your email address. Re: Creating a PDF file from a Report form .. command
  Rick Strahl
  johnE
  Dec 22, 2014 @ 12:23pm

I'll echo Geoff's comment. XFRX is very fast (much faster than most other solutions as it doesn't actually print to the print spooler), reliable and well worth the money.

If you want a free solution you can use GhostScript which works fairly well.

XFRX and Ghostscript both are supported through wwPDF (wwXFRX and wwGhostScript classes) as well as a few others. But these two are generally the one I'd recommend for each end of the spectrum. If you're going to spend money on a PDF writer, you can't go wrong with XFRX IMHO.

+++ Rick ---



I need to transparently and without operator intervention, produce a PDF from a FRX generated report.

Will the classes in 'Internet and Client Tools 5.0' fulfil the above requirement?

Thanks
John



Rick Strahl
West Wind Technologies

Making waves on the Web
from Maui

© 1996-2024