Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Create BindReport function
Message
De
20/08/2008 05:29:14
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Create BindReport function
Divers
Thread ID:
01340315
Message ID:
01340315
Vues:
54
Hello All,
I am trying to develop BindReport function, but when it run, it keeps asking me Dataset username & password ..
what I missed? please help

TIA
Winanjaya

Public Function BindReport(ByVal pSQL As String, ByVal pRptFile As String, ByVal pCRViewer As CrystalDecisions.Web.CrystalReportViewer)
Dim mReturn As Boolean = True
Try
Dim myConnection As New OracleClient.OracleConnection()
myConnection.ConnectionString = GetMatrixConnectionString()
Dim MyCommand As New OracleClient.OracleCommand()
MyCommand.Connection = myConnection
MyCommand.CommandText = pSQL
MyCommand.CommandType = CommandType.Text
Dim MyDA As New OracleClient.OracleDataAdapter()
MyDA.SelectCommand = MyCommand
Dim myDS As New DataSet()
MyDA.Fill(myDS, "MyTable")
Dim oRpt As New ReportDocument
oRpt.Load(pRptFile)
oRpt.SetDataSource(myDS)
pCRViewer.ReportSource = oRpt
pCRViewer.DataBind()
Catch ex As Exception
mReturn = False
Finally
BindReport = mReturn
End Try
End Function
Répondre
Fil
Voir

Click here to load this message in the networking platform