How to print/show text/object based in condition?

Stimulsoft Reports.JS discussion
Post Reply
rodrigorodrigues
Posts: 11
Joined: Mon Aug 01, 2016 11:25 pm

How to print/show text/object based in condition?

Post by rodrigorodrigues »

Hi, there are some components in my report and I'd like to show/hide them according some conditions, example, I have the text with expression Name : {data.name}, the output is Name : RODRIGO, but, sometimes the data.name is not defined and I'd like to hide that text component, how can I check this condition and hide components in report based in conditions?
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: How to print/show text/object based in condition?

Post by HighAley »

Hello.

The answer depends on many moments.
You could use the Filter to hide empty names, or you could use the Conditions.
We could give you more detailed answer if you send us your report template with sample data and describe what you need to hide more detailed.

Thank you.
rodrigorodrigues
Posts: 11
Joined: Mon Aug 01, 2016 11:25 pm

Re: How to print/show text/object based in condition?

Post by rodrigorodrigues »

Hello, see the atachments, I need to hide the "text" object based in some condition, this case, if the data field has a value.

If I insert code inside the report I guess I can set hide or visible any objects.
Attachments
test.json
(26 Bytes) Downloaded 208 times
Report.mrt
(1.24 KiB) Downloaded 296 times
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: How to print/show text/object based in condition?

Post by Alex K. »

Hello,

Please try to add Condition with "Component Is Enabled" option.

Thank you.
Attachments
Capture.PNG
Capture.PNG (45.66 KiB) Viewed 3682 times
Post Reply