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

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

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

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

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

 Description
   The subgroupdef keyword initiates a report subgroup declaration block.
   The block determines the layout of an optional subgroup 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_subgroupdef
   endproc

   proc main
   Test_subgroupdef()
   endproc

See Also: groupdef reportdef

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