读书人

VB DataReport 的有关问题

发布时间: 2012-08-16 12:02:16 作者: rapoo

VB DataReport 的问题
在VB中,利用DataReport导出数据的时候,Export页面下方会出现Page Range的选择项,可以选择所有页面,可以选择从第几页到第几页,我想把下面选择页面的这个地方不显示,应该怎么弄?
各位大侠帮帮忙

[解决办法]
Dim strTemplate As String

' First create the template for the ExportFormat object.
strTemplate = "MyCompany Daily Report" & vbCrLf & rptTagBody

' Add an ExportFormat object. The FileFormatString determines
' what will be displayed in the Export dialog box.
DataReport1.ExportFormats.Add _
Key:="StandardReport", _
FormatType:=rptFmtText, _
FileFormatString:="Standard Report (*.txt)", _
FileFilter:="*.txt", _
Template:=strTemplate

' Invoke the ExportReport method specifying the ExportFormat
' object named StandardReport to use.
DataReport1.ExportReport "StandardReport", , False, True, _
rptRangeFromTo, 1, 10

读书人网 >VB

热点推荐