报表连接时怎么样才可以用相对的路径???
请大家帮帮忙
请大家帮帮忙
解决方案 »
- DataGridView中怎么实现right click事件? 小弟在线等!
- 高手救我:一个ActiveX的问题--> DataGrid 控件如何获取单击、双击事件?
- 为什么保存后再打开控件代码就无效了呢
- 到哪里找POP3的命令集合?
- 有关timeout的问题
- 能否提供‘超线程’的例子或者源码?学习、、学习
- WAV文件转成MP3文件的问题,先给200分。
- 请问MSHFLEXGRID怎么绑定数据.??!如何选中一行?!?
- 请问在用VB开发实时通讯程序时应注意的问题
- 那里有 jdk的下载啊!我在java的网站上看有很多,但不知下载哪个啊!!告诉我一个我 直接下载的地址好吗?谢谢了!!急
- 关于数据库导入导出的问题
- 没有分了有钱,关于VB6.0报表(data report)
Dim xlBook As New Excel.Workbook
Dim xlSheet As New Excel.Worksheet
Dim reStr As String, Pname As String Pname = App.Path & "\report\temp.xls" '定义临时打印工作表
reStr = Dir(Pname)
If reStr <> "" Then
Kill Pname
End If
FileCopy App.Path & "\report\医院内部动态报表.xls", Pname
If Not (xlApp Is Nothing) Then
xlApp.Quit
End If
Set xlApp = CreateObject("Excel.Application")
xlApp.Visible = True
Set xlBook = xlApp.Workbooks.Open(App.Path & "\report\temp.xls")
Set xlSheet = xlBook.Worksheets("动态报表")
xlSheet.Cells(5, 5) = Txt(6).text
xlSheet.Cells(5, 18) = DTPstart.Value & "------" & DTPend.Value
xlSheet.Cells(27, 3) = DTPreport.Value
xlSheet.Cells(27, 21) = Txt(4).text
xlSheet.Cells(27, 34) = Txt(3).text
Private Sub DataReport_Error(ByVal JobType As MSDataReportLib.AsyncTypeConstants, ByVal Cookie As Long, ByVal ErrObj As MSDataReportLib.RptError, ShowError As Boolean)........
End Sub
Private Sub DataEnvironment_Initialize()
conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info=False;Data Source=" & IIf(Right(App.Path, 1) = "\", "", "\") & "\A.mdb"End Sub
另外你还要在设计模式下将DEconnection对象的connectstring清空.