FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour Como pongo una fuente en treport cuando...
Posts: 1956
Joined: Fri Oct 07, 2005 07:08 PM

Como pongo una fuente en treport cuando...

Posted: Mon Oct 27, 2014 06:33 PM
Hola.

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

Code (fw): Select all Collapse
oR: say(3,"Total final:")
FWH 21.02
Harbour 3.2.0dev (r2104281802)
Copyright (c) 1999-2021, https://harbour.github.io/
Posts: 601
Joined: Wed Jul 04, 2007 03:51 PM

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

Posted: Mon Oct 27, 2014 07:23 PM
Hola...
Como primera medida, define los Fonts que necesites.

Code (fw): Select all Collapse
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 (fw): Select all Collapse
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 (fw): Select all Collapse
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
Posts: 8523
Joined: Tue Dec 20, 2005 07:36 PM

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

Posted: Mon Oct 27, 2014 07:26 PM
Code (fw): Select all Collapse
// 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
Posts: 1956
Joined: Fri Oct 07, 2005 07:08 PM

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

Posted: Mon Oct 27, 2014 08:19 PM

graciias a ambos

FWH 21.02
Harbour 3.2.0dev (r2104281802)
Copyright (c) 1999-2021, https://harbour.github.io/

Continue the discussion