>you mean dont use tables in the DE of my ReportS?
Using tables or cursors directly in the DE causes lots of problems. If the report shows some queer behavior, and doesn't work as expected, the FIRST thing I do is check the DE - and delete all tables.
Also, preparing a single cursor beforehand gives you lot of flexibility. For example, a single SELECT - SQL command can include several options based on user selection. Here is some sample code:
if ThisForm.OpgOrder = 1
lcOrder = "Code"
else
lcOrder = "Name"
endif
if ThisForm.ChkIncludeActive
lcWhere = ""
else
lcWhere = "where IsActive"
endif
select * from MyTable;
order by &lcOrder;
where &lcWhere;
into cursor Temp
if _tally = 0
MessageBox("No data - please check the selection criteria.")
return
endif
report form MyReport
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)