>select incident.*, recno('viewgrid') as vrec ; > from viewgrid, incident ; > where incident.inc_id = viewgrid.inc_id ; > order by vrec ; > into cursor printjob >It's not going to work reliably or at all. See Queries and functions which accept alias as parameter for explanation