Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Como Pasar un rango de Datos a Crystal REport
Message
De
07/02/2008 09:01:04
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Crystal Reports
Titre:
Como Pasar un rango de Datos a Crystal REport
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01290343
Message ID:
01290343
Vues:
251
creo que me equivoque en el hilo anterior y estaba un poco Desesperado. En el Titulo Anterior como que pense una cosa y escribi otra.

Tal ves ya lo leyeron pero aqui vamos otra ves a ver si me dan la mano

Estoy tratando de Pasar a un repo de Crystal un rango de Valores, el reporte esta hecho y desde el mismo Crystal funciona 100%, ahora quiero enviarle los parametros (RANGO como un IN en SQL (Select * from Empleados where Numero in(1,2,9,75,23) ) ) bueno pense que era tan sencillo como enviar rangos de fechas ( desde, Hasta) pero la cosa es que funciona de una manera diferente y no he podido dar con el Caso, buscando en el internet me encontre el Siguiente Codigo.
To Modify Parameter Fields at Runtime
[Visual Basic] 
' Declare variables needed to pass the parameters
' to the viewer control.
Dim paramFields As New ParameterFields()
Dim paramField As New ParameterField()
Dim discreteVal As New ParameterDiscreteValue()
Dim rangeVal As New ParameterRangeValue()

' The first parameter is a discrete parameter with multiple values.

' Set the name of the parameter field, this must match a 
' parameter in the report.
paramField.ParameterFieldName = "Customer Name"

' Set the first discrete value and pass it to the parameter
discreteVal.Value = "AIC Childrens"
paramField.CurrentValues.Add(discreteVal)

' Set the second discrete value and pass it to the parameter.
' The discreteVal variable is set to new so the previous settings
' will not be overwritten.
discreteVal = New ParameterDiscreteValue()
discreteVal.Value = "Aruba Sport"
paramField.CurrentValues.Add(discreteVal)

' Add the parameter to the parameter fields collection.
paramFields.Add(paramField)

' The second parameter is a range value. The paramField variable
' is set to new so the previous settings will not be overwritten.
paramField = New ParameterField()

' Set the name of the parameter field, this must match a
' parameter in the report.
paramField.ParameterFieldName = "Customer ID"

' Set the start and end values of the range and pass it to the 'parameter.
rangeVal.StartValue = 42
rangeVal.EndValue = 72
paramField.CurrentValues.Add(rangeVal)

' Add the second parameter to the parameter fields collection.
paramFields.Add(paramField)

' Set the parameter fields collection into the viewer control.
crystalReportViewer1.ParameterFieldInfo = paramFields

crystalReportViewer1.ReportSource = "c:\reports\my report.rpt"
Bueno pense que estaba resuelto, o listo, pero mi gran problema es que no me llevo con Visual Basic y he intentado transcribir el Codigo pero sin Resultados. Tengo la Solucion a mi Problema Tan Cerca, pero tan lejos.

La parte de Este Codigo que en Realidad me interesa es:
Dim rangeVal As New ParameterRangeValue()

' Set the name of the parameter field, this must match a
' parameter in the report.
paramField.ParameterFieldName = "Customer ID"

' Set the start and end values of the range and pass it to the 'parameter.
rangeVal.StartValue = 42
rangeVal.EndValue = 72
paramField.CurrentValues.Add(rangeVal)
Bueno muchas Gracias.

Saludos..
El Hombre que dice
"No Puede Hacerse",
será sorprendido por
"Alguien que lo Haga"
Répondre
Fil
Voir

Click here to load this message in the networking platform