Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Create BindReport function
Message
From
20/08/2008 05:29:14
 
 
To
All
General information
Forum:
ASP.NET
Category:
Other
Title:
Create BindReport function
Miscellaneous
Thread ID:
01340315
Message ID:
01340315
Views:
53
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
Reply
Map
View

Click here to load this message in the networking platform