Crystal Report - Ayuda urgente conRecordSelectionFormula

 
Vista:

Ayuda urgente conRecordSelectionFormula

Publicado por Kleemann (15 intervenciones) el 24/08/2004 15:34:35
No se como aplicar RecordSelectionFormula con fechas, me marca error, alguien ayudeme por favor.
Ya he utilizado RecordSelectionFormula con campos numericos, pero con fechas me indica error, no se como hacerlo. denme algun ejemplo, gracias.
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:Ayuda urgente conRecordSelectionFormula

Publicado por Gerardo (571 intervenciones) el 26/08/2004 03:16:56
Dim Dim MiSql As String, FInicial As String
FInicial = DTPFInicial.Value.Year & "," & DTPFInicial.Value.Month & "," & DTPFInicial.Value.Day
MiSql = "{Tabla.CampoFecha}=Date (" & FInicial & ")
rptdocument.RecordSelectionFormula = MiSql

ESTE EJEMPLO ES PARA ACCESS, SUPONGO KE SI UTILIZAS SQL SERVER U OTRO SMDB A DEBE SER ALGO SIMILAR, PERO ESO LO PUEDES AVERIGUAR DESDE CR.

SALUDOS
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

Crystal Report con DateTimePicker

Publicado por Alfredo Sastré (1 intervención) el 26/06/2009 00:19:45
Excelente aportación:
Dim ocRep As New cRep
Dim FI, FF As String
FI = dtpFI.Value.Year & "," & dtpFI.Value.Month & "," & dtpFI.Value.Day
FF = dtpFF.Value.Year & "," & dtpFF.Value.Month & "," & dtpFF.Value.Day

If FI > FF Then
MessageBox.Show("La Fecha inicial es mayor a la fecha final")
Else
ocRep.RecordSelectionFormula = "{layOut1.Fecha} In Date(" & FI & ") To Date(" & FF & ")"
Me.crvRep.ReportSource = ocRep
End If

End Sub
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar