彰化一整天的論壇

 找回密碼
 立即註冊
查看: 50|回復: 0

crystall 預儲及sql語法呼叫方式

[複製鏈接]
發表於 2019-9-26 18:21:00 | 顯示全部樓層 |閱讀模式
  1.     CR1.Connect = gConnString
  2.     If gUserDivi = "1" Then
  3.         CR1.ReportFileName = App.Path & gRptDir & "\cos_stdscore3Sum.rpt"
  4.     Else
  5.         CR1.ReportFileName = App.Path & gRptDir & "\cos_stdscore3NSum.rpt"
  6.     End If
  7.     CR1.StoredProcParam(0) = Trim(sYear)
  8.     CR1.StoredProcParam(1) = Trim(sSmtr)
  9.     If Trim(sCosId) = "" Then sCosId = "N"
  10.     If Trim(sClassNo) = "" Then sClassNo = "N"
  11.     If Trim(sTeachNo) = "" Then sTeachNo = "N"
  12.     CR1.StoredProcParam(2) = sCosId
  13.     CR1.StoredProcParam(3) = sClassNo
  14.     CR1.StoredProcParam(4) = "Score"
  15.     CR1.StoredProcParam(5) = sTeachNo
  16.     If opt = "B" Then
  17.     CR1.StoredProcParam(6) = "N"
  18.     Else
  19.     CR1.StoredProcParam(6) = "N"
  20.     End If
  21.     CR1.StoredProcParam(7) = gUserDivi
  22.     CR1.Formulas(0) = "CosYear=" & sqt(sYear)
  23.     CR1.Formulas(1) = "CosSmtr=" & sqt(sSmtr)
  24.     CR1.Action = 1
複製代碼
預儲程序
  1.         CR1.Connect = gConnString
  2.         CR1.ReportFileName = App.Path & gRptDir & "\cos_roomtab7.rpt"
  3.         CR1.Formulas(0) = "cos_year=" & sqt(Trim(sYear))
  4.         CR1.Formulas(1) = "cos_smtr=" & sqt(Trim(sSmtr))
  5.         CR1.Formulas(2) = "room_no=" & sqt(Trim(sRoomNo))
  6.         CR1.Formulas(3) = "room_cname=" & sqt(Trim(sRoomName))
  7.         CR1.SQLQuery = sqlcmd
  8.         CR1.DiscardSavedData = True
  9.         CR1.SortFields(0) = "+{s.sec_no}"
  10.         CR1.SortFields(1) = "+{w.w_day}"
複製代碼
sqlsql語法

回復

使用道具 舉報

您需要登錄後才可以回帖 登錄 | 立即註冊

本版積分規則

 ㄚ母滴雞湯
 員林香純滴雞精

Archiver|手機版|小黑屋|彰化一整天的論壇(Excel,Office)  |网站地图

GMT+8, 2019-10-18 16:30 , Processed in 0.121609 second(s), 21 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回復 返回頂部 返回列表