Error en FOXYPREVIEWER v2.33 beta

205 views
Skip to first unread message

Oscar Calderon Fuentes

unread,
Apr 13, 2011, 2:14:09 PM4/13/11
to publice...@googlegroups.com
Dear Cesar,

Do not know what can be wrong, but the following occurs:

Developing a 2.33 version foxypreviewer, I think it's the last, works fine. But production error occurs image2.jpg attachment.

In my main program (PRG) the following lines of code:
 

SET PROCEDURE TO LOCFILE("Foxypreviewer.App") ADDITIVE

 

Do Form [MainForm] Name oMainform

Read Events

     

CLOSE PROCEDURES "FoxyPreviewer.App"

 
In MainForm, in a procedure, try to generate PDF report directly without going through preview. For this I use the code found in the documentation of FoxyPreviewer.
 

**********************************************************************

* FoxyPreview sample script

*

Local loReport As "PreviewHelper" Of "FoxyPreviewer.app"

loReport = Createobject("PreviewHelper")

 

With loReport As ReportHelper

 

      * Add the FRX and clauses here

      .AddReport("Documentos_Repactacion.Frx", "", "DocReneg")

      .AddReport("Calculo_Repactacion.Frx", "", "CuotasNuevas")

 

      *.lPDFasImage = .T.

      .cPDFSymbolFontsList = "PF Barcode 39,PF Barcode 128"

 

      .cDestFile = "c:\PDF_Resumen\RES\Reporte.Pdf"

 

      * Execute the report preview

      .RunReport()

 

      lcPDFFile = .cDestFile

 

Endwith

loReport = Null

Release loReport

**********************************************************************

 

 



--
Oscar Calderón Fuentes
Santiago - Chile
 

Cesar VfpImaging

unread,
Apr 13, 2011, 3:26:42 PM4/13/11
to Comunidad de Visual Foxpro en Español
Hola Oscar,

Me gustaria ver la mensaje de error que tienes, por favor !
Intente dejar el FRX/FRT y la imagen "FUERA" de tu EXE !
Sospecho que Foxypreviewer no las esta encuentrando porque estan
dentro de tu EXE.

Aguardo tu respuesta para poder direcionarte.
> *Oscar Calderón Fuentes*
> *Santiago - Chile*

Oscar Calderon Fuentes

unread,
Apr 13, 2011, 3:30:45 PM4/13/11
to publice...@googlegroups.com
OK, I'll try your advice. I comment later ...

Oscar Calderon Fuentes

unread,
Apr 13, 2011, 3:49:34 PM4/13/11
to publice...@googlegroups.com
I left all images of the report, *. app, reports FRX / FRT excluded from my project but located within the same folder as my executable, still gives me the same error.
 

Error No.     : 202

Procedimiento : init

Línea         : 718

La ruta o el nombre de archivo no es válido.
 
The error occurs with the executable. If I run in development since my project is going well.


2011/4/13 Oscar Calderon Fuentes <ocald...@gmail.com>

Cesar VfpImaging

unread,
Apr 13, 2011, 4:05:23 PM4/13/11
to Comunidad de Visual Foxpro en Español
Oscar,

Con FoxyPreviewerCaller debe funcionar.
Adicione el archivo "FOXYPREVIEWERCALLER.PRG" que se encuentra el
folder "Source" a tu proyecto


** Codigo anticuo
** Local loReport As "PreviewHelper" Of "FoxyPreviewer.app"
** loReport = Createobject("PreviewHelper")

** Nuevo codigo
** Solo se cambiaron las primeras 3 lineas !

SET PROCEDURE TO FoxyPreviewerCaller.prg ADDITIVE
LOCAL loReport as "FoxyPreviewerCaller" OF "FoxyPreviewerCaller.Prg"
loReport = CREATEOBJECT("FoxyPreviewerCaller")
> 2011/4/13 Oscar Calderon Fuentes <ocalder...@gmail.com>
>
>
>
>
>
> > OK, I'll try your advice. I comment later ...
>
> *Santiago - Chile*- Ocultar texto de la cita -
>
> - Mostrar texto de la cita -

Oscar Calderon Fuentes

unread,
Apr 13, 2011, 5:57:30 PM4/13/11
to publice...@googlegroups.com
Cesar,
 
Lines of code changed as you advised me. The result was as follows:

- When running in development time, the process is stopped by action of vfp debug. Imagen1.jpg attached.
 
- When the executable process, continues to appear the error:

SELECT Repactacion

 Error No.     : 202

Procedimiento : init

Línea         : 718

La ruta o el nombre de archivo no es válido.

(The path or filename is invalid)
 
 
The strange thing is that the "SELECT Repactacion" does not fit me because I inform other aliases to the report.
 
The procedure code:
 

lcArcDestino

= "c:\Mandatos\PDF_Resumen\prueba.pdf"

**********************************************************************

* FoxyPreview sample script

*

LOCAL

loReport AS "FoxyPreviewerCaller" OF "FoxyPreviewerCaller.prg"

loReport

= CREATEOBJECT("FoxyPreviewerCaller")

With

loReport As ReportHelper

* Add the FRX and clauses here

.AddReport("Documentos_Repactacion.Frx", "", "DocReneg")

.

AddReport("Calculo_Repactacion.Frx", "", "CuotasNuevas")

*.lPDFasImage = .T.

.CPDFSYMBOLFONTSLIST = "PF Barcode 39,PF Barcode 128"

.CDESTFILE = lcArcDestino

* Execute the report preview

.RunReport()

lcPDFFile = .CDESTFILE

Endwith

loReport

= Null

Release

loReport
Image1.jpg

Cesar VfpImaging

unread,
Apr 13, 2011, 6:36:20 PM4/13/11
to publice...@googlegroups.com
Gracias Oscar,
 
Mas facil que intentar de solucionar eso es crear en definitivo un nuevo "Objecttype" para generar PDFs automagicamente.
Puedes enviarme un PRG con los datos necesarios ?
 
Este reporte trabaja bien en el modo simplificado ? De dentro de tu EXE ?
 
 
Mas tarde intentare de habilitar eso:
 
_Screen.oFoxyPreviewer.cDestFile = "c:\Oscar\MyPDF.pdf"
REPORT FORM tuReporte OBJECT TYPE 10
 
 
Que tal ?

Alfonso Arias Lemas

unread,
Apr 13, 2011, 8:58:43 PM4/13/11
to publice...@googlegroups.com
Oscar, ya que esta lista es en Español y todos los mensajes son publicos serias tan amable de enviarlos traducidos tambien, una copia para Cesar y otra para el grupo....

 


De: Oscar Calderon Fuentes <ocald...@gmail.com>
Para: publice...@googlegroups.com
Enviado: mié,13 abril, 2011 20:57
Asunto: Re: [vfp] Re: Error en FOXYPREVIEWER v2.33 beta
Reply all
Reply to author
Forward
0 new messages