PrintTable

PrintTable

Postby Silvio.Falconi » Fri Jan 12, 2024 9:44 am

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  RUN
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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7070
Joined: Thu Oct 18, 2012 7:17 pm

Re: PrintTable

Postby nageswaragunupudi » Fri Jan 12, 2024 11:30 am

Provide adequate width and height to cover the entire table.

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

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10646
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: PrintTable

Postby Silvio.Falconi » 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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7070
Joined: Thu Oct 18, 2012 7:17 pm

Re: PrintTable

Postby Silvio.Falconi » Fri Jan 12, 2024 2: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

Image

only ten minutes of work :)
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7070
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 57 guests