那位仁兄有水晶报表和..net(vb)的实例阿

来源:百度知道 编辑:UC知道 时间:2024/05/24 04:48:20
那位仁兄有水晶报表和..net(vb)的实例阿
我的意思是说:先做一个假数据的例子

Public Function F_Print(ByRef crReport As Object, ByVal R_name As String, ByVal LoginID As String, ByVal Print_Login As String) As Boolean

'クリスタルレポートのログオン情报を设定します。
F_Print = False

on error resume next
crReport.Close()

On Error GoTo err1

Dim logonInfo As New CrystalDecisions.Shared.TableLogOnInfo
Dim table As CrystalDecisions.CrystalReports.Engine.Table

crReport.Load(gsReportDirectry & R_name & ".rpt")

gsExportSorce_rpt = gsReportDirectry & R_name & ".rpt"

' 各テーブルのログオン情报を设定します。
For Each table In crReport.Database.Tables
' TableLogOnInfo オブジェクトを取得します。
logonInfo = table.LogOnInfo
' サーバーまたは ODBC データ ソース名、データベース名、
' ユーザー ID、およびパスワードを设定します。
logonInfo.ConnectionInfo.ServerName = gsOraD