0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

【SpringBoot】JasperReportsの「Print When Expression」プロパティの注意事項

Posted at

はじめに

SpringBootに依存した話ではないですが、JasperReportsのデザイナ環境でよく使われる各要素の「Print When Expression」プロパティについての備忘録です。

この記事内容の作業目的

小一時間浪費したので備忘録。「Print When Expression」プロパティに言及した日本語情報はいくつかありますが、Javaを常用しているひとには既定のお話でとくに強調はされない、Java以降のC#やTypeScriptとか使っているとつい忘れてしまいがちな点。

この記事内容の作業環境

Windows10 21H2
VSCode(Visual Studo Code)
java 11
SpringBoot
JasperReports 6.12
jusperStudio 6.12

この記事内容の保証

※この記事には設定的な情報が含まれます。あらゆる条件下でも書かれた内容の妥当性を保証するものではありません。

設定のポイント

各要素の「Print When Expression」プロパティに設定する条件式はJavaで動いている。そのため、文字列同士A,Bの比較では

A == B や A != B では常に不成立となる。こう書いてもコンパイル時にエラーにはならず実行時に意図した動作にはならない。

A.equals(B) や !A.equals(B) で正常判定される。

参考リンク

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?