⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 径赛报表生成.prg

📁 田径运动会管理系统RAR 用VFP编写
💻 PRG
字号:
*!*	set path to c:\zbydhxt
use 分组后存放表.dbf in 0 alias fz
use 径赛分组表.dbf in 0 alias fzd
use 统计表.dbf in 0 alias tj
sele fzd
zap
sele tj
go 1
do while .not.eof()
   xmdm=项目代码
   xmmc=项目名称
   fd=是否分道
   xb=性别
   zb=分组名称
   zs=分组数
   zs1=组数1
   zs2=组数2
   rs1=人数1
   rs2=人数2
   skip
   if fd=.T.
   jqfz=0
   if zs1#0
  
   for z1=1 to zs1
       jqfz=jqfz+1       &&&&太关健了!!!!!!
       sele fz
       set filter to 项目代码=xmdm.and.性别=xb.and.分组名称=zb.and.机器分组号=jqfz
       go top
       sele fzd
       append blank
       for r1=1 to rs1
           sele fz
           ddd=道次号
           hmm=号码
           fzh=机器分组号
           xm=姓名
           dwmc=单位简称
           skip
           sele fzd
            repl 项目代码 with xmdm,项目名称 with xmmc,性别 with xb,分组名称 with zb,分组号 with fzh 

          if xmdm="JL1".or.xmdm="JL2"
             do case
              case ddd="1"
                   repl dwmc1 with dwmc
              case ddd="2"
                   repl dwmc2 with dwmc
              case ddd="3"
                   repl dwmc3 with dwmc
              case ddd="4"
                   repl dwmc4 with dwmc
              case ddd="5"
                   repl dwmc5 with dwmc
              case ddd="6"
                   repl dwmc6 with dwmc
              case ddd="7"
                   repl dwmc7 with dwmc
              case ddd="8"
                   repl dwmc8 with dwmc
              case ddd="9"
                   repl dwmc9 with dwmc
             endcase
             
          else
           do case
              case ddd="1"
                   repl 一 with hmm,dwmc1 with dwmc
              case ddd="2"
                   repl 二 with hmm,dwmc2 with dwmc
              case ddd="3"
                   repl 三 with hmm,dwmc3 with dwmc
              case ddd="4"
                   repl 四 with hmm,dwmc4 with dwmc
              case ddd="5"
                   repl 五 with hmm,dwmc5 with dwmc
              case ddd="6"
                   repl 六 with hmm,dwmc6 with dwmc
              case ddd="7"
                   repl 七 with hmm,dwmc7 with dwmc
              case ddd="8"
                   repl 八 with hmm,dwmc8 with dwmc
              case ddd="9"
                   repl 九 with hmm,dwmc9 with dwmc
             endcase
          endif
          endfor
          sele fz
          set filter to
      endfor
     endif
      
            
  if zs2#0
   for z1=1 to zs2
       jqfz=jqfz+1
       sele fz
       set filter to 项目代码=xmdm.and.性别=xb.and.分组名称=zb.and.机器分组号=jqfz
       go top
       sele fzd
       append blank
       for r1=1 to rs2
           sele fz
           ddd=道次号
           hmm=号码
           fzh=机器分组号
           dwdm=单位代码
           skip
           sele fzd
           repl 项目代码 with xmdm,项目名称 with xmmc,性别 with xb,分组名称 with zb,分组号 with fzh 
           
           if xmdm="JL1".or.xmdm="JL2"
             
             do case
              case ddd="1"
                   repl dwmc1 with dwmc
              case ddd="2"
                   repl dwmc2 with dwmc
              case ddd="3"
                   repl dwmc3 with dwmc
              case ddd="4"
                   repl dwmc4 with dwmc
              case ddd="5"
                   repl dwmc5 with dwmc
              case ddd="6"
                   repl dwmc6 with dwmc
              case ddd="7"
                   repl dwmc7 with dwmc
              case ddd="8"
                   repl dwmc8 with dwmc
              case ddd="9"
                   repl dwmc9 with dwmc
             endcase
             
          else
    
       
           do case
              case ddd="1"
                   repl 一 with hmm,dwmc1 with dwmc
              case ddd="2"
                   repl 二 with hmm,dwmc2 with dwmc
              case ddd="3"
                   repl 三 with hmm,dwmc3 with dwmc
              case ddd="4"
                   repl 四 with hmm,dwmc4 with dwmc
              case ddd="5"
                   repl 五 with hmm,dwmc5 with dwmc
              case ddd="6"
                   repl 六 with hmm,dwmc6 with dwmc
              case ddd="7"
                   repl 七 with hmm,dwmc7 with dwmc
              case ddd="8"
                   repl 八 with hmm,dwmc8 with dwmc
              case ddd="9"
                   repl 九 with hmm,dwmc9 with dwmc
             endcase
         endif
          endfor
          sele fz
          set filter to
      endfor
      endif
      
      
      endif
      sele tj
