📄 modulecountryreport.bas
字号:
End If
iStartRowOne = 8
iStartRowSec = 20 '字段在模板中的起始行位置
While oRs4Report.EOF = False
g_oSheet4Export.Range("d" & CStr(iStartRowOne)) = CheckVariant(oRs4Report.Fields(1).Value)
g_oSheet4Export.Range("o" & CStr(iStartRowSec)) = CheckVariant(oRs4Report.Fields(2).Value)
g_oSheet4Export.Range("p" & CStr(iStartRowSec)) = CheckVariant(oRs4Report.Fields(3).Value)
g_oSheet4Export.Range("r" & CStr(iStartRowSec)) = CheckVariant(oRs4Report.Fields(4).Value)
oRs4Report.MoveNext
iStartRowOne = iStartRowOne + 1
iStartRowSec = iStartRowSec + 1
Wend
g_oSheet4Export.Range("c" & CStr(3)) = CheckVariant(g_str4ReportOrgan)
g_oSheet4Export.Range("j" & CStr(3)) = CheckVariant(g_str4ReportTime)
Set Command4Report = Nothing
Set oRs4Report = Nothing
Getsp_DifferentAreaStat = True
Err:
Exit Function
End Function
'集团公司企、事业单位干部基本情况表
Public Function Getsp_bCadreBasic() As Boolean
Dim Command4Report As New ADODB.Command
Dim Params4Report As ADODB.Parameters
Dim oRs4Report As New ADODB.Recordset
Dim iStartRowOne As Integer
Dim iStartRowSec As Integer
On Error GoTo Err:
Getsp_bCadreBasic = False
With Command4Report
Set .ActiveConnection = g_oConnection4This
.CommandType = adCmdStoredProc
Set Params4Report = .Parameters
Params4Report.Append .CreateParameter("@Organ_no", adVarChar, adParamInput, 50)
End With
Params4Report("@Organ_no") = frmReport.SSComboBoxEx4Organ.ItemData(frmReport.SSComboBoxEx4Organ.ListIndex)
Command4Report.CommandText = "sp_bCadreBasic"
Set oRs4Report = Command4Report.Execute
If ExportExcel(, , C_bCadreBasic, frmReport.Dir4This.Path) = False Then
Set Command4Report = Nothing
Set oRs4Report = Nothing
Exit Function
End If
If oRs4Report.EOF = False Then g_oSheet4Export.Range("c10:ac25").CopyFromRecordset oRs4Report
g_oSheet4Export.Range("b" & CStr(2)) = CheckVariant(g_str4ReportOrgan)
g_oSheet4Export.Range("m" & CStr(2)) = CheckVariant(g_str4ReportTime)
Set Command4Report = Nothing
Set oRs4Report = Nothing
Getsp_bCadreBasic = True
Err:
Exit Function
End Function
'事业单位管理人员、专业技术人员基本情况统计表1
Public Function Getsp_cExpertBasic_ONE() As Boolean
Dim Command4Report As New ADODB.Command
Dim oRs4Report As New ADODB.Recordset
Dim Params4Report As ADODB.Parameters
On Error GoTo Err:
Getsp_cExpertBasic_ONE = False
With Command4Report
Set .ActiveConnection = g_oConnection4This
.CommandType = adCmdStoredProc
Set Params4Report = .Parameters
Params4Report.Append .CreateParameter("@Organ_no", adVarChar, adParamInput, 50)
End With
Params4Report("@Organ_no") = frmReport.SSComboBoxEx4Organ.ItemData(frmReport.SSComboBoxEx4Organ.ListIndex)
Command4Report.CommandText = "sp_cExpertBasic_ONE"
Set oRs4Report = Command4Report.Execute
If ExportExcel(, , C_cExpertBasic_ONE, frmReport.Dir4This.Path) = False Then
Set Command4Report = Nothing
Set oRs4Report = Nothing
Exit Function
End If
If oRs4Report.EOF = False Then g_oSheet4Export.Range("d8:r8").CopyFromRecordset oRs4Report
Set oRs4Report = oRs4Report.NextRecordset
If oRs4Report.EOF = False Then g_oSheet4Export.Range("d9, r39").CopyFromRecordset oRs4Report
g_oSheet4Export.Range("c" & CStr(2)) = CheckVariant(g_str4ReportOrgan)
g_oSheet4Export.Range("j" & CStr(2)) = CheckVariant(g_str4ReportTime)
Set Command4Report = Nothing
Set oRs4Report = Nothing
Getsp_cExpertBasic_ONE = True
Err:
Exit Function
End Function
'事业单位管理人员、专业技术人员基本情况统计表2
Public Function Getsp_cExpertBasic_TWO() As Boolean
Dim Command4Report As New ADODB.Command
Dim oRs4Report As New ADODB.Recordset
Dim Params4Report As ADODB.Parameters
On Error GoTo Err:
Getsp_cExpertBasic_TWO = False
With Command4Report
Set .ActiveConnection = g_oConnection4This
.CommandType = adCmdStoredProc
Set Params4Report = .Parameters
Params4Report.Append .CreateParameter("@Organ_no", adVarChar, adParamInput, 50)
End With
Params4Report("@Organ_no") = frmReport.SSComboBoxEx4Organ.ItemData(frmReport.SSComboBoxEx4Organ.ListIndex)
Command4Report.CommandText = "sp_cExpertBasic_TWO"
Set oRs4Report = Command4Report.Execute
If ExportExcel(, , C_cExpertBasic_TWO, frmReport.Dir4This.Path) = False Then
Set Command4Report = Nothing
Set oRs4Report = Nothing
Exit Function
End If
If oRs4Report.EOF = False Then g_oSheet4Export.Range("d8:r35").CopyFromRecordset oRs4Report
g_oSheet4Export.Range("c" & CStr(2)) = CheckVariant(g_str4ReportOrgan)
g_oSheet4Export.Range("j" & CStr(2)) = CheckVariant(g_str4ReportTime)
Set Command4Report = Nothing
Set oRs4Report = Nothing
Getsp_cExpertBasic_TWO = True
Err:
Exit Function
End Function
'事业单位管理人员、专业技术人员基本情况统计表3
Public Function Getsp_cExpertBasic_THREE() As Boolean
Dim Command4Report As New ADODB.Command
Dim oRs4Report As New ADODB.Recordset
Dim Params4Report As ADODB.Parameters
On Error GoTo Err:
Getsp_cExpertBasic_THREE = False
With Command4Report
Set .ActiveConnection = g_oConnection4This
.CommandType = adCmdStoredProc
Set Params4Report = .Parameters
Params4Report.Append .CreateParameter("@Organ_no", adVarChar, adParamInput, 50)
End With
Params4Report("@Organ_no") = frmReport.SSComboBoxEx4Organ.ItemData(frmReport.SSComboBoxEx4Organ.ListIndex)
Command4Report.CommandText = "sp_cExpertBasic_THREE"
Set oRs4Report = Command4Report.Execute
If ExportExcel(, , C_cExpertBasic_THREE, frmReport.Dir4This.Path) = False Then
Set Command4Report = Nothing
Set oRs4Report = Nothing
Exit Function
End If
If oRs4Report.EOF = False Then g_oSheet4Export.Range("d8:r36").CopyFromRecordset oRs4Report
g_oSheet4Export.Range("c" & CStr(2)) = CheckVariant(g_str4ReportOrgan)
g_oSheet4Export.Range("l" & CStr(2)) = CheckVariant(g_str4ReportTime)
Set Command4Report = Nothing
Set oRs4Report = Nothing
Getsp_cExpertBasic_THREE = True
Err:
Exit Function
End Function
'事业单位管理人员、专业技术人员基本情况统计表4
Public Function Getsp_cExpertBasic_FOUR() As Boolean
Dim Command4Report As New ADODB.Command
Dim oRs4Report As New ADODB.Recordset
Dim Params4Report As ADODB.Parameters
On Error GoTo Err:
Getsp_cExpertBasic_FOUR = False
With Command4Report
Set .ActiveConnection = g_oConnection4This
.CommandType = adCmdStoredProc
Set Params4Report = .Parameters
Params4Report.Append .CreateParameter("@Organ_no", adVarChar, adParamInput, 50)
End With
Params4Report("@Organ_no") = frmReport.SSComboBoxEx4Organ.ItemData(frmReport.SSComboBoxEx4Organ.ListIndex)
Command4Report.CommandText = "sp_cExpertBasic_FOUR"
Set oRs4Report = Command4Report.Execute
If ExportExcel(, , C_cExpertBasic_FOUR, frmReport.Dir4This.Path) = False Then
Set Command4Report = Nothing
Set oRs4Report = Nothing
Exit Function
End If
If oRs4Report.EOF = False Then g_oSheet4Export.Range("d8:r34").CopyFromRecordset oRs4Report
g_oSheet4Export.Range("c" & CStr(2)) = CheckVariant(g_str4ReportOrgan)
g_oSheet4Export.Range("k" & CStr(2)) = CheckVariant(g_str4ReportTime)
Set Command4Report = Nothing
Set oRs4Report = Nothing
Getsp_cExpertBasic_FOUR = True
Err:
Exit Function
End Function
'集团公司人员培训情况统计表
Public Function Getsp_bEveryEmpTrain() As Boolean
Dim Command4Report As New ADODB.Command
Dim Params4Report As ADODB.Parameters
Dim oRs4Report As New ADODB.Recordset
Dim iCountPersonTime As Integer
Dim iManagePersonTime As Integer
Dim iSectionChiefTime As Integer
Dim iTechnicalPersonTime As Integer
Dim iOperatePersonTime As Integer
Dim dThisYear As String
On Error GoTo Err:
Getsp_bEveryEmpTrain = False
With Command4Report
Set .ActiveConnection = g_oConnection4This
.CommandType = adCmdStoredProc
Set Params4Report = .Parameters
Params4Report.Append .CreateParameter("Total", adInteger, adParamOutput)
Params4Report.Append .CreateParameter("Manage", adInteger, adParamOutput)
Params4Report.Append .CreateParameter("Section_chief", adInteger, adParamOutput)
Params4Report.Append .CreateParameter("Technical", adInteger, adParamOutput)
Params4Report.Append .CreateParameter("Operate", adInteger, adParamOutput)
Params4Report.Append .CreateParameter("@Organ_no", adVarChar, adParamInput, 50)
End With
Params4Report("@Organ_no") = frmReport.SSComboBoxEx4Organ.ItemData(frmReport.SSComboBoxEx4Organ.ListIndex)
Command4Report.CommandText = "sp_bEveryEmpTrain "
Command4Report.Execute
iCountPersonTime = Params4Report("Total").Value
iManagePersonTime = Params4Report("Manage").Value
iSectionChiefTime = Params4Report("Section_chief").Value
iTechnicalPersonTime = Params4Report("Technical").Value
iOperatePersonTime = Params4Report("Operate").Value
dThisYear = Year(Date)
If ExportExcel(, , C_bEveryEmpTrain, frmReport.Dir4This.Path) = False Then
Set Command4Report = Nothing
Set Params4Report = Nothing
Set oRs4Report = Nothing
Exit Function
End If
g_oSheet4Export.Range("C" & CStr(9)) = CheckVariant(iCountPersonTime)
g_oSheet4Export.Range("D" & CStr(9)) = CheckVariant(iManagePersonTime)
g_oSheet4Export.Range("E" & CStr(9)) = CheckVariant(iSectionChiefTime)
g_oSheet4Export.Range("F" & CStr(9)) = CheckVariant(iTechnicalPersonTime)
g_oSheet4Export.Range("G" & CStr(9)) = CheckVariant(iOperatePersonTime)
g_oSheet4Export.Range("D" & CStr(1)) = CheckVariant(dThisYear)
g_oSheet4Export.Range("B" & CStr(2)) = CheckVariant(g_str4ReportOrgan)
g_oSheet4Export.Range("F" & CStr(2)) = CheckVariant(g_str4ReportTime)
Set Command4Report = Nothing
Set Params4Report = Nothing
Set oRs4Report = Nothing
Getsp_bEveryEmpTrain = True
Err:
Exit Function
End Function
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -