请教:在浏览器中输入网址http://127.0.0.1/Reports/ckd.htm浏览Excel报表转换成的网页报错,如截图所示
HttpRequest事件代码设置为:
If
e.Path.StartsWith("Reports\")
e.ResponseEncoding
= "gb2312"
Select
Case e.Path
Case "Reports\ckd.htm"
Dim Book As New XLS.Book(ProjectPath &
"Attachments\出库单.xls")
e.WriteBookAsHTML(Book)
Case "Reports\jianli.htm"
Dim Book As New XLS.Book(ProjectPath &
"Attachments\资料卡.xls")
e.WriteBookAsHTML(Book)
Case
Else
e.AsReportServer("Reports\")
End
Select
End
If
-----
将HttpRequest事件中的代码直接修改为e.WriteString("Hello World"),浏览器中可以正常显示。
此主题相关图片如下:qq截图20200409141949.jpg
[此贴子已经被作者于2020/4/9 14:26:49编辑过]