Output report to multiple pdf's

This Forum is for the use of Clarion For Windows - Software Developers requiring help and assistance for Tracker Software's PDF-Tools SDK of Library DLL functions(only) - Please use the PDF-XChange Drivers API SDK Forum for assistance with all PDF Print Driver related topics.

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Sean - Tracker, Chris - Tracker Supp, Tracker Supp-Stefan, Ivan - Tracker Software, Tracker - Clarion Support, John - Tracker Supp, Support Staff, moderators

Post Reply
incredibill
User
Posts: 24
Joined: Fri Jun 06, 2008 4:59 pm

Output report to multiple pdf's

Post by incredibill » Wed Sep 11, 2013 10:34 pm

I would like to output a single report to multiple pdf files, in this case one for each customer. Unless you have a better suggestion, I would need the ability in my print routine to close the current pdf file, and initialize a new one with a different file name; OR close the current pdf file, create a new file and change the file handle reference withing PDF Tools.

Can you do anything for me?

Tracker - Clarion Support
Site Admin
Posts: 1412
Joined: Wed Jun 30, 2004 4:45 pm
Location: Maryland, USA
Contact:

Re: Output report to multiple pdf's

Post by Tracker - Clarion Support » Wed Sep 11, 2013 11:44 pm

Hi Bill!

Yes and no, and yes. We built a multi-PDF feature into the PDF-Tools but it's hard to use.

Instead I recommend breaking your Report into a Process procedure and a separate Report procedure.

Use the Process to run your Customer file, and from the Process call the Report. Set the Report to not run the Customer file but use it to limit the records in the other files. Set your PDF filename at the beginning of the Report.
Craig Ransom
Tracker Software - Clarion Support
http://www.tracker-software.com

incredibill
User
Posts: 24
Joined: Fri Jun 06, 2008 4:59 pm

Re: Output report to multiple pdf's

Post by incredibill » Thu Sep 12, 2013 12:20 am

Hi, Craig

Certainly, I can do that. But, with statements it involves some redundancy. For each customer, I have to calculate their balance as of the statement date to determine if a statement should be printed. At the same time, I accumulate some detail. I'll either have to re-calc in the report procedure (only for "eligible" customers, though) or pass data as a parameter. Additionally, all the parameters which drive the selection criteria will have to be passed to the report procedure too. Then, I'll effectively have separate reports procedures for printed statements and emailed statements, and will have to keep any future changes synchronized.

Hey, I've got a great idea! Just make the multi-pdf feature easy to use. :wink:

But seriously, I can't close the active pdf file and change the file handle?

Bill

Tracker - Clarion Support
Site Admin
Posts: 1412
Joined: Wed Jun 30, 2004 4:45 pm
Location: Maryland, USA
Contact:

Re: Output report to multiple pdf's

Post by Tracker - Clarion Support » Thu Sep 12, 2013 12:37 am

Hi Bill!

Your code doesn't run the Clarion Report Engine; the Clarion Report Engine runs your code. The hardest part is interrupting the Clarion Report Engine. It doesn't have interrupt processing and never has had. It will run all the pages it has to run to complete the print job. We grab the resulting WMF files from the PrintPreviewQueue and turn them into a PDF.

I'll try to find the demo for using the multi-PDF processing. That occurs AFTER the print run is complete, by parsing the TEXT fields in the WMF page images.
Craig Ransom
Tracker Software - Clarion Support
http://www.tracker-software.com

incredibill
User
Posts: 24
Joined: Fri Jun 06, 2008 4:59 pm

Re: Output report to multiple pdf's

Post by incredibill » Thu Sep 12, 2013 2:47 am

Yes, processing all the WMF files at the end of the print job yanks my logic completely.
Thanks for looking for the demo.

Tracker - Clarion Support
Site Admin
Posts: 1412
Joined: Wed Jun 30, 2004 4:45 pm
Location: Maryland, USA
Contact:

Re: Output report to multiple pdf's

Post by Tracker - Clarion Support » Thu Sep 12, 2013 7:09 pm

Hi Bill!

fbapdf41.app is the demo file for multi-volume (in this case, volume = PDF file) by tagging each page with a special STRING field that signals to the PDF Generator that this is the start of a new PDF.

Please see the demo code and also 3rdparty\Docs\TrackerSP\PDF-Tools41\PdfTools41CW.pdf section 4.3.4 Report Template Multifile Output Support by Embedded PDF File Name Identification.

Don't hesitate to email me or post here if you have questions.
Craig Ransom
Tracker Software - Clarion Support
http://www.tracker-software.com

incredibill
User
Posts: 24
Joined: Fri Jun 06, 2008 4:59 pm

Re: Output report to multiple pdf's

Post by incredibill » Thu Sep 12, 2013 7:57 pm

Thanks, Craig. Looks to be exactly what I need.

Tracker - Clarion Support
Site Admin
Posts: 1412
Joined: Wed Jun 30, 2004 4:45 pm
Location: Maryland, USA
Contact:

Re: Output report to multiple pdf's

Post by Tracker - Clarion Support » Thu Sep 12, 2013 9:13 pm

Hi Bill!

Hopefully it will. I spent quite some time getting that feature to work! Please look VERY carefully at the generated and hand-code in the demo, and where each bit is located.
Craig Ransom
Tracker Software - Clarion Support
http://www.tracker-software.com

incredibill
User
Posts: 24
Joined: Fri Jun 06, 2008 4:59 pm

Re: Output report to multiple pdf's

Post by incredibill » Thu Sep 12, 2013 10:02 pm

Thanks, Craig.

Tracker - Clarion Support
Site Admin
Posts: 1412
Joined: Wed Jun 30, 2004 4:45 pm
Location: Maryland, USA
Contact:

Re: Output report to multiple pdf's

Post by Tracker - Clarion Support » Thu Sep 12, 2013 10:58 pm

You're welcome! :)
Craig Ransom
Tracker Software - Clarion Support
http://www.tracker-software.com

Post Reply

Return to “PDF-Tools SDK (DLL Libraries Only) - Clarion For Windows Developers Only Please”