Olha o codigo abaixo esta funcionando com o mesmo relatorio numa selecao mais simples, ou seja, seleciona todos pagos sem precisar pesquisar por periodo de data.
O erro esta acontecendo agora, quando eu precisei pesquisar por periodo de data e em 06 campos diferentes.
veja o codigo como esta?
With CrystalReport1
'formula
MsgBox "Clique em OK" & Chr(13) & "" & Chr(13) & "E aguarde para visualizaçao do relatório!!!", vbInformation, "ATENÇÃO USUÁRIO"
.ReportFileName = App.Path & "RelGerDivAtivPag.rpt"
.SelectionFormula = "{CadPagamento.DatPgtParcUnica} >=date(" & Format(Text1.Text, "yyyy,mm,dd") & ") or {CadPagamento.DatPgtParc1} >=date(" & Format(Text1.Text, "yyyy,mm,dd") & ") or {CadPagamento.DatPgtParc2} >=date(" & Format(Text1.Text, "yyyy,mm,dd") & ") or {CadPagamento.DatPgtParc3} >=date(" & Format(Text1.Text, "yyyy,mm,dd") & ") or {CadPagamento.DatPgtParc4} >=date(" & Format(Text1.Text, "yyyy,mm,dd") & ") or {CadPagamento.DatPgtParc5} >=date(" & Format(Text1.Text, "yyyy,mm,dd") & ") and {CadPagamento.DatPgtParcUnica} >=date(" & Format(Text2.Text, "yyyy,mm,dd") & ") or {CadPagamento.DatPgtParc1} >=date(" & Format(Text2.Text, "yyyy,mm,dd") & ") or {CadPagamento.DatPgtParc2} >=date(" & Format(Text2.Text, "yyyy,mm,dd") & ") or {CadPagamento.DatPgtParc3} >=date(" & Format(Text2.Text, "yyyy,mm,dd") & ") or {CadPagamento.DatPgtParc4} >=date(" & Format(Text2.Text, "yyyy,mm,dd") & ") or {CadPagamento.DatPgtParc5} >=date(" & Format(Text2.Text, "yyyy,mm,dd") & ")"
.DataFiles(0) = AnoSel2
.CopiesToPrinter = 1
.DiscardSavedData = True
.Destination = crptToWindow
.WindowState = crptMaximized
.WindowTitle = "Sist. Ger. de Arrec. Fin. - Imposto pago por período"
.Action = 1
AnoSel2 = Empty
End With
entao, isso ajuda em alguma coisa???