Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - columndef report column declaration block http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 columndef           Report column declaration block
------------------------------------------------------------------------------
 Syntax
   columndef
      heading               := <cHeading>
      width                 := <uWidth>
      decimals              := <uDecimals>
      expression <datatype> := <expression>
      total                 := <lTotal>
   enddef

 Arguments
   <cHeading> is a character expression for the column heading.

   <uWidth> is a uint constant specifying the number of column positions
   for the column.

   <uDecimals> is a uint constant to specify the number of decimal places
   in numerics.

   <datatype> is the data type of the column expression.

   <expression> is an expression that determines the contents of the
   column.

   <lTotal> is a logical expression to specify if the report must total
   the column.

 Description
   The columndef keyword initiates a report column declaration block.
   The block determines the layout of a certain column in a report, displayed
   via the report form command.

 Example
   #define EXAMPLE_KEYWORD
   #include example.hdr

   dbfdef sTest static
      char(10) firstname
      char(15) lastname
      uint(3)  age
      logical  sex
      dbl(9:2) balance
      date     due
      memo     notes
   enddef
   
   reportdef sRepAcc
      heading               := "My corporation"
      width                 := 80
      page_length           := 55
      left_margin           := 2
      double_space          := .t.
      plain                 := .t.
      summary               := .f.
   
      groupdef
         heading            := "Name "
         expression char    := sTest->firstname
         eject              := .f.
      enddef
   
      subgroupdef
         heading            := "Sex"
         expression logical := sTest->sex
         eject              := .t.
      enddef
   
      columndef
         heading            := "RecNo"
         width              := 5
         decimals           := 0
         expression long    := recno()
         total              := .f.
      enddef
   
      columndef
         heading            := "Balance"
         width              := 9
         decimals           := 2
         expression long    := sTest->balance
         total              := .t.
      enddef
   enddef
   
   proc Test_columndef
   endproc

   proc main
   Test_columndef()
   endproc

See Also: reportdef

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson