一、 把ActiveReport的界面上的英文换成中文
Public Sub Creport(AReport As ActiveReport)
'汉化ActiveReport
'以下适用2.0
With AReport
.ToolBar.Tools.Item(0).Tooltip = "各页目录"
.ToolBar.Tools.Item(2).Caption = "打印..."
.ToolBar.Tools.Item(2).Tooltip = "打印报表"
.ToolBar.Tools.Item(4).Tooltip = "拷贝"
.ToolBar.Tools.Item(6).Tooltip = "查找"
.ToolBar.Tools.Item(8).Tooltip = "单页显示"
.ToolBar.Tools.Item(9).Tooltip = "多页显示"
.ToolBar.Tools.Item(11).Tooltip = "缩小"
.ToolBar.Tools.Item(12).Tooltip = "放大"
.ToolBar.Tools.Item(15).Tooltip = "上一页"
.ToolBar.Tools.Item(16).Tooltip = "下一页"
.ToolBar.Tools.Item(19).Tooltip = "后退"
.ToolBar.Tools.Item(19).Caption = "后退"
.ToolBar.Tools.Item(20).Tooltip = "前进"
.ToolBar.Tools.Item(20).Caption = "前进"
End With
End Sub
其他有关ActiveReport的操作正在努力学习中,唉,便是e文的帮助文档,看来好吃力
二、E文帮助学习
Public Sub Creport(AReport As ActiveReport)
'汉化ActiveReport
'以下适用2.0
With AReport
.ToolBar.Tools.Item(0).Tooltip = "各页目录"
.ToolBar.Tools.Item(2).Caption = "打印..."
.ToolBar.Tools.Item(2).Tooltip = "打印报表"
.ToolBar.Tools.Item(4).Tooltip = "拷贝"
.ToolBar.Tools.Item(6).Tooltip = "查找"
.ToolBar.Tools.Item(8).Tooltip = "单页显示"
.ToolBar.Tools.Item(9).Tooltip = "多页显示"
.ToolBar.Tools.Item(11).Tooltip = "缩小"
.ToolBar.Tools.Item(12).Tooltip = "放大"
.ToolBar.Tools.Item(15).Tooltip = "上一页"
.ToolBar.Tools.Item(16).Tooltip = "下一页"
.ToolBar.Tools.Item(19).Tooltip = "后退"
.ToolBar.Tools.Item(19).Caption = "后退"
.ToolBar.Tools.Item(20).Tooltip = "前进"
.ToolBar.Tools.Item(20).Caption = "前进"
End With
End Sub
其他有关ActiveReport的操作正在努力学习中,唉,便是e文的帮助文档,看来好吃力
二、E文帮助学习
Public Sub Creport(AReport As ActiveReport)
'汉化ActiveReport
'以下适用2.0
With AReport
.ToolBar.Tools.Item(0).Tooltip = "各页目录"
.ToolBar.Tools.Item(2).Caption = "打印..."
.ToolBar.Tools.Item(2).Tooltip = "打印报表"
.ToolBar.Tools.Item(4).Tooltip = "拷贝"
.ToolBar.Tools.Item(6).Tooltip = "查找"
.ToolBar.Tools.Item(8).Tooltip = "单页显示"
.ToolBar.Tools.Item(9).Tooltip = "多页显示"
.ToolBar.Tools.Item(11).Tooltip = "缩小"
.ToolBar.Tools.Item(12).Tooltip = "放大"
.ToolBar.Tools.Item(15).Tooltip = "上一页"
.ToolBar.Tools.Item(16).Tooltip = "下一页"
.ToolBar.Tools.Item(19).Tooltip = "后退"
.ToolBar.Tools.Item(19).Caption = "后退"
.ToolBar.Tools.Item(20).Tooltip = "前进"
.ToolBar.Tools.Item(20).Caption = "前进"
End With
End Sub
其他有关ActiveReport的操作正在努力学习中,唉,便是e文的帮助文档,看来好吃力
二、E文帮助学习
1.Adding Run-time Designer to your Project
关键代码:
a. Add the following code to the Form_Load event:
Dim rpt As DDActiveReports2.ActiveReport
Private Sub Form_Load()
'Set active Tab to the designer
SSTab1.Tab = 0
Set rpt = New ActiveReport
'Activate all the toolbars
ard.ToolbarsVisible = ddTBToolBox + ddTBAlignment + ddTBExplorer + _
ddTBFields + ddTBFormat + ddTBMenu + ddTBPropertyToolbox + ddTBStandard
ard.ToolbarsAccessible = ddTBToolBox + ddTBAlignment + ddTBExplorer + _
ddTBFields + ddTBFormat + ddTBMenu + ddTBPropertyToolbox + ddTBStandard
End Sub
Note: When working with the designer, the toolbars cannot be customizing. The only available options
AR2Pro | 11
are ToolbarsVisible and ToolbarsAccessible. If the project requires custom toolbars, a third party toolbar
• control will need to be substituted for the runtime designer s toolbars.
b. Add the following code to the SSTab1_Click event:
Private Sub SSTab1_Click(PreviousTab As Integer)
Select Case PreviousTab
Case Is = 0
prepPreview
Case Is = 1
prepDesigner
End Select
End Sub
c. Add the following code to prepare the viewer control and designer when its tab is selected:
Private Sub prepPreview()
On Error GoTo errHndl
'Must be used to writes the designer's layout
'to the report so it can be previewed
ard.SaveToObject rpt
rpt.Restart
'Run the new report
rpt.Run False
'Add the report to the veiwer
Set arv.ReportSource = rpt
Exit Sub
errHndl:
MsgBox "Error Previewing the Report: " & Err.Number & " " & Err.Description
End Sub
Private Sub prepDesigner()
On Error GoTo errHndl
If Not arv.ReportSource Is Nothing Then
arv.ReportSource.Cancel
Set arv.ReportSource = Nothing
End If
Exit Sub
errHndl:
MsgBox "Error in Design Preview: " & Err.Number & " " & Err.Description
End Sub
Note: SaveToObject must be used to save the changes made in the run-time designer to an ActiveReport
report object. You should always use that object to run and preview the report, do NOT use the
• designer s Report property to run and preview the report.
2.打包文件说明:
File Name Description
Arpro2.DLL The Reporting Engine.
ARVIEW2.ocx Only if you are using our ActiveX Viewer.
ARdespro2.dll Only if you are using the end-user report designer.
AB2DLL.dll If you are using the run-time designer (not supported on the web).
PDFExpt.DLL PDF Export Filter (when using PDF exporting).
RTFExpt.DLL RTF Export Filter (when using RTF exporting).
ExclExpt.DLL Excel Export Filter (when using Excel exporting).
TextExpt.DLL Text Export Filter (when using Text exporting).
HTMLExpt.DLL HTML Export Filter (when using HTML exporting).
TiffExpt.dll Tiff Export Filter (when using Tiff exporting).
WebCache.dll Only if you are using the WebCache service.
3.AR Run-time Designer 加载DSR文件示例(Loading DSR (ActiveX Designer) Files):
Private Sub Form_Load()
'Set active Tab to the designer
SSTab1.Tab = 0
Set rpt = New ActiveReport
'Activate all the toolbars
ard.ToolbarsVisible = ddTBToolBox + ddTBAlignment + ddTBExplorer + _
ddTBFields + ddTBFormat + ddTBMenu + ddTBPropertyToolbox + ddTBStandard
ard.ToolbarsAccessible = ddTBToolBox + ddTBAlignment + ddTBExplorer + _
ddTBFields + ddTBFormat + ddTBMenu + ddTBPropertyToolbox + ddTBStandard
'Load the ActiveX designer into the run-time designer
ard.LoadFromObject rptSample
End Sub
关键代码:
a. Add the following code to the Form_Load event:
Dim rpt As DDActiveReports2.ActiveReport
Private Sub Form_Load()
'Set active Tab to the designer
SSTab1.Tab = 0
Set rpt = New ActiveReport
'Activate all the toolbars
ard.ToolbarsVisible = ddTBToolBox + ddTBAlignment + ddTBExplorer + _
ddTBFields + ddTBFormat + ddTBMenu + ddTBPropertyToolbox + ddTBStandard
ard.ToolbarsAccessible = ddTBToolBox + ddTBAlignment + ddTBExplorer + _
ddTBFields + ddTBFormat + ddTBMenu + ddTBPropertyToolbox + ddTBStandard
End Sub
Note: When working with the designer, the toolbars cannot be customizing. The only available options
AR2Pro | 11
are ToolbarsVisible and ToolbarsAccessible. If the project requires custom toolbars, a third party toolbar
• control will need to be substituted for the runtime designer s toolbars.
b. Add the following code to the SSTab1_Click event:
Private Sub SSTab1_Click(PreviousTab As Integer)
Select Case PreviousTab
Case Is = 0
prepPreview
Case Is = 1
prepDesigner
End Select
End Sub
c. Add the following code to prepare the viewer control and designer when its tab is selected:
Private Sub prepPreview()
On Error GoTo errHndl
'Must be used to writes the designer's layout
'to the report so it can be previewed
ard.SaveToObject rpt
rpt.Restart
'Run the new report
rpt.Run False
'Add the report to the veiwer
Set arv.ReportSource = rpt
Exit Sub
errHndl:
MsgBox "Error Previewing the Report: " & Err.Number & " " & Err.Description
End Sub
Private Sub prepDesigner()
On Error GoTo errHndl
If Not arv.ReportSource Is Nothing Then
arv.ReportSource.Cancel
Set arv.ReportSource = Nothing
End If
Exit Sub
errHndl:
MsgBox "Error in Design Preview: " & Err.Number & " " & Err.Description
End Sub
Note: SaveToObject must be used to save the changes made in the run-time designer to an ActiveReport
report object. You should always use that object to run and preview the report, do NOT use the
• designer s Report property to run and preview the report.
2.打包文件说明:
File Name Description
Arpro2.DLL The Reporting Engine.
ARVIEW2.ocx Only if you are using our ActiveX Viewer.
ARdespro2.dll Only if you are using the end-user report designer.
AB2DLL.dll If you are using the run-time designer (not supported on the web).
PDFExpt.DLL PDF Export Filter (when using PDF exporting).
RTFExpt.DLL RTF Export Filter (when using RTF exporting).
ExclExpt.DLL Excel Export Filter (when using Excel exporting).
TextExpt.DLL Text Export Filter (when using Text exporting).
HTMLExpt.DLL HTML Export Filter (when using HTML exporting).
TiffExpt.dll Tiff Export Filter (when using Tiff exporting).
WebCache.dll Only if you are using the WebCache service.
3.AR Run-time Designer 加载DSR文件示例(Loading DSR (ActiveX Designer) Files):
Private Sub Form_Load()
'Set active Tab to the designer
SSTab1.Tab = 0
Set rpt = New ActiveReport
'Activate all the toolbars
ard.ToolbarsVisible = ddTBToolBox + ddTBAlignment + ddTBExplorer + _
ddTBFields + ddTBFormat + ddTBMenu + ddTBPropertyToolbox + ddTBStandard
ard.ToolbarsAccessible = ddTBToolBox + ddTBAlignment + ddTBExplorer + _
ddTBFields + ddTBFormat + ddTBMenu + ddTBPropertyToolbox + ddTBStandard
'Load the ActiveX designer into the run-time designer
ard.LoadFromObject rptSample
End Sub
关键代码:
a. Add the following code to the Form_Load event:
Dim rpt As DDActiveReports2.ActiveReport
Private Sub Form_Load()
'Set active Tab to the designer
SSTab1.Tab = 0
Set rpt = New ActiveReport
'Activate all the toolbars
ard.ToolbarsVisible = ddTBToolBox + ddTBAlignment + ddTBExplorer + _
ddTBFields + ddTBFormat + ddTBMenu + ddTBPropertyToolbox + ddTBStandard
ard.ToolbarsAccessible = ddTBToolBox + ddTBAlignment + ddTBExplorer + _
ddTBFields + ddTBFormat + ddTBMenu + ddTBPropertyToolbox + ddTBStandard
End Sub
Note: When working with the designer, the toolbars cannot be customizing. The only available options
AR2Pro | 11
are ToolbarsVisible and ToolbarsAccessible. If the project requires custom toolbars, a third party toolbar
• control will need to be substituted for the runtime designer s toolbars.
b. Add the following code to the SSTab1_Click event:
Private Sub SSTab1_Click(PreviousTab As Integer)
Select Case PreviousTab
Case Is = 0
prepPreview
Case Is = 1
prepDesigner
End Select
End Sub
c. Add the following code to prepare the viewer control and designer when its tab is selected:
Private Sub prepPreview()
On Error GoTo errHndl
'Must be used to writes the designer's layout
'to the report so it can be previewed
ard.SaveToObject rpt
rpt.Restart
'Run the new report
rpt.Run False
'Add the report to the veiwer
Set arv.ReportSource = rpt
Exit Sub
errHndl:
MsgBox "Error Previewing the Report: " & Err.Number & " " & Err.Description
End Sub
Private Sub prepDesigner()
On Error GoTo errHndl
If Not arv.ReportSource Is Nothing Then
arv.ReportSource.Cancel
Set arv.ReportSource = Nothing
End If
Exit Sub
errHndl:
MsgBox "Error in Design Preview: " & Err.Number & " " & Err.Description
End Sub
Note: SaveToObject must be used to save the changes made in the run-time designer to an ActiveReport
report object. You should always use that object to run and preview the report, do NOT use the
• designer s Report property to run and preview the report.
2.打包文件说明:
File Name Description
Arpro2.DLL The Reporting Engine.
ARVIEW2.ocx Only if you are using our ActiveX Viewer.
ARdespro2.dll Only if you are using the end-user report designer.
AB2DLL.dll If you are using the run-time designer (not supported on the web).
PDFExpt.DLL PDF Export Filter (when using PDF exporting).
RTFExpt.DLL RTF Export Filter (when using RTF exporting).
ExclExpt.DLL Excel Export Filter (when using Excel exporting).
TextExpt.DLL Text Export Filter (when using Text exporting).
HTMLExpt.DLL HTML Export Filter (when using HTML exporting).
TiffExpt.dll Tiff Export Filter (when using Tiff exporting).
WebCache.dll Only if you are using the WebCache service.
3.AR Run-time Designer 加载DSR文件示例(Loading DSR (ActiveX Designer) Files):
Private Sub Form_Load()
'Set active Tab to the designer
SSTab1.Tab = 0
Set rpt = New ActiveReport
'Activate all the toolbars
ard.ToolbarsVisible = ddTBToolBox + ddTBAlignment + ddTBExplorer + _
ddTBFields + ddTBFormat + ddTBMenu + ddTBPropertyToolbox + ddTBStandard
ard.ToolbarsAccessible = ddTBToolBox + ddTBAlignment + ddTBExplorer + _
ddTBFields + ddTBFormat + ddTBMenu + ddTBPropertyToolbox + ddTBStandard
'Load the ActiveX designer into the run-time designer
ard.LoadFromObject rptSample
End Sub