webform 数据窗打印失败解决办法

webform 数据窗打印失败
一个简单的dw.print()
PrintManager窗口中显示SaveAS did not complete successfully, return code is : -1
但是得到dw.print()返回值是1,表示是成功的。
xp的ASPNET用户组有发布目录的所有权限,并且dw.saveas()也是可以用的。
何解?
------解决方案--------------------
根据经验还是权限问题,不同的操作系统使用的用户是不同的,iis_wgp aspnet,
另外有的租赁服务器设定的用户是user
------解决方案--------------------
Using the Web Forms Print Manager 
Print function support
In Web Forms applications, output from supported PowerScript print functions is published as PDF files on the server side. These PDF files are visible in the client-side Web browser through links in the Web Forms Print Manager, and they can be printed on the client side. 

The following system print functions are supported in .NET Web Forms applications: Print, PrintCancel, PrintClose, PrintDefineFontDefine, PrintLine, PrintOpen, PrintOval, PrintPage, PrintRect, PrintRoundRect, PrintSetSpacing, PrintText, PrintWidth, PrintX, PrintY. PrintSetFont is also supported, but its return value is not the same as in a standard PowerBuilder application.

File operation output
You can use the DataWindow control's Print method to print a DataWindow object to a PDF file. Application users can open the PDF file in a separate browser instance by selecting the print result in the Print Manager. They can then print the PDF file using the File>Print menu of the browser. 

You can also use the SaveAs method to print DataWindows and their data as PDF or XSL files. These files are not visible in the Print Manager. However, you can call the DownloadFile function (in a conditional compilation block) to download these files, or application users can download them from the server using the Web Forms File Manager and then print them from a local browser or Adobe Reader application.

For information on the DownloadFile function, see DownloadFile. For information on the File Manager, see "Using the Web Forms File Manager".

Print Manager icon display
When supported print functions are used to print text in a Web Forms application, a printer icon displays in the right-top corner of the main browser window. 

Figure 5-1: Print icon on a Web Forms application 
 
The application user can click the icon to open the Web Forms application Print Manager. The Print Manager lets the application user open a window to view the printed output as PDF files.