Foxtable(狐表)用户栏目专家坐堂 → [求助]专业报表中求如何能打印多个时间的病程记录。


  共有11605人关注过本帖树形打印复制链接

主题:[求助]专业报表中求如何能打印多个时间的病程记录。

帅哥哟,离线,有人找我吗?
狐狸爸爸
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:管理员 帖子:47497 积分:251403 威望:0 精华:91 注册:2008/6/17 17:14:00
  发帖心情 Post By:2011/9/25 9:43:00 [显示全部帖子]

Dim Doc As New PrintDoc
doc.PageSetting.PaperKind = 9 '设定为A4纸
Doc.PageSetting.RightMargin = 5 '设置右边距
doc.AutoRotate = False '禁止自动旋转打印内容
Doc.PrinterName = "IBM Proprinter X24"
doc.Style.FontSize = 14
Doc.Style.F
Dim rx As prt.RenderText
Dim x As Integer = 0 '定义水平偏移参数
Dim y As Integer = 0 '定义垂直偏移参数
Dim g As Integer = 0 '定义不同月末的垂直偏移参数
Dim CurRow As Row = Tables("病案打印").Current
Dim cnt As Integer
For  i As Integer = Tables("病案打印.病程记录").TopPosition To Tables("病案打印.病程记录").BottomPosition
    Dim CurRow6 As Row = Tables("病案打印.病程记录").Rows(i)
    cnt = cnt + 1
    Select Case CurRow6("记录类型")
        Case "三月末","六月末"
            g = 0
        Case  "四月末","七月末"
            g = 88
        Case  "五月末","八月末"
            g = 177
        Case "一月末"
            g = 132
        Case "二月末"
            g = 176
    End Select
    Dim ra As New prt.RenderArea '定义一个容器
    ra.x = 20 + x
    ra.y = 32 + y * cnt + g
    rx = new prt.RenderText
    rx.Text = CurRow6("记录时间").Date
    rx.Style.Spacing.Bottom = 6
    ra.Children.Add(rx)
   
    rx = new prt.RenderText
    rx.Text = CurRow6("记录正文")
    rx.Style.TextIndent = 10
    rx.Width = 168
    rx.Style.LineSpacing = 220
    rx.Style.WordWrap = True
    rx.Style.Spacing.Bottom = 6
    ra.Children.Add(rx)
    doc.body.Children.Add(ra)
Next
doc.Preview()

 回到顶部