Hi Guys
Complete beginner here... just need to change one thing on my current report.
I need to change the following so that each number 1: 2: 3: says instead 1 week: 2 weeks: 3 weeks: and so forth...
Below is what I currently have - all works fine part of the report but just reports out the number. I need to it say the text aswell...
$F{priceModel}.equals("1 day week") ?
(
$F{timeQty} >= 1 && $F{timeQty} <= 7 ?
1 :
$F{timeQty} >= 8 && $F{timeQty} <= 14 ?
2 :
$F{timeQty} >= 15 && $F{timeQty} <= 21 ?
3 :
$F{timeQty} >= 22 ?
4 :
$F{timeQty}
)
:
Thanks Guys! Any help would be apprecaited!
Thanks!
1 Answer:
Posted on May 13, 2020 at 1:15pm
You can use the built-in TEXT() function to convert the number to a string.
$P{timeQty} >= 1 && $P{timeQty} <= 7 ? "1 week" : $P{timeQty} >= 8 && $P{timeQty} <= 14 ? "2 week" : $P{timeQty} >= 15 && $P{timeQty} <= 21 ? "3 week" : $P{timeQty} >= 22 ? "4 week" : TEXT($P{timeQty},"#,###")