linjw 发表于 2021-10-28 09:08:53

MVC 调用直接打印代码显示空白。

本帖最后由 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);

      },

    });


Crystal.Li 发表于 2021-10-28 09:08:54

您这个方法参数里不要传false。文档:https://www.grapecity.com/activereportsnet/docs/v15/online/print-in-jsviewer.html

页: [1]
查看完整版本: MVC 调用直接打印代码显示空白。