This project is read-only.

how to create pdf containing foxcharts chart

Topics: Bug Information
Nov 19, 2011 at 9:22 AM

How to create pdf file containing FoxCharts chart ?

Report contains single chart with control source EVAL(chartdef.chart)

chartdef.char contains FoxCharts chart object. 

1. Using windows PS Postscript driver + latest Ghostscript.

GhostScript throw range check error on image.

2. Using xfrx. Colored rectangle appers in pdf instead of chart.

How to create pdf file from chart ?

Nov 19, 2011 at 10:50 PM

Hi,

 

I could advise you to make use of FoxyPreviewer this reporting class also has a nice working PDF creation output.

Regards,

 

Koen

Nov 21, 2011 at 4:43 PM

Thank you. Tried FoxyPreviewer PDF conversion and it worked.

I'm using Doug Henning SFPreview sample code described in his article to create clickable reports.

FoxPro script is placed to field user data. If filed is clicked, script from field user data is executed.

How to add clickable fields to FoxyPreviewer ?

Andrus.

Nov 21, 2011 at 5:08 PM

Andrus,

Please give URL where SFPreview to be found.

Koen

Nov 21, 2011 at 5:18 PM

From

http://www.stonefield.com/techpap.aspx

article:

ReportListener That Knows Where Objects Were Rendered

Extremely great article with great source code which creates clickable previewer. Maby Foxypreviewer is already based on this.

Andrus

Nov 21, 2011 at 10:13 PM

Hi Andus,

 

Indeed Doug's article is very well documented and a must-to-read for everyone willing to learn something about the new Reportlistener.

The clickable option I suppose you are referring to the search facility, this is implented in FoxyPreviewer, in te report toolbar click the button Search (next to the close button) and you can search anything in your report.

 

Koen

Nov 22, 2011 at 7:34 AM

1. I used Doug code to create clickable reports. This can be done simply by adding click method code to shape objects.

How to do it FoxyPreviewer ? Due to this I'm forced to use Doug code also. I added FoxyPreview source code to application.  Using Doug code and FoxyPreview together cause strange errors. Maybe due to this both use _gdiplus but different version.

2. In FoxyPreview pdf come texts are rendered into multiple lines and some digits does not fit. ghostsckript and xfrx do not have those issues.

Due to large number of reports it is difficult to change them all for foxypreviewer pdf.  How to create correct pdf reports using foxy?

Nov 23, 2011 at 11:35 AM

Kobruleht hi,

as pointed in my previous reply, the click option is implented in FoxyPreviewer. See the button Search in the toolbar.

Regards,

 

Koen

Nov 23, 2011 at 11:46 AM
Edited Nov 23, 2011 at 11:46 AM

Koen,

thank you very much.

How to can add code to report field in report designer so that if this report field is clicked in preview, this code will executed ?

Nov 23, 2011 at 1:30 PM
Edited Nov 23, 2011 at 1:43 PM

Hi,

 

Krobruleht,

 

why do you want to add code to a report, you should make use of FoxyPreviewer.app and when you run your report in preview you will find a button Search. Please try it:

take any exsisting report run FoxyPreviewer and click that button.

-----

What kind of code would you like to be exectured when clicking in a report preview field?

Regards,

 

Koen

Nov 23, 2011 at 2:07 PM

Koen,

I need that clicking in order number in report preview opens order (FoxPro form), eq. something line do form order with 1

 

Nov 23, 2011 at 5:01 PM

Krobruleht,

 

You need a report form with a dynamical label which has a click method. The method should open an other VFP form with a parameter?

Dont think this is described in Doug's white paper.  Dont think this is doable.

Just a hinch:

I would not go for a report layout. Reports are for printing (hard- or softcopy) not for such dramatic interactive actions.

Why dont you create on a new form with these components. You can (dynamicaly) position labels with and without a custom clickmethod on that form.

Also I would not search the answer here in VFPX this is not related to VFPX, advise you to post a question on Foxite, Universal, TekTips a.s.o.

 

Regards,

Koen

Nov 24, 2011 at 9:05 AM

