【问题标题】:text field hyper links are not exported to ppt in jasperreportjasper 报告中的文本字段超链接未导出到 ppt
【发布时间】:2015-12-14 20:12:37
【问题描述】:

我有一个 jasper 报告,其中文本字段具有共享点文档的超链接。这些链接在报告和其他导出格式(如 excel 和 pdf)中工作得很好,但是当导出到 pptx 时,只有文本字段被导出但不是链接。 仅供参考——jasper 报告版本是 5.6.1 如果有人能解决我的问题,请帮忙。

【问题讨论】:

    标签: hyperlink jasper-reports


    【解决方案1】:

    我已经测试过了(hyperlinkType="Reference"),没有发现任何问题。

    这就是我导出到pptx的方式

    JRPptxExporter exporter = new JRPptxExporter();
    File outputFile = new File("test.pptx");
    exporter.setExporterInput(new SimpleExporterInput(print));
    exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(outputFile));
    SimplePptxReportConfiguration configuration = new SimplePptxReportConfiguration();
    configuration.setIgnoreHyperlink(false);
    exporter.setConfiguration(configuration);
    exporter.exportReport();
    

    如果您处于设计模式(因为它的设计模式),那么超级链接自然不起作用,您需要切换到演示模式 .

    如果您仍有问题,请发布与您的textField 定义相关的 jrxml 以及您用于导出到 pptx 的代码。

    【讨论】:

    • ,非常感谢。虽然我已将 ignorehyperlink 属性设置为 false,但我从来不知道链接仅在演示模式下工作。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多