How to Print text in footer ???

How to Print text in footer ???

Postby dagiayunus » Tue May 22, 2018 2:07 pm

Dear Sir

How Can I set footer using the TPRINTER ?



Code: Select all  Expand view

#include "fivewin.ch"
function main()
local oPrn, nRow, nTop, nBottom, oFont, oBold, oLarge, aRow, oPen
PRINT oPrn NAME "Test Print " PREVIEW
 
  DEFINE FONT oFont  NAME "TAHOMA"  SIZE 0,-12 OF oPrn
  DEFINE FONT oBold  NAME "TAHOMA"  SIZE 0,-12 BOLD OF oPrn
  DEFINE FONT oLarge NAME "VERDANA" SIZE 0,-15 BOLD OF oPrn
  oPrn:SetPage(9)  // A4
  oPrn:SetPortrait() //Vertical
 PAGE
   nRow     := 1.0
   @ nRow, 2.5 PRINT TO oPrn TEXT "Bon De Transfert" SIZE 16 CM FONT oLarge ALIGN "T" LASTROW nRow
   nRow   += 0.2
   aRow  := Array( 2 )
   @ nRow, 2 PRINT TO oPrn TEXT { "No  :"+str(123),Date() } ;
      SIZE 16 CM FONT oBold ALIGN 'TR' LASTROW aRow[ 1 ]
     
    @ nRow, 2 PRINT TO oPrn TEXT { "Client : "+"Test" } ;
      SIZE 16 CM FONT oBold ALIGN "TL" LASTROW aRow[ 2 ]
    nRow  := Max( aRow[ 1 ], aRow[ 2 ] )     
    nRow  += 0.5
   oPrn:cmLine( nRow, 2, nRow, 20 )
   nRow  += 0.2
   aRow  := Array( Len( aItems[ 1 ] ) )
   
   @ nRow, 2 PRINT TO oPrn TEXT "Qty"      SIZE 2 CM FONT oBold ALIGN "TL" LASTROW aRow[ 1 ]
   @ nRow, 3 PRINT TO oPrn TEXT "Packing" SIZE 4 CM FONT oBold ALIGN "T" LASTROW aRow[ 2 ]
   @ nRow,6 PRINT TO oPrn TEXT "Article"       SIZE 4 CM FONT oBold ALIGN "T" LASTROW aRow[ 3 ]
   @ nRow,14.5 PRINT TO oPrn TEXT "Code"        SIZE 4 CM FONT oBold ALIGN "T" LASTROW aRow[ 4 ]
   @ nRow,16   PRINT TO oPrn TEXT "WareHouse"     SIZE 4 CM FONT oBold ALIGN "TR" LASTROW aRow[5]
   
   nRow  := FW_Greatest( aRow ) + 0.2
   oPrn:cmLine( nRow, 2, nRow, 20 )
   nRow  += 0.2
      for i=1 to 20
      @ nRow, 2 PRINT TO oPrn TEXT strzero(i,5)  SIZE 2 CM FONT oFont ALIGN "T" LASTROW aRow[ 1 ]
        @ nRow, 4.5 PRINT TO oPrn TEXT strzero(i,5)   SIZE 4 CM FONT oFont ALIGN "TL" LASTROW aRow[ 2 ]
      @ nRow, 6.6 PRINT TO oPrn TEXT strzero(i,30)   SIZE 7 CM FONT oFont ALIGN "T" LASTROW aRow[ 3 ]
      @ nRow, 14.5 PRINT TO oPrn TEXT strzero(i,10)   SIZE 4 CM FONT oFont ALIGN "T" LASTROW aRow[ 4 ]
      @ nRow, 15 PRINT TO oPrn TEXT strzero(i,5)   SIZE 4 CM FONT oFont ALIGN "TR" LASTROW aRow[ 5 ]
      nRow  := FW_Greatest( aRow ) + 0.2
      next i

   oPrn:cmLine( nRow, 2, nRow, 20 )

 ENDPAGE
ENDPRINT

   RELEASE FONT oFont, oBold

 


Thanks & Regards
Yunus
Regards
Yunus

FWH 21.02
dagiayunus
 
Posts: 85
Joined: Wed Nov 19, 2014 1:04 pm

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 75 guests