:


DATABASE zawod
MAIN
DEFINE zapisx record like kadry.*
DEFINE  simw char (200), zapr char (300),fn  char (18)

OPEN form maxprim from "maxprim"
DISPLAY form maxprim            #   

CONSTRUCT BY NAME simw ON kadry.* #   
                                  #  
LET zapr="select * from kadry  where ",
simw clipped," order by tabnom "

MESSAGE simw
PREPARE selpr FROM zapr           #  
DECLARE qquer CURSOR FOR selpr    #    

DISPLAY "   CTRL-O" AT 2,40
PROMPT ",   ?  CR,   : "
                         FOR fn

IF length(fn)=0 then START REPORT kadryrep       #  
else                 START REPORT kadryrep TO fn #  
END IF

   #        
   FOREACH qquer  into zapisx.*   #    
   OUTPUT TO REPORT kadryrep(zapisx.*)  #   
   END FOREACH
FINISH REPORT kadryrep          #   
END MAIN

REPORT kadryrep(z)
DEFINE nameceh like ceh.nameceh
DEFINE z record like kadry.*
   # nomerceh  int,          #  
   # tabnom    serial,       # . 
   # fio       char(20),     # 
   # dolvn     char(20),     # 
   # zarplata  money(16,2),  # 
   # datarovd  date          #  .
        OUTPUT
left  margin 0
right margin 80
top   margin 0
bottom margin 0
page  length 23
       ORDER BY z.nomerceh, z.tabnom   # 

                    FORMAT
PAGE HEADER
print "-------------------------------------------------------"
print "|.|       |   ||  "
print "_______________________________________________________"

ON EVERY ROW
 print  z.nomerceh using "##", column 4,z.tabnom using "#####",
 column 13,z.fio clipped,
 column 28,z.dolvn clipped,
 column 43,z.zarplata using "$####.##",
 column 53,z.datarovd using "dd-mm-yyyy"

BEFORE GROUP OF z.nomerceh
select @nameceh into nameceh from ceh where nomerceh=z.nomerceh
 skip to top of page
 skip 1 line
 print "   ",nameceh
 skip 1 line

AFTER GROUP OF  z.nomerceh
 need 2 lines
 print "   ",nameceh clipped,2 spaces,
       group count(*) using "#####" ," , "
 print "   ",
       group avg(z.zarplata) using "##### .## "

PAGE TRAILER
 print "  ", pageno
 pause " "

END REPORT


        :
+-------------------------------------------------------------+
| ,   ,  CR,   :    |
|                                    CONTROL-|
|                                                             |
|----------------------------------------------               |
|        [1:4] [                     ]                     |
| . [           ]                                     |
|    [*                 ]                            |
|  [                    ]                            |
|   [>500         ]                                   |
|  [          ]                                   |
|                                                             |
|                                                             |
nomerceh between 1 and 4 and fio matches "**" and zarplata>500
|                                                             |
+-------------------------------------------------------------+

---------------------------------------------------------------
|.|            |     ||  
_______________________________________________________________

   

 1    34                    $ 4000.00
 1    35            .  $ 4000.00
         2 ,
     4000 .00 


            1
 
---------------------------------------------------------------
|.|            |     ||  
_______________________________________________________________

   

 2    12                     $ 2000.00
 2    14                     $ 2000.00
 2    18                       $ 2000.00
 2    21                      $ 2000.00
 2    24                   $ 2000.00
         5 ,
     2000 .00 

            2
 
---------------------------------------------------------------
|.|            |     ||  
_______________________________________________________________

   

 4     9                    $ 1230.00
 4    12                     $ 2000.00
         2 ,
     1615 .00 


            3
 

Last-modified: Wed, 17 Apr 1996 04:45:13 GMT
: