JasperReports Server Pro - 在新的浏览器选项卡/窗口中打开报告 [英] JasperReports Server Pro - open reports in new browser tab/window

查看:107
本文介绍了JasperReports Server Pro - 在新的浏览器选项卡/窗口中打开报告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

JasperReports Server Pro 4.5 中,有没有办法强制程序在新的浏览器选项卡或窗口中打开报表/存储库元素?

In JasperReports Server Pro 4.5, is there any way to force the program to open reports/repository elements in a new browser tab or window?

推荐答案

您应该能够通过更新相关的JavaScript文件来强制解决这个问题,以强制所有内容在新标签页中打开。在JRS 4.5.1中,文件中的第766行... / jasperserver-pro / scripts / repository.search.actions.js

You should be able to fix that by updating the relevant JavaScript file to force everything to open in a new tab. In JRS 4.5.1 it's line 766 in the file .../jasperserver-pro/scripts/repository.search.actions.js

repositorySearch.RedirectAction.createRunResourceAction = function(resource, inNewTab) {
    if (!resource) {
        resource = resource ? resource : repositorySearch.model.getSelectedResources()[0];
    }

    var factoryMethod = repositorySearch.runActionFactory[resource.typeSuffix()];

    if (factoryMethod) {
        /* return factoryMethod(resource, inNewTab);  this was the original */
        return factoryMethod(resource, true);
    } else {
        return new repositorySearch.Action(function() {
            alert("Run action for resource type '" + resource.resourceType + "' is not implemented!");
        });
    }
};

我不能因为搞清楚而声称信用。感谢Igor Nesterenko提供此解决方案。

I cannot claim credit for figuring it out. Thanks to Igor Nesterenko for this solution.

这篇关于JasperReports Server Pro - 在新的浏览器选项卡/窗口中打开报告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