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 - groupdef report group declaration block http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 groupdef            Report group declaration block
------------------------------------------------------------------------------
 Syntax
   groupdef
      heading               := <cHeading>
      expression <datatype> := <expression>
      eject                 := <lEject>
   enddef

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

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

   <expression> is an expression that determines the contents of the group
   heading.

   <lEject> is a logical expression to specify if the page must be
   ejected after the group.

 Description
   The groupdef keyword initiates a report group declaration block.
   The block determines the layout of an optional group heading within a
   report, to be 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_groupdef
   endproc

   proc main
   Test_groupdef()
   endproc

See Also: reportdef

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