Showing posts with label Export to Pdf. Show all posts
Showing posts with label Export to Pdf. Show all posts

2025-10-28

Creating Merged Reports and Exporting to PDF using FoxyPreviewer (Chaining / Combining reports)

One of the coolest possibilities brought to VFP9 reports is the ability to merge more than one report in a single run.
This is done by using the clauses NOPAGEEJECT and NORESET:
  • NOPAGEEJECT tells the Report Engine to wait for the next report instead of ejecting the current page.

  • NORESET keeps the page counter continuing from the previous report session.

This simple but powerful combination lets you join several reports into a continuous output — ideal for creating consolidated reports, multi-section documents, or any case where different layouts should appear in a single file.

And the best part: FoxyPreviewer works beautifully with merged reports — whether you just preview them on-screen or export them directly to PDF, Excel, or other formats.

Below are a few common scenarios and how to handle them using FoxyPreviewer.

⚠️ Important: When working with merged reports, the PREVIEW and/or TO FILE clauses must appear in all the REPORT FORM commands in your sequence.
Otherwise, the reports will not merge properly, and you might see only the first one.



🧩 1. Merged Report with Preview

You can easily merge several reports and display them in FoxyPreviewer’s interactive preview window.
Here’s the general idea:

* Sample 1
* Chained report / Normal Preview
DO FoxyPreviewer.App
REPORT FORM (_Samples + "\Solution\Reports\Colors.frx") NOPAGEEJECT PREVIEW
REPORT FORM (_Samples + "\Solution\Reports\Wrapping.frx") NOPAGEEJECT NORESET PREVIEW
REPORT FORM (_Samples + "\Solution\Reports\Percent.frx") NORESET PREVIEW

The reports will appear seamlessly one after another, sharing the same preview session.


🧩 2. Merged Report → Save to PDF and Open in Default PDF Viewer

If you want to create a merged report and automatically save it as a PDF, then open it in the user’s default PDF reader, FoxyPreviewer makes that just as easy:

* Sample 2
* Chained report / Save to file / Preview in default PDF reader
DO FoxyPreviewer.App
lcFile = "c:\Temp\MyReport.pdf"
REPORT FORM (_Samples + "\Solution\Reports\Colors.frx") NOPAGEEJECT TO FILE (lcFile) PREVIEW
REPORT FORM (_Samples + "\Solution\Reports\Wrapping.frx") NOPAGEEJECT NORESET TO FILE (lcFile) PREVIEW
REPORT FORM (_Samples + "\Solution\Reports\Percent.frx") NORESET TO FILE (lcFile) PREVIEW

This approach is great for automated workflows or batch processing — the user gets the final PDF file immediately.


🧩 3. Merged Report → Save to PDF without Preview (Silent)

Sometimes you just need to generate the final PDF file silently — for example, when the output is sent by email or stored in a shared folder.

* Sample 2
* Chained report / Save to file / NO Preview (silent)
DO FoxyPreviewer.App
lcFile = "c:\Temp\MyReport.pdf"
REPORT FORM (_Samples + "\Solution\Reports\Colors.frx") NOPAGEEJECT TO FILE (lcFile)
REPORT FORM (_Samples + "\Solution\Reports\Wrapping.frx") NOPAGEEJECT NORESET TO FILE (lcFile)
REPORT FORM (_Samples + "\Solution\Reports\Percent.frx") NORESET TO FILE (lcFile)

No window is shown; the file is generated in the background, ready to use.


✅ Wrapping Up

Merging reports is one of those features that makes VFP9’s reporting engine truly shine — and with FoxyPreviewer, the possibilities go even further.
You can mix multiple report layouts, include summaries, attach additional pages, and export everything in one clean, professional-looking PDF.

If you haven’t tried it yet, download the latest version from
👉 www.foxypreviewer.com

2025-10-21

FoxyPreviewer3 and VFPA64


FoxyPreviewer has long been a trusted tool in the Visual FoxPro community, offering enhanced reporting capabilities, PDF exporting, previewing, and much more. While full compatibility with VFPA32 and VFPA64 hasn't been a core development goal, many developers have asked how well FoxyPreviewer works in these environments.

I'm happy to share that:


🧩 FoxyPreviewer3 now works well with VFPA64!


There were a few reported issues in the past—ranging from minor glitches to isolated crashes—but these now appear to be resolved. In recent tests and community feedback, FoxyPreviewer has been performing normally under VFPA64, with no significant problems.

⚠️ If you do encounter any issues specific to VFPA, please report them directly to: vfpimaging @ hotmail.com

 


🔍 A Quick Refresher: What FoxyPreviewer Brings

💾 PDF, RTF, XLS, Image Exporting
Easily export reports to multiple formats, including native PDFs, without requiring additional software.

🖨️ Advanced Report Previewer
Modern and flexible preview window with toolbar, zoom, search, annotation, and print features.

🎨 Custom Report Output
Supports dynamic fonts, images, barcodes, and more using ReportListener hooks.

📌 Localization and Configuration
Fully customizable toolbars, multi-language support, and user-friendly settings programmatically or interactively.


🤝 A Word of Thanks

A special thank-you goes to Chen, the developer of VFPA (Visual FoxPro Advanced), for his responsiveness and collaboration in addressing compatibility issues.


🔗 Useful Links

Thanks to the community for the feedback and testing—keep it coming!




⚠️ Important note about VFPA compatibility

FoxyPreviewer is an independent project and has no direct relation to VFPA or its development.
I’m not responsible for VFPA32 or VFPA64, and users should use these versions at their own risk.

FoxyPreviewer is not officially supported in the VFPA environment, and I don’t explicitly test each new release there.
If you decide to use it with VFPA, please make sure to perform your own compatibility testing.