IFIX报表

合集下载
相关主题
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

Private Sub CFixPicture_Initialize()

dtpTime.Value = Now

End Sub

Private Sub CFixPicture_KeyDown(ByVal KeyCode As Long, ByVal Shift As Long, ContinueProcessing As Boolean)

End Sub

Private Sub CommandButton1_Click()

Dim strDate As String

Dim strMonth As String

strDate = Format(dtpTime, "yyyy-MM-dd")

strMonth = Format(dtpTime, "yyyy-MM")

'日报

If Me.optMonth.Value = False Then

If Me.optDay.Value = True Then

WebReport.Navigate "D:\REPORT\日报表\日报表" & strDate & ".htm" '显示

Else

WebReport.Navigate "D:\REPORT\日报表\空白报表" & strDate & ".htm" '显示

End If

End If

'月报

If Me.optDay.Value = False Then

If Me.optMonth.Value = True Then

WebReport.Navigate "D:\REPORT\月报表\月报表" & strMonth & ".htm" '显示

Else

WebReport.Navigate "D:\REPORT\月报表\空白报表" & strMonth & ".htm" '显示

End If

End If

End Sub

Private Sub CommandButton2_Click()

On Error Resume Next

'日报页面设置

If Me.optDay.Value = True Then

PrintSet "0.5", "0.5", "0.5", "0.5"

End If

'月报页面设置

If Me.optMonth.Value = True Then

PrintSet "0.5", "0.5", "0.5", "0.5"

End If

Me.WebReport.ExecWB 6, OLECMDEXECOPT_PROMPTUSER

End Sub

Private Sub optDay_Click()

Me.optDay.Value = True ' 日报

Me.optMonth.Value = False '月报

Me.dtpTime.CustomFormat = "yyyy-MM-dd" '修改时间格式

dtpTime.Value = Now

End Sub

Private Sub optMonth_Click()

Me.optDay.Value = False ' 日报

Me.optMonth.Value = True '月报

Me.dtpTime.CustomFormat = "yyyy-MM" '修改时间格式

dtpTime.Value = Now

End Sub

打印设置

Private Sub PrintSet(sBottom As String, strTop As String, sLeft As String, sMargin_right As String)

Dim hkey_root, hkey_path, hkey_key As String

Dim RegWsh As Object

hkey_root = "HKEY_CURRENT_USER"

hkey_path = "\Software\Microsoft\Internet Explorer\PageSetup"

'//设置网页打印的页眉页脚为空

Set RegWsh = CreateObject("WScript.Shell")

hkey_key = "\header" '页眉

RegWsh.RegWrite hkey_root + hkey_path + hkey_key, ""

hkey_key = "\footer" '页脚

RegWsh.RegWrite hkey_root + hkey_path + hkey_key, ""

hkey_key = "\margin_bottom" '下页边距

RegWsh.RegWrite hkey_root + hkey_path + hkey_key, sBottom '

hkey_key = "\margin_top" '上页边距

RegWsh.RegWrite hkey_root + hkey_path + hkey_key, strTop '

hkey_key = "\margin_left" ' 左页边距

RegWsh.RegWrite hkey_root + hkey_path + hkey_key, sLeft '

hkey_key = "\margin_right" ' 右页边距

RegWsh.RegWrite hkey_root + hkey_path + hkey_key, sMargin_right '

'打印

End Sub

其中日报和月报为

控件

相关文档
最新文档