【问题标题】:Non-fixed width text in a static string - Jasper Reports静态字符串中的非固定宽度文本 - Jasper 报告
【发布时间】:2012-02-17 06:27:57
【问题描述】:

正如我从这篇文章中了解到的:How to stretch a text field relative to data width in Jasper Reports 无法拉伸文本字段的宽度。所以我现在正在尝试确定是否可以在文本字段中嵌入静态文本?

我需要实现这样的场景:

“您是当前雇主 [非固定宽度文本] 将与您联系 很快。”

谁能建议在 Jasper 中执行此操作的方法?我完全没有想法。

【问题讨论】:

    标签: java jasper-reports width field


    【解决方案1】:

    您需要一个具有如下值的文本字段:

    "Your current employer, " + $F{Employer} + ", will contact you soon."
    

    或者,像这样:

    msg("Your current employer, {0}, will contact you soon.", $F{Employer})
    

    还有其他可能性……但这些是最常见的。简而言之,这很常见。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-01-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-09-13
      • 1970-01-01
      • 1970-01-01
      • 2023-03-31
      相关资源
      最近更新 更多