FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour PrintTable
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
PrintTable
Posted: Fri Jan 12, 2024 09:44 AM
I try to print a n array with Printtable and I had this



the array I used have 3 row and 9 columns

Why the box is printed in that type ?

then How I can make to have the grid ?

mytest
Code (fw): Select all Collapse
Function Stampa_Tabella(aschema)
   local oPrn, oFont, oBold
   local nPgWidth, nPgHeight
   local aCrops, cText

    PRINT oPrn PREVIEW

   DEFINE FONT oFont NAME "Courier New" SIZE 0,-11 BOLD OF oPrn
   DEFINE FONT oBold NAME "VERDANA" SIZE 0,-30 BOLD OF oPrn

   PAGE

   oPrn:PrintTable( 4, 2, aschema, 4, 4, oFont, .t., "Scheme n°", "CM" )


   ENDPAGE

   ENDPRINT

   RELEASE FON oFont, oBold

return nil
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: PrintTable
Posted: Fri Jan 12, 2024 11:30 AM
Provide adequate width and height to cover the entire table.

Sample:
Code (fw): Select all Collapse
function PrintTable()

   local oPrn, oFont, oBold
   local aTable := { ;
      { "JAN", "FEB", "MAR", "APR", "MAY", "JUN", "JUL", "AUG", "SEP" }, ;
      {   11,    12,    13,    14,    15,    16,    17,    18,    19  }, ;
      {   21,    22,    23,    24,    25,    26,    27,    28,    29  }, ;
      {   31,    32,    33,    34,    35,    36,    37,    38,    39  }  }

    PRINT oPrn PREVIEW

    DEFINE FONT oFont NAME "Courier New" SIZE 0,-11 BOLD OF oPrn
    DEFINE FONT oBold NAME "VERDANA" SIZE 0,-30 BOLD OF oPrn

    PAGE

    @ 1,1 PRINT TO oPrn TABLE aTable SIZE 4.3,1.2 INCHES FONT oFont

    ENDPAGE

    ENDPRINT

    RELEASE FON oFont, oBold

return nil
Regards



G. N. Rao.

Hyderabad, India
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: PrintTable
Posted: Fri Jan 12, 2024 11:36 AM

I Wish the grid and the border box

I Need 3rows and ten column

Above the title

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: PrintTable
Posted: Fri Jan 12, 2024 02:34 PM
I resolved with My SuperReport
an old project created with wBrowse way back in 2001 and regenerated last year and tested by some fwhusers



only ten minutes of work :)
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com

Continue the discussion