Ver Mensaje Individual
  #2 (permalink)  
Antiguo 30/05/2009, 13:22
Avatar de Dradi7
Dradi7
 
Fecha de Ingreso: junio-2008
Ubicación: Peru - Lima
Mensajes: 1.518
Antigüedad: 15 años, 11 meses
Puntos: 220
Respuesta: Funcion en Crystal Report

para esto crea primero en tu crystal report un textobject y definilo con el nombre por ejemplo txtbarra
luego en tu formulario donde muestras supongo yo el informe con el crystal report
añade las librerias siguiente

CrystalDecisions.CrystalReports.Engine

luego este es el codigo para enviar el contenido de tu caja de texto al crystal
Código vb.net:
Ver original
  1. Dim Rep as new CrystalReportPrueba ' El nombre de tu crystal report creado
  2.   For Each Obj As ReportObject In Rep.Section2.ReportObjects
  3.                         If TypeOf Obj Is TextObject Then
  4.                             If Obj.Name = "txtbarra" Then ' Este Campo del Reporte es para Mostrar el Tipo de Reporte
  5.                                 TryCast(Obj, TextObject).Text = txtprueba.Text ' aqui va el nombre de tu campo a enviar
  6.                             End If
  7.                         End If
  8.                     Next
  9.         CrystalReportViewer1.reportSource = Rep

Nota: este codigo va antes de llamar al reporte en tu crystalreportviewer
__________________
La clave de todo triunfador es eliminar todas sus excusas y sus limitaciones