本帖最后由 Felix.Li 于 2022-10-24 10:09 编辑
抱歉,我记得咱这边是想要预览的功能。写法可以在我之前的基础上加成下面的代码
api地址:https://www.grapecity.com/active ... nline/overview.html
- GrapeCity.ActiveReports.WebDesigner.renderApplication("ar-web-designer").then((api) => {
- var reportContent = Templates
- api.settings.preview = {
- canPreview: true,
- openViewer: (options) => {
- if (viewer) {
- viewer.openReport(options.documentInfo.id);
- return;
- }
- viewer = GrapeCity.ActiveReports.JSViewer.create({
- element: '#' + options.element,
- renderFormat: 'svg',
- reportService: {
- url: 'api/reporting',
- },
- reportID: options.documentInfo.id,
- settings: {
- zoomType: 'FitPage',
- },
- });
- }
- }
- api.documents.openById('NewReport.rdlx', { platform: 'rdlx', type: 'report', subType: 'cpl' }, 'NewReport', reportContent).then((rep) => {
- });
- })
复制代码
|