am developing a programm where i am using vb6 as frontend,access as backend and crytstal report as reporting tool.
i have table name foodexp which has fiels like memberno,lunchexp,teaexp,dateofexp.
i like to generate report which gives me sum of expenses for specific member for specific date duration.
i used following query against crystal report control's selectionformula property.as
dim str as string.
str="select memberno,sum(teaexp) as sumteaexp,sum(lunchexp) as sumlunchexp,sum(dinnerexp) as sumdinnerexp from foodexp where dateofexp >= date(" & format(dtpicker1.value,"YYYY","MM","DD")& ") and dateofexp <= date(" & format(dtpicker2.value,"YYYY","MM","DD") & ") group by memberno"
but i doesn't work.
Please guide me to develop such report.