vb6如何显示水晶报表

mqlbeyond 2010-01-13 09:28:15
问题:水晶报表已经设置好了,但在vb程序中如何显示出这个报表,请高人指点,新手还请明示。
...全文
83 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
LCAAA 2010-01-13
  • 打赏
  • 举报
回复
Getmarg "", "tj.rpt"
FrmRpt!Report1.SelectionFormula = "{pjx.glid}=" & Val(glid) & " and {pjx.username}='" & ComputerName & "'"
FrmRpt!Report1.Formulas(0) = "a='" & Zcdwname & "统计表" & "'"
FrmRpt!Report1.Formulas(1) = "dw='" & Zcdwname & "'"
FrmRpt!Report1.Destination = 0
On Error Resume Next
FrmRpt!Report1.Action = 1


Sub Getmarg(title As String, filename As String)
Dim ssn As New ADODB.Recordset
ssn.Open "select * from report where title='" & title & "' and printer_type='" & PrinterSet & "'", cn
If Not ssn.EOF Then
FrmRpt!Report1.ReportFileName = ReportPath & ssn("filename")
FrmRpt!Report1.MarginLeft = ssn("marginleft")
FrmRpt!Report1.MarginTop = ssn("margintop")
Else
FrmRpt!Report1.ReportFileName = ReportPath & filename
End If
FrmRpt!Report1.Connect = "DSN=" & DsnName & ";UID=" & DatabaseLoginUid & ";PWD=" & DatabaseUserPwd & ";"
ssn.Close: Set ssn = Nothing
End Sub

7,763

社区成员

发帖
与我相关
我的任务
社区描述
VB 基础类
社区管理员
  • VB基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