If you don't already have any type of index that does this, it's best to take the tables out of the data environment and prepare a cursor using SQL SELECT before printing the report. This way you can join the fields from both tables and tell it what fields to use for ordering the table.
If you have used tablename.fieldname in your report field expressions you'll have to go thru each field and take out the tablename portion. Otherwise, it won't match the temporary cursor you create.
Cathy
>i have in report's DE two tables, balance and employee. balance has empno field but i want to display firstname and lastname of employee, so i set relation from balance to employee table. this works perfectly fine.
>
>but i want to set the order accordning to employee.lastname? how do i do that? i have in my DE, balance as initialselected.
>
>any help pls?