设为首页  
联系我们  
加入收藏  
网页制作 冲浪宝典 图形图像 操作系统 软件教学 编程开发 认证考试 安全技术 站长专区 文学驿站 娱乐天地 游戏天地 办公软件
文章搜索
您的位置: 首页 >> 文章首页 >> 编程开发 >> Visual Basic >> vsprint打印实例
精品推荐
Visual Basic点击TOP10
·VB中使用EXCEL输出
·用vb实现DES加解密算法(三)--解密
·vsprint打印实例
·VB实现SQL Server数据库备份/恢复
·DirectX 7 编程初步
·用vb实现DES加解密算法(二)--加密
·VB 贪吃蛇 单人版游戏 (原作)
·如何在IE右键菜单中添加菜单项以及如何添加IE任务栏按钮
·VB6.0中通过MSChart控件调用数据库
·让VB应用程序支持鼠标滚轮
编程开发点击TOP10
·数字小键盘指法练习
·用C语言编通讯录程序(初学者级别的)
·ASP.NET 程序中常用的三十三种代码
·我写的Java学生成绩管理系统源代码
·CHK文件恢复工具
·java笔试题
·Modem 常用AT指令集
·异常java.sql.SQLException: Io exception:The Network Adapter could not establish connection
·单片机模拟I2C总线及24C02(I2C EEPROM)读写实例(源代码)
·C++经典电子书下载
精选专题

vsprint打印实例

作者: 来源:网络文章 时间:2005-12-13 17:19:34

vsprint打印实例(1)

Option EXPlicit

Public Function formatData2(ByVal data1 As Double, ByVal data2 As Double) As String
    Dim dt1, dt2 As Double
    dt1 = data1
    dt2 = data2
    If dt1 = 0 Or dt1 = 0# Or dt2 = 0 Or dt2 = 0# Then
        formatData2 = "0.00"
    Else
        formatData2 = Format(Round(dt1 / dt2, 2), "0.00")
    End If
End Function

Public Sub print_jian_anhuizong(ByRef printCtl As VSPrinter, ByVal strTable As String, ByVal strTitle)
    Dim con As New ADODB.Connection
    Dim rst As New ADODB.Recordset
    Dim str_table As String
    Dim str_title As String
    Dim strSql As String
    Dim iCurrent As Integer
    Dim cols As Integer '页面表格的列数
    Dim iCurrenrows As Integer '页面表格当前显示的总行数
    Dim Rows As Long '总行数
    Dim Trows As Long '页面表格总行数
    Dim pages As Integer '总页数
    Dim iPage As Integer '当前页面
    Dim iLastrows As Integer '整页显示后剩余的行数
    Dim iRow As Long '当前行的位置
On Error GoTo err1
    str_table = strTable
    str_title = strTitle
    con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strConnection & ";Persist Security Info=False"
    con.Open
    strSql = "select nn,name,unit,pricezhijiegongcheng,pricezhijie,pricerengong,pricecailiao,pricejixie," & _
            "priceqitazhijie,pricexianchang,pricejianjie,pricejihualirun,priceshuijin,priceshashijiacha ,price1 from " & str_table & " order by nn"

共10页 9 7 [1] [2] [3] [4] [5] [6] [7] [8] [9] [108 :>

vsprint打印实例 相关文章:
vsprint打印实例 相关软件:
特别声明:本站除部分特别声明禁止转载的专稿外的其他文章可以自由转载,但请务必注明出处和原始作者。文章版权归文章原始作者所有。对于被本站转载文章的个人和网站,我们表示深深的谢意。如果本站转载的文章有版权问题请联系编辑人员,我们尽快予以更正。
转载请注明来源:http://www.xgdown.com