Ok, muchas gracias, lo usare de esta forma; ya que quiero tener mas control
sobre los reportes impresos.
Saludos
"José Ramón Castro Polinio" <jrcpoli-quitarpara_envio]"@terra.es> escribió
en el mensaje news:[email=
46f3eb8f@ozsrv2.ozlan.local...]
46f3eb8f@ozsrv2.ozlan.local...[/email]
> Fernando Hernandez escribió:
>> Con consulta
>>
>> Como puedo hacer para que en el encabezado del reporte haga esto :
>>
>> EN EL ENCABEZADO :
>> El titulo centrado a un tamaño de fuente de 14.
>> El numero de pagina a la derecha a un tamaño de fuente de 10
>> La Fecha y hora a la izquierda con un tamaño de fuente tambien de 10
>>
>> EN EL CUERPO
>> y el resto del reporte a un tamaño de 8.
>>
>> Talvez me pueden iluminar algo al respecto
>>
>>
>>
>
> Saludos:
>
> Yo no hago con TReport pero espero que el adjunto te de una idea de como
> hacerlo.
>
> José Ramón Castro Polinio
>
------------------------------------------------------------ --------------------
> /*
> * Proyecto: Concurso
> * Fichero: ListadosFede.prg
> * Descripción: Listados correpondientes a la opción Federación
> * Autor: José R.Castro Polinio
> * Fecha: 29/05/2006
> */
>
> #include "Xailer.ch"
>
> PROCEDURE ListFederacion( oSender, lTexto )
> *
> LOCAL oDataSource
> LOCAL oDataSet
> LOCAL oFont, oPen
> LOCAL nCont, nLinea, nPagina
> *
> ** DataSource
> WITH OBJECT oDataSource := TCdxDataSource():New( oSender )
> :cConnect := ".."
> :Create()
> END
> *
> ** DataSet
> WITH OBJECT oDataSet := TDbfDataSet():New( oSender )
> :oDataSource := oDataSource
> :cProcess := "GENERAL"
> :cName := "BasesFederac.dbf"
> :lOpen := .T.
> :lShared := .T.
> :Create()
> END
> *
> ** Define las Fuentes y la Pluma
> oFont := TFont():New()
> oPen := TPen():New( PS_SOLID, 2, CLR_RED )
> *
> IF oDataSet:lOpen
> ** La base tiene registros
> IF oDataSet:RecCount() > 0
> *
> ** Cambiar el Cursor
> Application:lBusy := .T.
> *
> ** Inicializar variables
> nCont := 0
> nLinea:= 13
> nPagina := 1
> *
> ** Seleccionar la Fuente
> WITH OBJECT oFont
> :cName := "Arial"
> :nSize := 18
> :lBold := .T.
> :lUnderLine := .T.
> END
> *
> ** Opciones de vista previa y comfiguración listado
> Printer:cJobTitle:= "Listado de Federaciones"
> Printer:nOrientation := DMORIENT_PORTRAIT
> Printer:lPreview := .T.
> Printer:lPreviewModal := .T.
> Printer:nPreviewShowMode := smMAXIMIZE
> Printer:StartDoc()
> *
> DO WHILE !oDataSet:EoF()
> *
> ** Si el contador nCont = 0
> IF nCont == 0
> ** Llamada a la cabecera del listado
> Cabecera( lTexto )
> ** Listado de Federaciones
> WITH OBJECT Printer:oCanvas
> :oFont := oFont
> :oPen := oPen
> :nMapMode := mmSIMULCHAR // En carácteres
> :TextOut(12, 3, "Listado General de
> Federaciones",,CLR_RED)
> :nTextAlignment := taLEFT
> WITH OBJECT oFont
> :cName := "Arial"
> :nSize := 8
> :lUnderline := .F.
> :lBold := .F.
> END
> :oFont := oFont
> * Cabecera de lo campos de datos
> :TextOut( 05, 11, "Nº Fed." )
> :TextOut( 12, 11, "Nombre Federación" )
> :TextOut( 43, 11, "Dirección" )
> :TextOut( 64, 11, "Población" )
> :TextOut( 85, 11, "Provincia" )
> :TextOut( 98, 11, "Cod.Postal")
> :MoveTo( 02, 12) // Mover a la posición de inicio de la
> linea
> :LineTo( 02, 12) // Punto de inicio de la linea
> :LineTo(120, 12) // Punto final de la linea
> *
> ** Pone el nCont = 1
> nCont := 1
> END
> ENDIF
> *
> WITH OBJECT Printer:oCanvas
> ** Datos del Listado
> :TextOut( 7, nLinea,
> oDataSet:FieldGetByName('N_FED'),,CLR_BLACK )
> :TextOut( 10, nLinea,
> SubStr(oDataSet:FieldGetByName('NOMB_FED'),0,30),,CLR_BLACK )
> :TextOut( 41, nLinea,
> SubStr(oDataSet:FieldGetByName('DIRECCION'),0,30),,CLR_BLACK )
> :TextOut( 62, nLinea,
> SubStr(oDataSet:FieldGetByName('POBLACION'),0,20),,CLR_BLACK )
> :TextOut( 83, nLinea,
> SubStr(oDataSet:FieldGetByName('PROVINCIA'),0,20),,CLR_BLACK )
> :TextOut( 100, nLinea,
> oDataSet:FieldGetByName('COD_POSTAL'),,CLR_BLACK)
> *
> IF nLinea >= 85
> ** Poner el pie de página
> PiedePagina( nPagina )
> *
> ** Nueva página
> Printer:EndPage()
> //Printer:StartPage()
> *
> ** Inicializar contadores
> nCont := 0
> nLinea:= 13
> nPagina++
> *
> ELSE
> *
> ** Añade una doble linea
> nLinea := nLinea + 2
> *
> ENDIF
> END
> *
> ** Avanza un registro
> oDataSet:Skip()
> *
> ENDDO
> *
> ** Poner el pie de página
> Piedepagina( nPagina )
> *
> ** Cambiar el cursor Normal
> Application:lBusy := .F.
> *
> ** Cerrar el listado
> Printer:EndPage()
> Printer:EndDoc()
> Printer:Preview()
> *
> ELSE
> *
> MsgInfo("No existe registros para listar.",AppData:gCaption)
> *
> ENDIF
> *
> ** Cierra la base de datos
> oDataSet:Close()
> *
> ELSE
> *
> MsgInfo("La Base de datos no se puede abrir.",AppData:gCaption)
> *
> ENDIF
> *
> ** Destruir los objetos
> oFont:Destroy()
> oPen:Destroy()
> *
> RETURN
>
> //---------------------------------------------------------- ---------------
> PROCEDURE ListFederacion1( oSender, lTexto )
>
> LOCAL oDataSource
> LOCAL oDataSet
> LOCAL oFont, oFont1, oFont2, oFont3, oPen
> LOCAL nCont, nPagina
> LOCAL cPath := "Autonomia"
> LOCAL cPath1 := "bmpFed"
> LOCAL cName, cName1, cImagen, cImagen1
> LOCAL oBmp, oBmp1
> *
> ** DataSource
> WITH OBJECT oDataSource := TCdxDataSource():New( oSender )
> :cConnect := ".."
> :Create()
> END WITH
> *
> ** DataSet
> WITH OBJECT oDataSet := TDbfDataSet():New( oSender )
> :oDataSource := oDataSource
> :cProcess := "GENERAL"
> :cName := "BasesFederac.dbf"
> :lOpen := .T.
> :lShared := .T.
> :Create()
> END WITH
> *
> ** Define las fuentes y la Pluma
> oFont := TFont():New()
> oFont1:= TFont():New()
> oFont2:= TFont():New()
> oFont3:= TFont():New()
> oPen := TPen():New( PS_SOLID, 1, CLR_BLACK)
> *
> IF oDataSet:lOpen
> *
> ** La base tiene registros
> IF oDataSet:RecCount() > 0
> *
> ** Cambiar el cursor reloj de arena
> Application:lBusy := .T.
> *
> ** Inicializar variables
> nCont := 0
> nPagina := 1
> *
> ** Seleccionar la fuente
> WITH OBJECT oFont
> :cName := "Arial"
> :nSize := 18
> :lBold := .T.
> :lUnderline := .T.
> END WITH
> *
> WITH OBJECT oFont1
> :cName := "Arial"
> :nSize := 12
> :lBold := .T.
> :lUnderline := .F.
> END
> *
> WITH OBJECT oFont2
> :cName := "Arial"
> :nSize := 14
> :lBold := .F.
> :lUnderline := .T.
> END
> *
> WITH OBJECT oFont3
> :cName := "Arial"
> :nSize := 8
> :lBold := .F.
> :lUnderline := .F.
> END
> ** Opciones de vista previa y configuración listados
> Printer:cJobTitle := "Listado Federaciones con detalle"
> Printer:nOrientation := DMORIENT_PORTRAIT
> Printer:lPreview := .T.
> Printer:lPreviewModal := .T.
> Printer:nPreviewShowMode := smMAXIMIZE
> Printer:StartDoc()
> *
> DO WHILE !oDataSet:EoF()
> *
> ** Llama a la cabecera del listado
> Cabecera( lTexto )
> ** Listado de Federaciones con detalle
> WITH OBJECT Printer:oCanvas
> :oFont := oFont2
> :oPen := oPen
> //:nClrPane := RGB( 177, 220, 220 )
> :nMapMode := mmSIMULCHAR //En Carácteres
> :nTextAlignment := taLEFT // Aliniación Izquierda
> :TextOut(15, 5, "Listado General de Federaciones con
> detalles",,CLR_RED)
> :oFont := oFont1
> :TextOut( 5, 8, "Nº de Federación ",,CLR_BLACK)
> :TextOut(22, 8,
> oDataSet:FieldGetByName('N_FED'),,CLR_BLUE )
> :TextOut( 5, 9, "Nombre Federación ",,CLR_BLACK)
> :TextOut(22, 9,
> oDataSet:FieldGetByName('NOMB_FED'),,CLR_BLUE )
> :MoveTo( 02, 11) // Mover a la posición de inicio de la
> linea
> :LineTo( 02, 11) // Punto de inicio de la linea
> :LineTo(120, 11) // Punto final de la linea
> :oFont := oFont2
> :oFont:lBold := .T.
> :TextOut( 4, 10, "Datos Generales",,CLR_BLACK)
> :oFont := oFont1
> :oFont:lBold := .F.
> *
> ** Si contiene imagen de la Comunidad
> IF !Empty( oDataSet:FieldGetByName('ESCUDO_COM') )
> *
> cName :=
> ALLTRIM(oDataSet:FieldGetByName('ESCUDO_COM') )
> cImagen := cPath + cName
> *
> ** Si existe el fichero
> IF FILE( cImagen )
> *
> oBmp := TPicture():LoadFromFile( cImagen )
> *
> ** Pinta un rectangulo
> :FillRect( {42, 12, 54, 17}, RGB( 177, 220, 220 ) )
> //:Rectangle( {42, 12, 54, 17}, )
> *
> ** Poner la imagen en el listado
> :DrawPicture( {43, 13, 53, 16 }, oBmp )
> *
> ** Letra de texto
> :oFont := oFont3
> :TextOut(65, 24, " Escudo Autonomía ",,CLR_BLACK )
> :oFont := oFont1
> :oFont:lBold := .F.
> *
> ENDIF
> ENDIF
> *
> ** Si Contiene imagen del escudo de la Federación
> IF !Empty( oDataSet:FieldGetByName('ESCUDO_FED') )
> *
> cName1 :=
> ALLTRIM(oDataSet:FieldGetByName('ESCUDO_FED') )
> cImagen1 := cPath1 + cName1
> *
> ** Si existe el fichero
> IF FILE( cImagen1 )
> *
> oBmp1 := TPicture():LoadFromFile( cImagen1 )
> *
> ** Pinta un rectangulo
> //:Rectangle( {42, 20, 54, 29}, )
> :FillRect( {42, 20, 54, 29}, RGB( 177, 220, 220 ) )
> *
> ** Poner la imagen en el listado
> :DrawPicture( {43, 21, 53, 28 }, oBmp1 )
> *
> :oFont := oFont3
> :TextOut(65, 42, " Escudo Federación ",,CLR_BLACK )
> :oFont := oFont1
> :oFont:lBold := .F.
> *
> ENDIF
> ENDIF
> *
> :TextOut( 5, 14, "CIF : ",,CLR_BLUE )
> :TextOut(18, 14, oDataSet:FieldGetByName('CIF'),,CLR_BLACK )
> :TextOut( 5, 16, "Dirección : ",,CLR_BLUE )
> :TextOut(18, 16,
> oDataSet:FieldGetByName('DIRECCION'),,CLR_BLACK )
> :TextOut( 5, 18, "Población : ",,CLR_BLUE )
> :TextOut(18, 18,
> oDataSet:FieldGetByName('POBLACION'),,CLR_BLACK )
> :TextOut( 5, 20, "Provincia : ",,CLR_BLUE )
> :TextOut(18, 20,
> oDataSet:FieldGetByName('PROVINCIA'),,CLR_BLACK )
> :TextOut( 5, 22, "Código Postal : ",,CLR_BLUE )
> :TextOut(18, 22,
> oDataSet:FieldGetByName('COD_POSTAL'),,CLR_BLACK )
> :TextOut( 5, 24, "Teléfono : ",,CLR_BLUE )
> :TextOut(18, 24,
> oDataSet:FieldGetByName('TELEFONO'),,CLR_BLACK )
> :TextOut( 5, 26, "Fax : ",,CLR_BLUE )
> :TextOut(18, 26,
> oDataSet:FieldGetByName('TELEFONO_F'),,CLR_BLACK )
> :TextOut( 5, 28, "Telf.Móvil : ",,CLR_BLUE )
> :TextOut(18, 28,
> oDataSet:FieldGetByName('TELEFONO_M'),,CLR_BLACK )
> :TextOut( 5, 30, "Correo Electrón:",,CLR_BLUE )
> :TextOut(18, 30,
> oDataSet:FieldGetByName('CORREO_E'),,CLR_BLACK )
> :TextOut( 5, 32, "Página Web : ",,CLR_BLUE )
> :TextOut(18, 32,
> oDataSet:FieldGetByName('PAGINA_WEB'),,CLR_BLACK )
> :TextOut( 5, 34, "Autonomía : ",,CLR_BLUE )
> :TextOut(18, 34,
> oDataSet:FieldGetByName('C_AUTONOMA'),,CLR_BLACK )
> :oFont := oFont2
> :oFont:lBold := .T.
> :TextOut( 4, 30, "Datos Presidente",,CLR_BLACK)
> :oFont := oFont1
> :oFont:lBold := .F.
> :TextOut( 5, 38, "Nombre : ",,CLR_BLUE )
> :TextOut(18, 38,
> oDataSet:FieldGetByName('PRESIDENTE'),,CLR_BLACK )
> :TextOut( 5, 40, "D.N.I. : ",,CLR_BLUE )
> :TextOut(18, 40,
> oDataSet:FieldGetByName('DNI_PRESID'),,CLR_BLACK )
> :TextOut( 5, 42, "Teléfono : ",,CLR_BLUE )
> :TextOut(18, 42,
> oDataSet:FieldGetByName('TELF_PRESD'),,CLR_BLACK )
> :TextOut(30, 42, "Telf.Móvil : ",,CLR_BLUE )
> :TextOut(43, 42,
> oDataSet:FieldGetByName('MOVIL_PRES'),,CLR_BLACK )
> :TextOut( 5, 44, "Correo Electrón:",,CLR_BLUE )
> :TextOut(18, 44,
> oDataSet:FieldGetByName('CORREO_PRE'),,CLR_BLACK )
> :oFont := oFont2
> :oFont:lBold := .T.
> :TextOut( 4, 39, "Comisión de Concurso",,CLR_BLACK)
> :oFont := oFont1
> :oFont:lBold := .F.
> :TextOut( 5, 49, "Presidente : ",,CLR_BLUE )
> :TextOut(18, 49,
> oDataSet:FieldGetByName('COMISION'),,CLR_BLACK )
> :TextOut( 5, 51, "D.N.I. : ",,CLR_BLUE )
> :TextOut(18, 51,
> oDataSet:FieldGetByName('DNI_COMIS'),,CLR_BLACK )
> :TextOut( 5, 53, "Teléfono : ",,CLR_BLUE )
> :TextOut(18, 53,
> oDataSet:FieldGetByName('TELF_COMIS'),,CLR_BLACK )
> :TextOut(30, 53, "Telef.Móvil : ",,CLR_BLUE )
> :TextOut(43, 53,
> oDataSet:FieldGetByName('MOVIL_COMI'),,CLR_BLACK )
> :TextOut( 5, 55, "Correo Electrón:",,CLR_BLUE )
> :TextOut(18, 55,
> oDataSet:FieldGetByName('CORREO_COM'),,CLR_BLACK )
> END WITH
> *
> ** Imprimir el pie de página
> Piedepagina( nPagina )
> *
> ** Nueva página
> Printer:EndPage()
> *
> ** Inicializar contadores
> nPagina++
> *
> ** Avanza un registro
> oDataSet:Skip()
> *
> ENDDO
> *
> ** Cambiar el cursor Normal
> Application:lBusy := .F.
> *
> Printer:EndPage()
> Printer:EndDoc()
> Printer:Preview()
> *
> ** Destruir los objetos
> oFont:Destroy()
> oFont1:Destroy()
> oFont2:Destroy()
> oFont3:Destroy()
> oBmp:Destroy()
> oBmp1:Destroy()
> oPen:Destroy()
> *
> ELSE
> *
> MsgInfo("No existen registros de Federaciones para listar.", ;
> AppData:gCaption)
> *
> ENDIF
> *
> ** Cierra la base de datos
> oDataSet:Close()
> *
> ELSE
> *
> MsgInfo("La base de datos de Federaciones no se puede abrir.", ;
> AppData:gCaption)
> *
> ENDIF
> *
> RETURN
> //---------------------------------------------------------- ---------------
> PROCEDURE ListFederacion2( oSender, lTexto )
> *
> LOCAL oDataSource//, oDataSourceClub
> LOCAL oDataSet, oDataSetClub
> LOCAL oFont, oFont1, oFont2, oFont3, oPen
> LOCAL nCont, nPagina, nLinea
> *
> ** DataSource
> WITH OBJECT oDataSource := TCdxDataSource():New( oSender )
> :cConnect := ".."
> :Create()
> END WITH
> /*
> WITH OBJECT oDataSourceClub := TCdxDataSource():New( oSender )
> :cConnect := ".."
> :Create()
> END
> */
> ** DataSet
> WITH OBJECT oDataSet := TDbfDataSet():New( oSender )
> :oDataSource := oDataSource
> :cProcess := "GENERAL"
> :cName := "BasesFederac.dbf"
> :lOpen := .T.
> :lShared := .T.
> :Create()
> END WITH
> *
> WITH OBJECT oDataSetClub := TDbfDataSet():New( oSender )
> :oDataSource := oDataSource
> :cProcess := "GENERAL"
> :cName := "BasesClub.dbf"
> :lOpen := .T.
> :lShared := .T.
> :Create()
> END WITH
> *
> ** Define las fuentes y la Pluma
> oFont := TFont():New()
> oFont1:= TFont():New()
> oFont2:= TFont():New()
> oFont3:= TFont():New()
> oPen := TPen():New( PS_SOLID, 1, CLR_RED )
> *
> ** Si se puede abrir la base de Federaciones
> IF oDataSet:lOpen
> *
> ** La base tiene registros
> IF oDataSet:RecCount() > 0
> *
> ** Activar el Indice de Federaciones
> oDataSet:OrdSetFocus( "FEDERAC" )
> *
> ** Si se puede abrir la base de Club
> IF oDataSetClub:lOpen
> *
> ** Activar el Indice de Clubs
> oDataSetClub:OrdSetFocus( "CLUB2" )
> *
> ** Cambiar el Cursor
> Application:lBusy := .T.
> *
> ** Inicializar Variables
> nCont := 0
> nLinea := 9
> nPagina:= 1
> *
> ** Seleccionar la fuente
> WITH OBJECT oFont
> :cName := "Arial"
> :nSize := 18
> :lBold := .T.
> :lUnderline := .T.
> END WITH
> *
> WITH OBJECT oFont1
> :cName := "Arial"
> :nSize := 10
> :lBold := .F.
> :lUnderline := .F.
> END
> *
> WITH OBJECT oFont2
> :cName := "Arial"
> :nSize := 14
> :lBold := .F.
> :lUnderline := .T.
> END
> *
> WITH OBJECT oFont3
> :cName := "Arial"
> :nSize := 8
> :lBold := .F.
> :lUnderline := .F.
> END
> *
> ** Opciones de vista previa y configuración listados
> Printer:cJobTitle := "Listado Federaciones con Club"
> Printer:nOrientation := DMORIENT_PORTRAIT
> Printer:lPreview := .T.
> Printer:lPreviewModal := .T.
> Printer:nPreviewShowMode := smMAXIMIZE
> Printer:StartDoc()
> *
> DO WHILE !oDataSet:EoF()
> *
> ** Si el contador nCont = 0
> IF nCont == 0
> *
> ** Llama a la cabecera del listado
> Cabecera( lTexto )
> *
> * Listado de Federaciones
> WITH OBJECT Printer:oCanvas
> :oFont := oFont
> :oPen := oPen
> :nMapMode := mmSIMULCHAR //En carácteres
> :TextOut(12, 3, "Listado de Federaciones con
> Clubs",,CLR_RED)
> :nTextAlignment := taLEFT
> *
> ** Pone nCont = 1
> nCont := 1
> *
> END
> ENDIF
> *
> WITH OBJECT Printer:oCanvas
> *
> :oFont := oFont1
> :oFont:lBold := .F.
> //:oFont:lUnderline := .T.
> ** Cabecera de la Federación
> :TextOut( 3, nLinea, "NUM.FED. NOMBRE de la
> FEDERACION",, ;
> CLR_BLUE )
> //:oFont:lUnderline := .F.
> :MoveTo( 03, nLinea+1) // Mover a la posición de inicio
> de la linea
> :LineTo( 03, nLinea+1) // Punto de inicio de la linea
> :LineTo( 40, nLinea+1) // Punto final de la linea
> ** Registro de la Federación
> nLinea := nLinea + 1
> :TextOut( 5, nLinea, oDataSet:FieldGetByName('N_FED'),, ;
> CLR_BLACK )
> :TextOut(12, nLinea,
> oDataSet:FieldGetByName('NOMB_FED'),, ;
> CLR_BLACK )
> ** Si tiene clubs
> ** Cabecera del Club
> ** Clubs
> ** Si nLinea > 60
> IF nLinea >= 60
> *
> ** Poner el pie de página
> PiedePagina( nPagina )
> *
> **Nueva pagina en el listado
> Printer:EndPage()
> *
> ** Inicializar contadores
> nCont := 0
> nLinea:= 9
> nPagina++
> *
> ELSE
> *
> ** Añade una linea
> nLinea := nLinea + 2
> *
> ENDIF
> END
> *
> ** Avanza un registro
> oDataSet:Skip()
> *
> ENDDO
> *
> ** Poner el pie de pagina
> Piedepagina( nPagina )
> *
> ** Cambiar el cursor a normal
> Application:lBusy := .F.
> *
> ** Cerrar el listado
> Printer:EndPage()
> Printer:EndDoc()
> Printer:Preview()
> *
> ** Destruir los Objetos
> oFont:Destroy()
> oFont1:Destroy()
> oFont2:Destroy()
> oFont3:Destroy()
> oPen:Destroy()
> *
> ** Cierra la base de datos de Clubs
> oDataSetClub:Close()
> *
> ELSE
> *
> MsgInfo("La base de datos de Clubs no se puede abrir.", ;
> AppData:gCaption)
> *
> ENDIF
> *
> ELSE
> *
> MsgInfo("No existen registros de Federaciones para listar.", ;
> AppData:gCaption)
> *
> ENDIF
> *
> ** Cierra la base de Federaciones
> oDataSet:Close()
> *
> ELSE
> *
> MsgInfo("La base de datos de Federaciones no se puede
> abrir.",AppData:gCaption)
> *
> ENDIF
> *
> /*
> oDataSet:Close()
>
>
> oDataSetClub:Close()
> */
> *
> RETURN
> //---------------------------------------------------------- ---------------
> PROCEDURE Cabecera( lTexto )
>
> LOCAL oFont, oPen, oBmp, oJpg
> LOCAL cPath, cName, cName1, cImagen, cImagen1
> *
> ** Define las Fuentes y la Pluma
> oFont := TFont():New()
> oPen := TPen():New( PS_SOLID, 2, CLR_RED )
> *
> ** Definir las Imagenes del Listado
> cPath := "BmpFed"
> cName := "EscudoList.bmp"
> *
> cImagen := cPath + cName
> oBmp := TPicture():LoadFromFile( cImagen )
> *
> ** Imagen de texto en la hoja
> IF lTexto
> *
> cName1 := "FondoList.jpg"
> cImagen1 := cPath + cName1
> oJpg := TPicture():LoadFromFile( cImagen1 )
> *
> ENDIF
> *
> ** Definir una Fuente de letras
> WITH OBJECT oFont
> :cName := "Arial"
> :nSize := 18
> :lBold := .T.
> :lUnderline := .F.
> END
> *
> ** Inicializa el Listado
> Printer:oCanvas:nMapMode := mmHIMETRICS // En Milimetros
> Printer:StartPage()
> WITH OBJECT Printer:oCanvas
> :oFont := oFont
> :oPen := oPen
> IF lTexto
> *
> :DrawPicture( {100, 500, 2000, 2500}, oJpg )
> *
> ENDIF
> :DrawPicture( { 50, 50, 250, 250}, oBmp )
> :nTextAlignment := taCENTER
> :RoundRect( {375, 50, 1670, 132}, 20 , 100)
> :FillRect( {385, 52, 1665, 129}, RGB( 177, 220, 220 ) )
> :TextOut( 400, 55, "Federación Colombófila de la Reg.Murcia" )
> :oFont:nSize := 14
> :oFont:lItalic := .T.
> :TextOut( 770, 150, "Programa Concurso" )
> END
> *
> ** Destruir los objetos
> oFont:Destroy()
> oPen:Destroy()
> oBmp:Destroy()
> IF lTexto
> *
> oJpg:Destroy()
> *
> ENDIF
>
> RETURN
>
> //---------------------------------------------------------- --------------------
> PROCEDURE PiedePagina( npagina )
>
> LOCAL oFont
> *
> ** Define el formato de letra
> oFont := TFont():New()
> *
> WITH OBJECT Printer:oCanvas
> ** Poner el pie de página
> WITH OBJECT oFont
> :cName := "Arial"
> :nSize := 8
> :lUnderline := .F.
> :lBold := .F.
> END WITH
> :oFont := oFont
> :nMapMode := mmSIMULCHAR // En carácteres
> :MoveTo( 2, 89) // Mover a la posición de inicio de la linea
> :LineTo( 2, 89) // Punto de inicio de la linea
> :LineTo(120,89) // Punto final de la linea
> :TextOut( 5, 90, "FECHA : " + DTOC(DATE()) )
> :TextOut( 50, 90, "Página : " + Str(nPagina) )
> *
> END
> *
> ** Destruir el objeto
> oFont:Destroy()
>
>
> RETURN