I am working with Crystal Reports XI along with VS2005. I am opening my report document from the CrystalReportsViewer.
Following is the code for it:
Now, i want to open the record from the table 'Order' (which is in Oracle DB) where the orderno is equal to the textbox value in my OrderBooking.vb. Where should i pass the SQL command ? in the CR or VB ?Code:Option Strict On Imports CrystalDecisions.CrystalReports.Engine Imports CrystalDecisions.Shared Public Class OrderForm Private Sub OrderForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load ConfigureCrystalReports() End Sub Private Sub ConfigureCrystalReports() Dim myConnectionInfo As ConnectionInfo = New ConnectionInfo() myConnectionInfo.ServerName = "xxxx" myConnectionInfo.DatabaseName = "xxxx" myConnectionInfo.UserID = "xxxxx" myConnectionInfo.Password = "xxxxx" SetDBLogonForReport(myConnectionInfo) End Sub Private Sub SetDBLogonForReport(ByVal myConnectionInfo As ConnectionInfo) Dim myTableLogOnInfos As TableLogOnInfos = CrystalReportViewer1.LogOnInfo() For Each myTableLogOnInfo As TableLogOnInfo In myTableLogOnInfos myTableLogOnInfo.ConnectionInfo = myConnectionInfo Next End Sub End Class




Reply With Quote