Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21201

Crystal Report Query using VB 6

$
0
0
trying to get a report from access data base using VB 6 codes
what i want it is a collective data data from my DB, between two given dates, say start date and end date and i need another field specification too
meaning query must select from 3 variables

i tried the code as bellow but i am getting errors, please tell me how to write it without errors

CR.ReportFileName = App.Path & "\Reports\RMP.rpt"
CR.Formulas(0) = "StrDate='" & mskStr.Text & "'"
CR.Formulas(1) = "EndDate='" & mskEnd.Text & "'"
CR.Formulas(2) = "Name = '" & txtledg.Text & " ' "
CR.SelectionFormula = "{Daybook.head} in ' " & txtledg.Text & " '"
CR.SelectionFormula = "{DayBook.Date} in Date(" & Format(mskStr.Text, "yyyy,MM,dd") & ") to Date(" & Format(mskEnd.Text, "yyyy,MM,dd") & ")"

CR.Destination = crptToWindow
CR.DiscardSavedData = True
CR.WindowState = crptMaximized
CR.Action = 1


i really need this to be working
help me

Viewing all articles
Browse latest Browse all 21201

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>