我在httphandler中实现了一个自定义Active Reports服务器,它可以使用AR运行时(excel,html,PDF,...)生成和导出各种格式的报告。我现在正在尝试使用JavaScript HTML5查看器,但它似乎与任何明显的导出格式都不兼容。文档和示例都显示了使用HTML5查看器和实际的Active Reports服务器产品,并且没有将其与自定义报表服务一起使用的示例。
客户代码:
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());
答案 0 :(得分:0)
据我了解,您有两个要求: (请参阅我的论坛帖子,了解以下每项要求)
>>>>将HTML5Viewer与CustomReportService一起使用 http://arhelp.grapecity.com/groups/topic/rdlx-and-web-config/#post-658924 http://arhelp.grapecity.com/groups/topic/crystal-report-object-data-source-html5/#post-660665
>>>>在HTML5Viewer中实现自定义导出
http://arhelp.grapecity.com/groups/topic/csv-export-from-html5-viewer/#post-658376 http://arhelp.grapecity.com/groups/topic/html5-viewer-export-to-xlsx/#post-657866 http://arhelp.grapecity.com/groups/topic/export-to-rtf-using-html5-viewer/#post-656001
如果这不适合您,或者您有任何其他问题,请告诉我。
此致 的Reema