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 - reportdef report declaration block http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 reportdef           Report declaration block
------------------------------------------------------------------------------
 Syntax
   reportdef <symbol> [<scope>]
      heading      := <cHeading>
      width        := <uWidth>
      page_length  := <uPageLength>
      left_margin  := <uMargin>
      double_space := <lDoubleSpace>
      plain        := <lPlain>
      summary      := <lSummary>
      [<group>
      [<subgroup>]]
      <column>
   enddef

 Arguments
   <symbol> is the symbol name of the report structure.

   <scope> is the scope of the report structure.

   <cHeading> is a character expression for the report heading to place on
   each page of the report.

   <uWidth> is a uint constant to specify the report number of columns
   for the report.

   <uPageLength> is a uint constant for the number of lines for the report.

   <uMargin> is a uint constant to specify the number of spaces prepended
   to the report before calculating and printing the results of each column.

   <lDoubleSpace> is a logical constant to specify if the report is
   printed in double spacing.

   <lPlain> is a logical constant that suppresses the printing of page
   numbers and the date at the top of each report page. When set to .t.,
   the page heading appears only once at the beginning of the report.

   <lSummary> is a logical constant that suppresses detail line printing.
   When set to .t., the report will only print totals and subtotals.

   <group> is one or more groupdef block.

   <subgroup> is one or more subgroupdef block.

   <column> is one or more columndef block.

 Description
   The reportdef keyword initiates a report declaration block. The block
   determines the layout for a report to be output through the report form
   command. The reportdef block functionally replaces the xBase form (.frm)
   files.

 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_reportdef
   endproc

   proc main
   Test_reportdef()
   endproc

See Also: report form

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