Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to create clickable fields in FoxyPreviewer
Message
De
03/12/2011 19:04:16
 
 
À
03/12/2011 03:39:25
Information générale
Forum:
Visual FoxPro
Catégorie:
Produits tierce partie
Divers
Thread ID:
01530191
Message ID:
01530296
Vues:
46
>>This feature is not available, and in the near future I don't have plans to implement it.
>>If you need it, I suggest working with Doug's article and create your own preview environment, just like he did.
>
>Application uses modified Doug listers to create clickable report previews and older xfrx to create pdfs.
>Since xfrx does not show foxchart object in pdf files, I replaced pdf creation with foxypreviewer using
>
> LOCAL loReport as PreviewHelper OF FoxyPreviewer
> loReport = CREATEOBJECT("PreviewHelper")
> WITH loReport as ReportHelper
> .AddReport('result.pdf', "NODIALOG")
> IF reportCodePage()#CPCURRENT()
> .ccoDEPAGE= TRANSFORM(reportCodePage())
> .lPDFASIMAGE = .t.
> ENDIF
> .RunReport()
> ENDWITH
> loReport = NULL
>
>
>Errors started to occur if Doug preview and FoxyPreview pdf creation are used together.
>Maybe this is caused because Doug code loads its own version on _gdiplus.
>
>To fix them I tried to release foxypreviewer before Doug listerner call like
>
> FOXYPREVIEWER('Release')
>
>LOCAL loListener
>loListener = newobject('DBFListener', 'DBFListener.PRG')
>REPORT FORM ( pcGRXTempName ) &cexpr object loListener
>EXTERNAL CLASS SFPreview
>LOCAL cForm
>cForm = 'g_robjn'+TRANSFORM(g_rapoobjeknr)
>STORE newobject('SFPreviewForm', 'SFPreview.vcx') TO (m.cForm)
>with &cForm
> .cOutputAlias = loListener.cOutputAlias
> .cCaption = transfld( 'nimetus', 'raport', ko.keel)
> .oListener = loListener
> .cmdTop()
>endwith
>&cForm.Show()
>
> FOXYPREVIEWER()
>
>This causes issues with _gdiplus: both listeners use _gdiplus
>Maybe foxypreviewer tries to use _gdiplus loaded by Doug listener.
>Foxypreviewer('Release') tries to release it but fails since _gdiplus is in use.
>
>I commented out _gdiplus release code in foxypreviewer but errors still occur.
>
>How to use Doug clickable report preview and FoxyPreviewer() pdf creation together ?
>best solution is maybe to load _Gdiplus at application startup and never release it. I don't know will Doug listener worg with
>_gdiplus included with FoxyPreviewer()

If you want, pls create a simple project, with these 2 aproaches, and I'll see what can be done to make them work together. In fact, Doug's aproach creates a different Preview container, and FOxyPreviewer uses the VFP9 default preview container. Since they behave differently, some problems will happen.

I'm sorry, but this project takes all my free time. If you'd like me to go deeper into this, please send me a small project.

Regards

Cesar
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform