Page 1 of 1

CPCS example app problem

Posted: Wed Mar 23, 2011 3:51 pm
by dmjung
I don't think the cabpdf40.app example program is working as described. It looks like you intend to bring the preview up and then can create a pdf using a CPCS user defined button, but I don't see in the code where the user defined button's variable (swMakePdf) ever gets used by pdf-tools and you never get to the cpcs previewer in any event.

I started to tinker with the example app since that's the behavior I want to implement--bring up the cpcs previewer and then let the user create a pdf if desired--but thought I'd find out what's the recommended method to do this. (I'm actually in a legacy template app, but figured I could backtrack from the ABC app.)

--David

Re: CPCS example app problem

Posted: Wed Mar 23, 2011 8:10 pm
by Tracker - Clarion Support
Hi David!

You should be looking at clgpdf40.app since that's the CPCS Legacy demo app.

However, it's not set up for the User Defined Button handling in CPCS. That's easy to handle though.
  • To the Data section, add swMakePdf as a BYTE.
  • On the CPCS template, the second Advanced tab (next to last tab), set up the first User Defined Button to use swMakePdf and to use the MakePDF.ico icon file which should be in your 3rdparty\Images folder. Set the description to Generate PDF.
  • On the PDF-Tools Report Extension template, on the Previewer tab, set the top item to IF <var> and set the VAR field after it to swMakePdf. I would also go to the bottom of that tab and set Hardcopy to No - Never.
That's all there is to it.

Re: CPCS example app problem

Posted: Fri Oct 07, 2016 1:49 pm
by BarneyJ
Try to look here http://djangostars.com/blog/ . Helped me several times. Good luck!

Re: CPCS example app problem

Posted: Fri Oct 07, 2016 2:19 pm
by Tracker Supp-Stefan
Hello BarneyJ,

You are bringing up a post from 5 yeas ago. Is there any particular reason for you to do so?

Regards,
Stefan