Protected Sub GridView1_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) Handles GridView1.SelectedIndexChanged
Dim rptv As New rptVenta()
Session("vseleccionada") = GridView1.SelectedRow().Cells(1).Text.ToString()
Dim daove As New DAOVenta()
Dim tabla As New DataTable()
tabla = daove.ImprimirFactura(Session("vseleccionada").ToString(), Session("nombreusuario").ToString())
'Label2.Text = tabla.Rows(0)(3).ToString()
' rptv.SetDatabaseLogon("ventas.triton", "triton")
' rptv.SetDatabaseLogon("ventas.triton", "triton", "alumno-auc", "admodos")
rptv.SetDataSource(tabla)
rptv.SetDatabaseLogon("ventas.triton", "triton", ".", "admodos")
CrystalReportViewer1.ReportSource = rptv
rptv.Load("..\GUI\rptVenta.rpt")
CrystalReportViewer1.LogOnInfo().Item(0).ConnectionInfo().DatabaseName = "admodos"
CrystalReportViewer1.LogOnInfo().Item(0).ConnectionInfo().IntegratedSecurity = True
CrystalReportViewer1.LogOnInfo().Item(0).ConnectionInfo().Password = "triton"
CrystalReportViewer1.LogOnInfo().Item(0).ConnectionInfo().ServerName = "."
CrystalReportViewer1.LogOnInfo().Item(0).ConnectionInfo().UserID = "ventas.triton"
' CrystalReportSource1.ReportDocument.SetDatabaseLogon("USER", "PASSWORD", "SERVIDOR", "Base de datos")
CrystalReportViewer1.BackColor = Drawing.Color.White
'CrystalReportViewer1.DataBind()
Label2.Text = Session("vseleccionada").ToString() + Session("nombreusuario").ToString()
End Sub
i got a bug as this
The report requested additional information needed.
then, what are the right step to get it work? i am programming in visual basic, visual studio 2008, sql server 2008 r2.
I have recieved this error before. I cannot remember exactly how I fixed (it happened 2-3 years ago) it but here is the code from the project. I had to convert it into VB but I compiled it and ran it and it worked fine. By the way this was in an ASP.Net web form page so this is from the code behind. The code from the page simply has the CrystalReportViewer.
References: