Hi!!
I am using VB6.0, CR8.0, Wind2000, Oracle9.2i
When I run my CR from
VB I want to made a filter, but not a filter from a specific field ( thing that I do using a select...from...where) I want to filter for a formulate colum of my crystal report.
Is there any way to use something like the SelectExpert that Crystal have using
VB code?
This is my code
Case "cr_RotaTie"
' Saca query para el reporte, articulos con existencia en 0
Set adoRS = New ADODB.Recordset
adoRS.Open gstrSQL, gcnOracle, adOpenForwardOnly, adLockReadOnly, adCmdText
If adoRS.EOF And adoRS.BOF Then 'No encontro
Screen.MousePointer = vbDefault
Exit Sub
Else
Set crRep_RotaTie = New cr_RotaTie
crRep_RotaTie.ParameterFields(1).AddCurrentValue gstrParameter1
crRep_RotaTie.ParameterFields(3).AddCurrentValue gstrParameter5
crRep_RotaTie.ParameterFields(2).AddCurrentValue gstrParameter4
crRep_RotaTie.Database.SetDataSource adoRS
CRViewer1.ReportSource = crRep_RotaTie
If gblnGenArchivo = True Then
If gstrTipoArch = "RPT" Then
crRep_RotaTie.ExportOptions.DestinationType = crEDTDiskFile
crRep_RotaTie.ExportOptions.DiskFileName = "T:\CODIGOO\QUATRO\" + gstrParameter3 + "." + gstrTipoArch
crRep_RotaTie.ExportOptions.FormatType = crEFTCrystalReport 'crEFTExcel50
crRep_RotaTie.Export False
Else
crRep_RotaTie.ExportOptions.DestinationType = crEDTDiskFile
crRep_RotaTie.ExportOptions.DiskFileName = "T:\CODIGOO\QUATRO\" + gstrParameter3 + "." + gstrTipoArch
crRep_RotaTie.ExportOptions.FormatType = crEFTExcel50
crRep_RotaTie.Export False
End If
End If
End If
....