Page 1 of 1

Pregunta organización de archivos

PostPosted: Sun Sep 07, 2014 4:44 pm
by mastintin
Tengo un par de dudas sobre que hacer en cuanto la organización del código ....
1.- ¿ Borramos todo el código que se encuentra bajo la directiva de compilación __XPP__ ?
2.- Existen algunas funciones repetidas que se encuentran en el fichero vrd.prg con un nombre y en otros ficheros con otro . No me gustaría quitar funciones a vrd pues esta muy bien estructurado y se podría compilar como un producto independiente . Podriamos copiar las funciones necesarias a ertools por ejemplo y no enlazar vrd.prg ... No se realmente ¿ como lo veis ?
Saludos , y quedo a la espera .

Re: Pregunta organización de archivos

PostPosted: Sun Sep 07, 2014 5:32 pm
by cnavarro
mastintin wrote:Tengo un par de dudas sobre que hacer en cuanto la organización del código ....
1.- ¿ Borramos todo el código que se encuentra bajo la directiva de compilación __XPP__ ?
2.- Existen algunas funciones repetidas que se encuentran en el fichero vrd.prg con un nombre y en otros ficheros con otro . No me gustaría quitar funciones a vrd pues esta muy bien estructurado y se podría compilar como un producto independiente . Podriamos copiar las funciones necesarias a ertools por ejemplo y no enlazar vrd.prg ... No se realmente ¿ como lo veis ?
Saludos , y quedo a la espera .


Manuel,
1.- Yo tambien opino que si
2.- Por mi parte, estoy de acuerdo

Re: Pregunta organización de archivos

PostPosted: Mon Sep 08, 2014 7:01 am
by lucasdebeltran
Manuel,

Epclass.prg, epmeta.prg y epfunc.prg son de EasyPreview y no son necesarios en EasyReport. Se pueden eliminar y suprimir las llamadas en EasyReport a :

Ep_Tiyup()
Ep_LinkedtoApp()
EP_Sethpath()

pues son funciones de EasyPreview:

Functions

EP_SetPath( <cPath> )
Necessary if the EasyPreview files are not in your application directory.
Default: your application path.

cPath Path in which the EasyPreview files lie.

EP_SetIniPath( <cPath> )
Set the directory in which the EasyPreview configuration file (epreview.ini)
is located. Please note that this path is related to the epreview.exe folder.
Default: your application path or the path set with EP_SetPath().

cPath Path in which epreview.ini lies.

EP_SetIniFile( <cFile> )
Set the name of the EasyPreview configuration file.
Default: EPREVIEW.INI

cFile filename without path.

EP_SetLicenceFile( <cFile> )
Set the name of the licence file.
Default: .\EPREVIEW.LIZ

cFile filename

EP_SetTempFile( <cFile> )
Sets the name of the temporary file EasyPreview generates.

EP_SetLanguageFile( <cFile> )
Set the EasyPreview language file.
Default: .\EPREVIEW.DBF

cFile filename

EP_TidyUp()
Deletes all temporare files. Normally EasyPreview deletes these files
automatically but in some cases - for example when an error occurs -
it could be necessary to use this function. We recommend to call
EP_TidyUp() at the start of your application.

EP_SetSaveAtStart( [<lValue>] )
You can use this function to open the "Save as" dialog directly after
starting EasyPreview.

lValue if .T. the "Save as" dialog should be opened at start (default = .F.)

EP_SetMailAtStart( [<lValue>] )
You can use this function to open the "Send to" dialog directly after
starting EasyPreview.

lValue if .T. the "Send to" dialog should be opened at start (default = .F.)

EP_WasPrinted()
Returns .T. if the last preview was send to the printer.

EP_SetDemoMode( cMessage )
The next preview runs in demo mode when you call this function.

cMessage default: "The preview runs in demo mode!"

EP_DirectPrint( nFromPage, nToPage )
Directly prints the pages. This function provides 32-Bit printing for
16-Bit application and solves the HP printing problems.
Just set the PREVIEW clause and call EP_DirectPrint() before
the PRINT command.
Example:
EP_DirectPrint()
PRINT oPrint PREVIEW

nFromPage page from which the print should start (default = 1)
nToPage last page (default = all pages)

EP_DirectSave( nFromPage, nToPage )
Directly saves the pages.

EP_DirectMail( nFromPage, nToPage )
Directly mails the pages.

