>I am relatively new to database programming and need to know how to make a report work in FoxPro. I have a table with a date field and an amount field. My goal is to create a report that will let me select a date range and print the total number of records and a sum of the amount fields for EACH DAY within that range.
>
>I was thinking about using a Select - SQL statement to retrieve the information into a temporary cursor and then work with it from there using report variables.
>
>Am I on the right track?
Sure are.
SELECT SUM(amount) AS sumbydate, otherfields ;
FROM yourtable ;
WHERE BETWEEN(yourdate,lowdate,highdate) ;
GROUP BY yourdate ;
INTO CURSOR reportcursor