HI Phuc An,
I haven't test it with WebGUI or GUI for java, but I guess the error reason is in GUI compatibility with OLE/ DOI integration.
You didn't let me know when this error appears: in Design mode (when You design the form) or in Runtime mode (when user runs printing program).
In Design time the OLE/ DOI integration is required and actively used. Therefore use only standard SAP GUI.
In Runtime mode file is being completely assembled on application server (of course, if You don`t use OLE post-processing),
depenless which kind of GUI is used. If the error appers in Runtime mode, it means the file wiever (built into Workbench) can't open the assemled file. Simplest solution is downloading the assembled file to desktop and open it using some available application (MS Excel, OpenOffice, etc..).
Here is example.
Best regards, Igor.