EP_SetSendTo( cTo, cCc, cBcc, cSubject, cAddFiles )
Useful if you have to change the "Send to" settings for every printout.
Example:
EP_SetSendTo( "test@t-online.de", "", "", "Order" )
PRINT oPrint PREVIEW

cTo mail recipient(s)
cCc carbon copy recipient(s)
cBcc blind carbon copy recipient(s)
cSubject mail subject description
cAddFiles additional files





Vrd.prg tiene el motor de impresión de los informes. A ese fichero habría que fusionar VRDItem y vrdbcode.

VrdItem se usa en vrd.prg para crear los objetos:

CLASS VRDItem

Data:
cType Item type
cText Item text
nItemID Item ID
nShow Visible (1) or not visible (0)
nDelete Item removable (1) or not (0)
nEdit Edit items (1) or not (0)
nTop top position of the item
nLeft left position of the item
nWidth width of the item
nHeight height of the item
nBorder Draw a border around the image (1) or not (0)

Only for type Text
nFont Font number
lMultiline For printing memo fields

Only for type Text, Image and Barcode
cSource Source code which will be interpreted during run-time

Only for type Text and Barcode
nColText Text color
nColPane Background color
nOrient Orientation
nTrans Transparent background (1) or not (0)

Only for type Image
cFile Image file (BMP, DIB, JIF, JPG, PCX, RLE, or TGA)

Only for type: LineUp, LineDown, LineHorizontal, LineVertical, Rectangle or Ellipse
nColor pen color
nColFil fill color
nStyle line style
nPenWidth pen width

Only for type Rectangle
nRndWidth width of the rounded corner
nRndHeight height of the rounded corner

Only for type: Barcode
nBCodeType barcode type (numeric):
1 = Code 39
2 = Code 39 check digit
3 = Code 128 auto select
4 = Code 128 mode A
5 = Code 128 mode B
6 = Code 128 mode C
7 = EAN 8
8 = EAN 13
9 = UPC-A
10 = Codabar
11 = Suplemento 5
12 = Industrial 2 of 5
13 = Industrial 2 of 5 check digit
14 = Interlaved 2 of 5
15 = Interlaved 2 of 5 check digit
16 = Matrix 2 of 5
17 = Matrix 2 of 5 check digit
nPinWidth barcode pin width

Methods:
New( cItemDef, oVRD, nArea, nItemID )
Creates the object
cItemDef Item definition string
oVRD Ithe current report object
nArea area in which the item lies
nItemID ID of the item


Set()
If you have changed the value of datas in your source code use this method
to save the changes.




Y VrdBCode gestiona la impresión de los códigos de barras:

Methods:
New( hDC, cText, nTop, nLeft, nWidth, nHeight, cBCodeType, ;
nColText, nColPane, lHorz, lTransparent, nPinWidth )
create the barcode object
hDC handle of the window, dialog or printer object
cText barcode text
nTop top position
nLeft left position
nWidth barcode width
nHeight barcode height
nBCodeType Barcode type:
1 = Code 39
2 = Code 39 check digit
3 = Code 128 auto select
4 = Code 128 mode A
5 = Code 128 mode B
6 = Code 128 mode C
7 = EAN 8
8 = EAN 13
9 = UPC-A
10 = Codabar
11 = Suplemento 5
12 = Industrial 2 of 5
13 = Industrial 2 of 5 check digit
14 = Interlaved 2 of 5
15 = Interlaved 2 of 5 check digit
16 = Matrix 2 of 5
17 = Matrix 2 of 5 check digit
nColText pin color
nColPane background color
lHorz horizontal (.T.) or vertical (.F.)
lTransparent transparent or not
nPinWidth barcode pin width

ShowBarcode()
shows the barcode

Re: Pregunta organización de archivos

PostPosted: Mon Sep 08, 2014 7:55 am
by Antonio Linares
Manuel,

1.- ¿ Borramos todo el código que se encuentra bajo la directiva de compilación __XPP__ ?


Si, gracias :-)

Re: Pregunta organización de archivos

PostPosted: Mon Sep 08, 2014 12:18 pm
by mastintin
lucasdebeltran wrote:Manuel,

Epclass.prg, epmeta.prg y epfunc.prg son de EasyPreview y no son necesarios en EasyReport. Se pueden eliminar y suprimir las llamadas en EasyReport a :

Ep_Tiyup()
Ep_LinkedtoApp()
EP_Sethpath()


Gracias por las indicaciones de momento ya están borradas epclass, epmeta del archivo de enlazado y subido al repositorio.