Test on null value

Stimulsoft Reports.JS discussion
Post Reply
fabien
Posts: 23
Joined: Thu Jul 15, 2021 9:07 am

Test on null value

Post by fabien »

Hi,

we enable or disable panel with a condition on a null value.

Files attached :
- liste.mrt : report.
- data.json : data used to produce report.
- Line_type_1.png : expression to filter type 1.
- Line_type_2.png : expression to filter type 2.
- export.png : incorrect pdf export

lines with order 1, 3 and 4 should have "CASSOULET CREOLE AU COCO", "BOITE TRANSLUCIDE PP 37,5CL /500" and "ARABIS caucasica" captions. This the expression in Line_type_1.png who contains artgrilleval_lib1 == null
lines whith order 5 should have "ENSEIGNE DE TROTTOIR DIBOND SUR PIED RES" caption. This the expression in Line_type_2.png who contains artgrilleval_lib1 != null

I think expression are incorrect but i don't understand where is my error.
I've unchecked "Convert nulls" on report component.

Thanks,

Fabien
Attachments
piece.mrt
(32.14 KiB) Downloaded 286 times
Line_type_2.png
Line_type_2.png (99.72 KiB) Viewed 4682 times
Line_type_1.png
Line_type_1.png (77.2 KiB) Viewed 4682 times
export.png
export.png (77.02 KiB) Viewed 4682 times
data.json
(3.73 KiB) Downloaded 278 times
Lech Kulikowski
Posts: 7295
Joined: Tue Mar 20, 2018 5:34 am

Re: Test on null value

Post by Lech Kulikowski »

Hello,

Your column is a string, please check the following expressions:
{lignepiece.lignepiece_lib == ""}

Thank you.
fabien
Posts: 23
Joined: Thu Jul 15, 2021 9:07 am

Re: Test on null value

Post by fabien »

Hi,

It works.
it is important to know that the test should be done with double quotes and not single quotes.

Thanks,

Fabien.
Lech Kulikowski
Posts: 7295
Joined: Tue Mar 20, 2018 5:34 am

Re: Test on null value

Post by Lech Kulikowski »

Hello,

You are welcome.
Post Reply