jshailes
September 7th, 2006, 06:31 AM
I have a problem selecting records in my crystal report. There are two string parameters, dateFrom and dateTo. The record selection formula is:
{payroll_history.dateModified} in CDate({?dateFrom}) to CDate({?dateTo})
When typing in the string parameters in crystal, the report works fine, suggesting the fault is in the parsing from vb to crystal. See code below:
Report.Parameters.getItemByName("dateFrom").setCurrentValue(strDateFrom)
Report.Parameters.getItemByName("dateFrom").setCurrentValue(strDateFrom)
HOWEVER, I can display these parameters on the screen perfectly fine when executing the report from VB. Surely this means the selection formula is incorrect?? But it works from within crystal! Argh!
Any help anyone can give me will be so much appreciated.
{payroll_history.dateModified} in CDate({?dateFrom}) to CDate({?dateTo})
When typing in the string parameters in crystal, the report works fine, suggesting the fault is in the parsing from vb to crystal. See code below:
Report.Parameters.getItemByName("dateFrom").setCurrentValue(strDateFrom)
Report.Parameters.getItemByName("dateFrom").setCurrentValue(strDateFrom)
HOWEVER, I can display these parameters on the screen perfectly fine when executing the report from VB. Surely this means the selection formula is incorrect?? But it works from within crystal! Argh!
Any help anyone can give me will be so much appreciated.