我在一个httphandler中实现了一个自定义Active Reports服务器,它可以使用AR运行时(excel,html,PDF, ...)。我现在试图使用JavaScript HTML5查看器,但它似乎与任何明显的导出格式不兼容。文档和示例都显示了将HTML5查看器与实际的Active Reports服务器产品结合使用的情况,并且没有将它与自定义报告服务结合使用的示例。哪些Active Reports导出类型适用于HTML5 JavaScript查看器
客户端代码:
var viewer = GrapeCity.ActiveReports.Viewer(
{
element: '#reportViewer',
report: {
id: "report1.rdlx"
},
reportService: {
url: /MyCustomReportService/reports.mrs?msg={....}
},
uiType: 'desktop'
});
服务器代码:
request.context.Response.ContentType = "image/gif";
MemoryStream memoryStream = new MemoryStream();
report.Document.Save(memoryStream);
context.Response.BinaryWrite(memoryStream.ToArray());
也试过
request.context.Response.ContentType = "message/rfc822";
HtmlExport html = new HtmlExport();
html.OutputType = HtmlOutputType.DynamicHtml;
MemoryStream memoryStream = new MemoryStream();
html.Export(report.Document, memoryStream);
request.context.Response.BinaryWrite(memoryStream.ToArray());