Hi Barry,
Instead of workarea use the table alias, e.g.:
Command1.Click
lnSel=select()
select myReportAlias
report form MyReport TO Printer Prompt Preview Noconsole
select (nSel)
>I am calling a report form a command button click() in the column of a grid in a pageframe.
>
>Prior to the click() there are scads workareas occupied other tables/views/cursors et all.
>
>As a result of the button click(), I select records into a "report cursor", redundantly select that workarea, and then issue a REPORT FORM command TO PRINTER PROMPT.
>
>As long as I step through the code, all is well. The moment I allow the code to run unattended, the report executes with the wrong workarea selected.
>
>In order to attempt to resolve this I have, at various times, placed redundant "select (workarea) " statements in the reports DE and every other place that I can think of all to no avail.
>
>I am working in DataSession(1), Ken Levy's SuperClass is using DataSession(2).
>
>I am supremely confident that I am the problem, but I seem to have this BEAM in my eye so that I can't see it.
>
>Words from the wise awaited.
If it's not broken, fix it until it is.
My Blog