Improvements for ordering in custom exports

http://manage.dimagi.com/default.asp?86347#695228
The above 4 lines assign to globals because line 201 ends with a semicolon.