No OS specified & no OS version! :-(
No clue provided whether 6i Client/server or web. :-(
There can be many, many, many reasons why "it doesn't work";
and since you provided scant information regarding necessary details,
I won't bother speculating any possible causes.
Why are you going out to the OS rather than using the Forms builtin function RUN_REPORT_OBJECT?