enddo

****在分组打印中生成总人数和总组数
sele tj
go 1
do while .not.eof()
    
   xmdm=项目代码
   xb=性别
   zb=分组名称
   zs=分组数
   zrs=总人数
   fd=是否分道
   dws=单位数
   skip
 
 
 if fd=.T.
    if left(xmdm,2)<>'JL'&&&xmdm="JL1".or.xmdm="JL2"
       zrs=dws
    endif
   sele fzd
   repl all 总组数 with zs,总人数 with zrs for 项目代码=xmdm.and.性别=xb.and.分组名称=zb 
endif
sele tj

enddo


***生成赛别
sele fzd
repl all 赛别 with "决赛" for 总组数=1
repl all 赛别 with "预赛" for 总组数>1


****日程的导入

use 日程.dbf in 0 alias rc
sele fzd
go 1
do while .not.eof()
   xmdm=项目代码
   xb=性别
   zb=分组名称
   sele rc
   locate for 项目代码=xmdm.and.性别=xb.and.分组名称=zb
     if found()
        sx=顺序
        lb=类别
        rq=日期
        zx=总序
        sele fzd
        repl 顺序 with sx,类别 with lb,日期 with rq,总序 with zx
      else
         messagebox("你的日程编排有问题,可能是漏项!!")
      endif
      sele fzd
      skip
enddo


sele fzd
go top
do while .not.eof()
    if !empty(一)
       hm1=一
       sele fz
       locate for 号码=hm1
       if found()
       xxmm=姓名
       dwmc=单位简称
       sele fzd
       repl xm1 with xxmm,dwmc1 with dwmc
       endif
     endif
     if !empty(二)
       hm1=二
       sele fz
       locate for 号码=hm1
       if found()
       xxmm=姓名
       dwmc=单位简称
       sele fzd
       repl xm2 with xxmm,dwmc2 with dwmc
     endif
     endif
     if !empty(三)
       hm1=三
       sele fz
       locate for 号码=hm1
       if found()
       xxmm=姓名
       dwmc=单位简称
       sele fzd
       repl xm3 with xxmm,dwmc3 with dwmc
     endif
     endif
     if !empty(四)
       hm1=四
       sele fz
       locate for 号码=hm1
       if found()
       xxmm=姓名
       dwmc=单位简称
       sele fzd
       repl xm4 with xxmm,dwmc4 with dwmc
     endif
     endif
     if !empty(五)
       hm1=五
       sele fz
       locate for 号码=hm1
       if found()
       xxmm=姓名
       dwmc=单位简称
       sele fzd
       repl xm5 with xxmm,dwmc5 with dwmc
     endif
     endif
     if !empty(六)
       hm1=六
       sele fz
       locate for 号码=hm1
       if found()
       xxmm=姓名
       dwmc=单位简称
       sele fzd
       repl xm6 with xxmm,dwmc6 with dwmc
     endif
    endif
     if !empty(七)
       hm1=七
       sele fz
       locate for 号码=hm1
       if found()
       xxmm=姓名
       dwmc=单位简称
       sele fzd
       repl xm7 with xxmm,dwmc7 with dwmc
     endif
    endif
     if !empty(八)
       hm1=八
       sele fz
       locate for 号码=hm1
       if found()
       xxmm=姓名
       dwmc=单位简称
       sele fzd
       repl xm8 with xxmm,dwmc8 with dwmc
     endif
     endif
     if !empty(九)
       hm1=九
       sele fz
       locate for 号码=hm1
       if found()
       xxmm=姓名
       dwmc=单位简称
       sele fzd
       repl xm9 with xxmm,dwmc9 with dwmc
     endif
    endif
     skip
 enddo
clear all

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -