ahjuxin.net
发表于 2022-10-24 08:02:02
还是待解决,你们技术人员说测试一下发个demo给我,但是到现在也没有发
:'(
Felix.Li
发表于 2022-10-24 10:05:00
本帖最后由 Felix.Li 于 2022-10-24 10:09 编辑
ahjuxin.net 发表于 2022-10-24 08:02
还是待解决,你们技术人员说测试一下发个demo给我,但是到现在也没有发
抱歉,我记得咱这边是想要预览的功能。写法可以在我之前的基础上加成下面的代码
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) => {
});
})
Felix.Li
发表于 2022-10-24 10:18:13
然后这种创建的应该是带有文件打开和另存为的
地址为文件发布的resources目录下
ahjuxin.net
发表于 2022-10-24 10:23:19
Felix.Li 发表于 2022-10-24 10:05
抱歉,我记得咱这边是想要预览的功能。写法可以在我之前的基础上加成下面的代码
api地址:https://www.gr ...
有中文的api嘛?
Felix.Li
发表于 2022-10-24 10:33:06
ahjuxin.net 发表于 2022-10-24 10:23
有中文的api嘛?
抱歉,我们暂时没有。目前只支持英文。
ahjuxin.net
发表于 2022-10-24 14:56:26
预览的时候会报错
ahjuxin.net
发表于 2022-10-24 15:41:42
报表参数在代码怎么设置进去呢?
Felix.Li
发表于 2022-10-24 17:46:30
上面那个问题可能我代码没有放全,你加一个:
let viewer = null;
在这些前面就可以了。
然后后面这个,您看明天方便嘛,明天咱们开一个腾讯会议,我大概给您说一下我这边怎么生成报表的json。然后放在template里面就可以了
ahjuxin.net
发表于 2022-10-25 07:56:25
Felix.Li 发表于 2022-10-24 17:46
上面那个问题可能我代码没有放全,你加一个:
let viewer = null;
在这些前面就可以了。
这个我看报错试着加过了,是这个问题
好的,静候佳音
Felix.Li
发表于 2022-10-25 11:12:54
ahjuxin.net 发表于 2022-10-25 07:56
这个我看报错试着加过了,是这个问题
好的,静候佳音
18408010129+李佳豪 邀请您参加腾讯会议
会议主题:Felix预定的会议
会议时间:2022/10/25 14:30-15:00 (GMT+08:00) 中国标准时间 - 北京
点击链接入会,或添加至会议列表:
https://meeting.tencent.com/dm/BdhgufyyKwAY
#腾讯会议:246-147-527
复制该信息,打开手机腾讯会议即可参与