I am using VB 6.0 and Crystal 8.5. I have multiple reports that I need to run from my VB application. I am using the following code to access the reports via VB:
CrystalReport2.ReportFileName = "M:\Reports\EOM\Renewals.rpt"
CrystalReport2.DiscardSavedData = True
CrystalReport2.ParameterFields(1) = "BeginDate;" & eomChartStart1a & ";True"
CrystalReport2.ParameterFields(2) = "EndDate;" & eomChartEnd1a & ";True"
CrystalReport2.Connect = connct
CrystalReport2.Destination = crptToFile
CrystalReport2.PrintFileType = crptCSV
CrystalReport2.PrintFileName = "functn1a.csv"
CrystalReport2.Action = 1
intDBValues(0) = CrystalReport2.RecordsPrinted
eomChartStart1a and eomChartEnd1a are string variables that have the date in a string format. i.e. yyyy/mm/dd. Crystal is taking this value in as a string. My problem is that it seems that my parameters are not getting passed in. When I run the report through VB I get 0 records printed. If I run it using crystal with the same parameters it runs fine. Any input would be greatly appreciated.
CrystalReport2.ReportFileName = "M:\Reports\EOM\Renewals.rpt"
CrystalReport2.DiscardSavedData = True
CrystalReport2.ParameterFields(1) = "BeginDate;" & eomChartStart1a & ";True"
CrystalReport2.ParameterFields(2) = "EndDate;" & eomChartEnd1a & ";True"
CrystalReport2.Connect = connct
CrystalReport2.Destination = crptToFile
CrystalReport2.PrintFileType = crptCSV
CrystalReport2.PrintFileName = "functn1a.csv"
CrystalReport2.Action = 1
intDBValues(0) = CrystalReport2.RecordsPrinted
eomChartStart1a and eomChartEnd1a are string variables that have the date in a string format. i.e. yyyy/mm/dd. Crystal is taking this value in as a string. My problem is that it seems that my parameters are not getting passed in. When I run the report through VB I get 0 records printed. If I run it using crystal with the same parameters it runs fine. Any input would be greatly appreciated.