A ver si lo voy pillando.
Esto es lo que creo que deberia hacer para que funcionara.
Pues selecciona bien, me cambia el tipo de letra, pero al final imprime por
la que tengo predeterminada en WINDOWS.
METHOD ACTIVAIMP( oSender ) CLASS TForm8
LOCAL oFrm, oReport, oFont1, oFont2, n := 1
With Object oFont1 := TFont():New()
:cName := "Arial"
:nSize := 14
:lBold := .T.
END WITH
With Object oFont2 := TFont():New()
:cName := "Arial"
:nSize := 8
:lBold := .f.
END WITH
REPORT oReport TITLE "PRUEBA"FONT 1;
HEADER "Correspondiente a HOY"+" Impreso por el usuario:
"+ APPDATA:NombrOp;
FOOTER "Página: " + lTrim( Str( oReport:nPage ) ) ALIGN
taCENTER ;
FONT 2;
FONT oFont1, oFont2
*************
do while n < len(printer:aPrinterNames)+1
if Printer:aPrinter[n]= "LAQUEQUIERO"
Printer:nPrinterIndex := n
n := 8
else
n:= n+1
endif
enddo
**************
COLUMN OF oReport ;
TITLE "RESID." ;
DATA SUBSTR(::oDbfDataSet1:Residencia,1,5);
FONT 2
COLUMN OF oReport ;
TITLE "Nº VALE" ;
DATA VAL(::oDbfDataSet1:Numero);
FONT 2
RUN REPORT oReport
RETURN Nil
"Paco V" <
ssi@ono.com> wrote:
>
>Jose:
>
>Esto deberia funcionar?
>
>Solo me cambia el tipo de letra.
>
>
>LOCAL oFrm, oReport, oFont1, oFont2, n, AUX1, AUX2
> n:=1
> With Object oFont1 := TFont():New()
> :cName := "Arial"
> :nSize := 14
> :lBold := .T.
> END WITH
>
> With Object oFont2 := TFont():New()
> :cName := "Arial"
> :nSize := 8
> :lBold := .f.
> END WITH
>
> REPORT oReport TITLE "RED", " ****PRUEBA*** "+;
>
> FONT 1; ////PREVIEW
> HEADER DtoC( Date() ) + " " + Time(), "del dia :"+;
> dtoc(date()-1)+" usuario: "+ APPDATA:NombrOp;
> FOOTER "Página: " + lTrim( Str(oReport:nPage ) ) FONT 2;
> FONT oFont1, oFont2
> Printer:nPrinterIndex := 2
> msginfo(Printer:aPrinterNames)
>
> set printer to printer:nprinterindex
> AUX1 := DTOC(DATE()-1)
> AUX2 := "20"+SUBSTR(AUX1,7,2)+SUBSTR(AUX1,3,4)+SUBSTR(AUX1,1,2)
> SET FILTER TO ::OdBFdATASET1:TIPO # "GRAFIADO" .AND. ::oDbfDataset1:fecha
>= aux2
> ::oDBFDataSet1:Gotop()
>
> COLUMN OF oReport ;
> TITLE "RESID." ;
> DATA SUBSTR(::oDbfDataSet1:Residencia,1,5);
> FONT 2
>
>RUN REPORT oReport
>
>
>"Jose F. Gimenez" <
jfgimenez@wanadoo.es> wrote:
>>Paco,
>>
>>Printer:aPrinterNames contiene la lista de las impresoras instaladas, y
>con
>>Printer:nPrinterIndex seleccionas la que quieras usar de ellas. P.ej.:
si
>
>>pones Printer:nPrinterIndex := 3, significa que se va a utilizar la tercera
>
>>impresora de esa lista.
>>
>>--
>>Un saludo,
>>
>>José F. Giménez
>>
>>
>