Como pongo una fuente en treport cuando...

Como pongo una fuente en treport cuando...

Postby goosfancito » Mon Oct 27, 2014 6:33 pm

Hola.

Necesito que esto tenga otra fuente. como lo hago?
graciias.

Code: Select all  Expand view
oR: say(3,"Total final:")
FWH 21.02
Harbour 3.2.0dev (r2104281802)
Copyright (c) 1999-2021, https://harbour.github.io/
User avatar
goosfancito
 
Posts: 1954
Joined: Fri Oct 07, 2005 7:08 pm

Re: Como pongo una fuente en treport cuando...

Postby jrestojeda » Mon Oct 27, 2014 7:23 pm

Hola...
Como primera medida, define los Fonts que necesites.

Code: Select all  Expand view
DEFINE FONT oFont0 NAME "ARIAL" SIZE 0,-9
DEFINE FONT oFont1 NAME "ARIAL" SIZE 0,-10
DEFINE FONT oFont2 NAME "ARIAL" SIZE 0,-10 BOLD
DEFINE FONT oFont3 NAME "ARIAL" SIZE 0,-14 BOLD


Definición:
Code: Select all  Expand view
REPORT oReport TITLE Titulo CENTER;
          HEADER "aca va la info del header" LEFT;
          FOOTER "Info del footer";
          FONT oFont0,oFont1,oFont2,oFont3;
          PREVIEW;
          CAPTION "Vista previa del listado"


Luego en los Say debes hacer asi:

Code: Select all  Expand view
oReport:Say(1,"TU INFO",nFont,nAlineacion)

nFont es el número de orden en el que están definidos en el objeto Report.

Espero te sirva la ayuda.
Saludos,
Ojeda Esteban Eduardo.
Buenos Aires - Argentina.
FWH - PellesC - DBF/CDX - ADS - Gloriosos .Bat - MySql - C# .net - FastReport
Skype: jreduojeda
User avatar
jrestojeda
 
Posts: 601
Joined: Wed Jul 04, 2007 3:51 pm
Location: Buenos Aires - Argentina

Re: Como pongo una fuente en treport cuando...

Postby karinha » Mon Oct 27, 2014 7:26 pm

Code: Select all  Expand view

// Sample showing how to manage the printer object

#include "FiveWin.ch"

static oWnd

//----------------------------------------------------------------------------//

function Main()

   local oPrn, oFont, oFntFinal
   local nRowStep, nColStep
   local nRow := 0, nCol := 0, n, m

   PRINT oPrn NAME "Testing the printer object from FiveWin" PREVIEW

      if Empty( oPrn:hDC )
         return nil          // Printer was not installed or ready
      endif

      DEFINE FONT oFont     NAME "Ms Sans Serif" SIZE 0, -14      OF oPrn
      DEFINE FONT oFntFinal NAME "Ms Sans Serif" SIZE 0, -26 BOLD OF oPrn

      nRowStep = oPrn:nVertRes() / 20   // We want 20 rows
      nColStep = oPrn:nHorzRes() / 15   // We want 15 cols

      PAGE

         for n = 1 to 20  // rows

             nCol = 0

             oPrn:Say( nRow, nCol, Str( n, 2 ), oFont )

             nCol += nColStep

             nRow += nRowStep

         next

         nRow -= nRowStep

         //oR: say(3,"Total final:")
         oPrn:Say( nRow, nCol, "Total final:", oFntFinal )

      ENDPAGE

   ENDPRINT

   oFont:End()      // Destroy the font object
   oFntFinal:End()

return nil
 


João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7643
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Como pongo una fuente en treport cuando...

Postby goosfancito » Mon Oct 27, 2014 8:19 pm

graciias a ambos
FWH 21.02
Harbour 3.2.0dev (r2104281802)
Copyright (c) 1999-2021, https://harbour.github.io/
User avatar
goosfancito
 
Posts: 1954
Joined: Fri Oct 07, 2005 7:08 pm


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 17 guests