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

📄 createit2.bas

📁 电气控制仿真软件
💻 BAS
字号:
Selection.Clear()
StaticGroup = AddGroup()
LineGroup = AddGroup()
交易明细表.SQL = "Select * From Orders"
交易明细表.Open()
i=0
while i < UnitCount
  d = Units[i]
  b = false
  if d.ClassName = 'Text' then
    s = d.Text
    ln = Len( s )
    if ln >= 2 then
      if Chr( s[0] ) = '&' then
        Selection.Add( d )
        b = true
      end if
    end if
  end if
  if not b then
    StaticGroup.Add( d )
  end if
  i = i + 1
wend
tp = Selection.Top
bt = tp + Selection.Height
i = 0
while i < StaticGroup.UnitCount
  d = StaticGroup.Units[i]
  if d.top >= tp and d.top + d.height <= bt then
    LineGroup.Add( d )
    StaticGroup.Remove( d )
  else
    i = i + 1
  end if
wend
while not 交易明细表.Eof()
  ThisSheet = AddSheet()
  ThisSheet.CopyGroup( StaticGroup )
  h = 0
  while not 交易明细表.Eof()
    ThisSheet.CopyGroup( LineGroup )
    ThisSheet.Selection.MoveTo( ThisSheet.Selection.Left, ThisSheet.Selection.Top + h )
    ThisSheet.CopyGroup( Selection )
    ThisSheet.Selection.MoveTo( ThisSheet.Selection.Left, ThisSheet.Selection.Top + h )
    i=0
    while i < Selection.UnitCount
      d = Selection.Units[i]
      s = d.Text
      ln = Len( s )
      if ln > 2 then
        s = substr( s, 2, ln )
        ThisSheet.Selection.Units[i].Text = 交易明细表.GetFieldValue( s )
      else
        ThisSheet.Selection.Units[i].Text = ""
      end if
      i = i + 1
    wend
    h = h + ThisSheet.Selection.Height
    交易明细表.Next()
    if ThisSheet.Selection.Top + 2 * ThisSheet.Selection.Height > Page.Top + Page.Height - Page.Margin.Bottom / Page.PaperHeight * Page.Height then
      break
    end if
  wend
wend
StaticGroup.Clear()
DeleteGroup( StaticGroup )
LineGroup.Clear()
DeleteGroup( LineGroup )
ActiveSheetIndex = 1

⌨️ 快捷键说明

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