Page 1 of 1

PrintTable

PostPosted: Fri Jan 12, 2024 9:44 am
by Silvio.Falconi
I try to print a n array with Printtable and I had this

Image

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: Select all  Expand view
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

Re: PrintTable

PostPosted: Fri Jan 12, 2024 11:30 am
by nageswaragunupudi
Provide adequate width and height to cover the entire table.

Sample:
Code: Select all  Expand view
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


Image

Re: PrintTable

PostPosted: Fri Jan 12, 2024 11:36 am
by Silvio.Falconi
I Wish the grid and the border box
I Need 3rows and ten column
Above the title

Re: PrintTable

PostPosted: Fri Jan 12, 2024 2:34 pm
by Silvio.Falconi
I resolved with My SuperReport
an old project created with wBrowse way back in 2001 and regenerated last year and tested by some fwhusers

Image

only ten minutes of work :)