Koen,

>You need a report form with a dynamical label which has a click method. The method should open an other VFP form with a parameter?

Yes

> Dont think this is described in Doug's white paper. Dont think this is doable.

I'm using it many years. I added click method handler to the shape object used in Doug paper to render report elements.

>I would not go for a report layout. Reports are for printing (hard- or softcopy) not for such dramatic interactive actions.

>Why dont you create on a new form with these components. You can (dynamicaly) position labels with and without a custom clickmethod on that form.

Reqirement is do define clickable fields at runtime. VFP form designer is not redistributable, it cannot used. Report designer works well in this case.

>Also I would not search the answer here in VFPX this is not related to VFPX, advise you to post a question on Foxite, Universal, TekTips a.s.o.

I tried to use FoxyPreviewer/Doug SFPreviewTest/XFRX pdf creator  together  but Adobe PDF does not open PDF files created by XFRX if FoxyPreviewer is loaded.

FoxyPreviewer uses somewhat different _gdiplus.vcx class without alias. Loading it forces others to use FoxyPreviewer _gdiplus class. Maybe this or some other conflict causes the issue. Because of this I'd prefer to include foxypreviewer source for easier debug.

Thank you. I posed it in Universal Thread but havent got solution.

Andrus.

Nov 24, 2011 at 9:37 AM
Edited Nov 24, 2011 at 9:46 AM

Hi Andrus,

>I'm using it many years. I added click method handler to the shape object used in Doug paper to render report elements.

in PDF documents?  That is interesting would like to learn how you do that.

 

I prefer to continue this discussion / find a solution for your problem in the appropiate user groups, noticed you frequent Universal Thread. Shall we continue overthere?

-How can I find your last discussion about this topic in UT? - subject or author / when posted?

Best regards,

 

Koen

Nov 24, 2011 at 10:41 AM

I need clickable reports in preview window only. Since I havent found a way in FoxyPreviewer for this I'm busing Doug modified Report Listener.

I'm looking for a way to use only FoxyPreviewer by adding clickable fields to FoxyPreviewer report preview window.

(For PDF files I have created clickable URLs using XFRX. XFRX allows to add field property and turns it into hyperlink in pdf file. This feature is actually not required for me, I don't need any clickable things in pdf files)

It looks like FoxyPreviewer does not have any support forum. We can continue in the place best for FoxyPreviewer.

UT message info:

Re: Creating pdf file containing FoxChart fails
Forum: Visual FoxPro
Category: VFPX/Sedna
Thread ID: 1529275
Message ID: 1529280
From: Tore Bleken
To: Andrus Moor
Date: November 19th, 2011
Have you tried the free FoxyPreviewer? It's awsome. Despite its name, it's a full blown report engine with a lot of features. http://foxypreviewer.codeplex.com/

>I tried to create pdf file containing single VFPX FoxChart object.
>report contains object with controlsource eval(mychart.chart )
>
>mychart.chart contains Foxchart object
>
>
>1. Using PS printer driver + Ghostscript. Ghostskript throw rangecheck exception on image.
>
>2. using equeus xfrx . colored rectangle appears in pdf file incread of chart.
>
>How to create pdf file containing foxcharts chart?
Nov 24, 2011 at 11:24 PM

Andrus,

nothing in above link about clickable fields.

Regards,

Koen

Dec 2, 2011 at 5:33 PM

I added new message to UT:

Forum:  
Visual FoxPro
  Thread ID:   1530191
Category:  
Third party products
  Message ID:   1530191
Title:  
How to create clickable fields in FoxyPreviewer
 

Report fields in preview are made clickable: if field is clicked, foxpro code from field userdata field is executed.

This is implemented using Doug Henning report listener class described in whitepaper in stonefield web site.

click method is added to shape objects from which preview is composed.

How to implement this in FoxyPReviewer so that if field is clicked in report preview window, foxpro code from this field userdata field is executed ?
 


Mar 8, 2012 at 1:13 PM

I haven't tried it, but take a look at this, maybe has the functionality you're looking for:

http://www.report-sculptor.com/home

Marco