1. what is the alternative code for App.path(VB6) in VB.NET?
2. How can I open a crystal report in VB.NET. in asp.net it goes like this. I first creat an XMLSchema File then bind it to my crystal report
Dim strCmd As String = ""
strCmd = "Select * FROM TEST "
Dim OraCON As New OracleConnection(ConfigurationManager.ConnectionStrings("Oraconn").ConnectionString)
OraCON.Open()
Dim ds As DataSet = New DataSet
Dim da As OracleDataAdapter = New OracleDataAdapter(strCmd, OraCON)
da.Fill(ds, "TEST_SCHEMA")
OraCON.Close()
Dim myReportDocument As ReportDocument
myReportDocument = New ReportDocument
myReportDocument.Load(Server.MapPath("~\Reports\Test.rpt"))
myReportDocument.SetDataSource(ds)
CrystalReportViewer1.ReportSource = myReportDocument
CrystalReportViewer1.DataBind()
CrystalReportViewer1.Width = System.Web.UI.WebControls.Unit.Pixel(1024)
If you have any alternative solution please let me know. Thanks!
2. How can I open a crystal report in VB.NET. in asp.net it goes like this. I first creat an XMLSchema File then bind it to my crystal report
Dim strCmd As String = ""
strCmd = "Select * FROM TEST "
Dim OraCON As New OracleConnection(ConfigurationManager.ConnectionStrings("Oraconn").ConnectionString)
OraCON.Open()
Dim ds As DataSet = New DataSet
Dim da As OracleDataAdapter = New OracleDataAdapter(strCmd, OraCON)
da.Fill(ds, "TEST_SCHEMA")
OraCON.Close()
Dim myReportDocument As ReportDocument
myReportDocument = New ReportDocument
myReportDocument.Load(Server.MapPath("~\Reports\Test.rpt"))
myReportDocument.SetDataSource(ds)
CrystalReportViewer1.ReportSource = myReportDocument
CrystalReportViewer1.DataBind()
CrystalReportViewer1.Width = System.Web.UI.WebControls.Unit.Pixel(1024)
If you have any alternative solution please let me know. Thanks!