>I normally using a SQL to sort out the data and output to a table, eg
>
> SELE A,B,C From abc.dbf FOR A={01/01/1999} INTO TABLE temp
>
>,and then run the report.
>
>I feel that this is not a good way.
As Craig says, using a cursor is the way to go. I only would add the for creating the report, using your code INTO TABLE is a good way to do it. Then you can use the Expression Builder, etc, have the table available any time in the report DE. Then when you've completed the report, delete the table from the DE, and change thge SQL to INTO CURSOR, and you're all set...
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.