
20/11/2007, 23:45
|
| | Fecha de Ingreso: diciembre-2003
Mensajes: 595
Antigüedad: 21 años, 3 meses Puntos: 1 | |
Ayuda con reporte Que tal me gustaria alguie me pudiera ayudar actualmente tengo un reporte sencillo en crystalreport con el visual estudio 2005 y lo cargo en un formulario en un pryecto vb.NET en un CrystalReportViewer1 y asi lo carg cuando me lee el formulario
pero necesito filtrar la informacion y para eso use ste
declar estas variables
Public crApp As New CRAXDDRT.ApplicationClass
Public crReport As New CRAXDDRT.ReportClass
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim ConnectionString As String = "server=hunabku;uid=admin;pwd=admin;database=perso nal"
Dim CommandText As String
' get the filter value from the DropDownList
Dim filterValue As String = TextBox1.Text
' TODO: update the CommandText value for your application
If filterValue = "-- All Authors --" Then
CommandText = "select distinct * from perfiles"
Else
CommandText = "select * from perfiles where codigo = '" & filterValue & "'"
End If
Dim myConnection As New Data.SqlClient.SqlConnection(ConnectionString)
Dim myCommand As New Data.SqlClient.SqlCommand(CommandText, myConnection)
myConnection.Open()
crReport = crApp.OpenReport("C:\ejemplos\reporte\reporte\repo rte1.rpt", 1)
crParamDefs = crReport.ParameterFields
CrystalReportViewer1.ReportSource = crReport
End Sub
pero no me envia nada |