http://www.csdn.net/expert/topic/655/655298.xml?temp=.8215296
解决方案 »
- 如何去掉播放器的进度条呐!!??
- 想在文本框里 按下键盘 a 时 会自动完成复制 相当按下ctrl+c
- 关于全屏幕显示程序的问题
- 在线高分求教winsock监听程序的问题!!!!!!100分
- 如何用vb创建word文档并进行页面设置??
- 不好意思又要麻烦大家了!
- 关于Word中Table的Cell的问题(宏)
- 怎样做帮助文件:点击帮助,弹出打开的记事本,记事本里是事先输入的有关帮助的文本。分不够再开加
- 请指教11001错误
- 请问vb中XXX函数跟XXX$函数有什么区别?例如format跟format$,chr跟chr$等等..
- 请大家看看,一个VB里定义变量关键字的问题!
- 难道csdn里面一个高手都没有吗?
建一个表,跟存储过程的字段一样,然后用根据这个表作DATAREPORT
在程序中用Rs返回存储过程的记录集,赋给报表的字段其实建表是为了作报表用
to songyangk(小草) :怎么把结果集赋值给报表?我不懂啊,能说的清楚一点吗?谢谢
Select xxxx From xxxx......
对于ADO,表、视图和存储过程的结果集返回的方法都是一样的
调用存储过程的时候,将结果(即记录集)返回给DataReport的字段
我是这样用的,不如有没有更好的办法
在数据环境中可以选择表,视图,存储过程,即可将字段拖入DataReport
我的 [email protected]
我一定会结贴的,谢谢
打印过程设数据源用语句写就行,得到 存储过程的Rs
即写报表的datasource
datamemberPrivate Sub sscmdOK_Click(Index As Integer)
Dim SQLPrint As String
Dim J As Integer
Dim XX As String
Dim Bb As Integer
SQLPrint = "Exec shhy" '执行存储过程
ReportPrint "com_jc_shhy", SQLPrint, Dr_Jc_Shhy1
DE_Report.Con_report.Close
OpenDEConnection
'打印选择
If SSOption1(0).Value = True Then '正文
ReportPrint "com_jc_shhy", SQLPrint, Dr_Jc_Shhy1
Call TaoPrint(Dr_Jc_Shhy1, nPrintMode)
If W_Jc_Shhy.Text1(9).Text = "TO BE COVERED BY THE BUYERS." Then
Dr_Jc_Shhy1.Sections(3).Controls("label46").Visible = True
Dr_Jc_Shhy1.Sections(3).Controls("Label47").Visible = True
Dr_Jc_Shhy1.Sections(3).Controls("Label48").Visible = True
Dr_Jc_Shhy1.Sections(3).Controls("Label49").Visible = True
Else
Dr_Jc_Shhy1.Sections(3).Controls("Label46").Visible = False
Dr_Jc_Shhy1.Sections(3).Controls("Label47").Visible = False
Dr_Jc_Shhy1.Sections(3).Controls("Label48").Visible = False
Dr_Jc_Shhy1.Sections(3).Controls("Label49").Visible = False
End If
Dr_Jc_Shhy1.Show 1
Else
If SSOption1(1).Value = True Then '附页
XX = mmLine(Rs_Jc_Shhy.Fields("addpage"))
ReportPrint "com_jc_shhy", SQLPrint, Dr_Jc_Shhy2
Call TaoPrint(Dr_Jc_Shhy2, nPrintMode)
Bb = 1
Dr_Jc_Shhy2.Sections(3).Controls("LABEL2").Caption = Bb
Dr_Jc_Shhy2.Show 1
If XX > 53 Then
Bb = 2
For i = 1 To Int(XX / 53)
ReportPrint "com_jc_shhy", SQLPrint, Dr_Jc_Shhy2
Dr_Jc_Shhy2.Sections(3).Controls("TXTaddpage").Visible = False
Dr_Jc_Shhy2.Sections(3).Controls("LABEL23").Caption = ""
For J = i * 53 + 1 To (i + 1) * 53
Dr_Jc_Shhy2.Sections(3).Controls("LABEL23").Caption = Dr_Jc_Shhy2.Sections(3).Controls("LABEL23").Caption & Mline(Rs_Jc_Shhy.Fields("addpage"), J) & Chr(10) & Chr(13)
Next J
Dr_Jc_Shhy2.Sections(3).Controls("LABEL23").Visible = True
Dr_Jc_Shhy2.Sections(3).Controls("LABEL2").Caption = Bb
Dr_Jc_Shhy2.Show 1
Bb = Bb + 1
Next i
End If
Else
If SSOption1(2).Value = True Then '背面
ReportPrint "com_jc_shhy", SQLPrint, Dr_Jc_Shhy3
Call TaoPrint(Dr_Jc_Shhy3, nPrintMode)
Dr_Jc_Shhy3.Show 1
End If
End If
End If
Unload Me
End Sub
www.21code.com
www.vbeden.com
www.vbgood.com
www.helpwork.net
看一下