本帖最后由 Crystal.Li 于 2021-10-28 09:29 编辑
MVC 调用直接打印代码显示空白。
代码如下:
var reportId = request('reportId');
var isPrint = request('isPrint');
reportId = decodeURI(reportId);
var viewer = GrapeCity.ActiveReports.JSViewer.create({
element: '#viewerContainer',
reportID: reportId,
localeUri: top.$.rootUrl + '/Content/GrapeCity/custom-locale-zh.json',
availableExports: ['Xml', 'Pdf', 'Excel'],
reportService: {
url: top.$.rootUrl + '/api/reporting'
},
documentLoaded: function () {
viewer.print(false);
},
});
|