Change the size of text field if the data does not exist

Сonversation on different topics
Post Reply
Maria_Vaht
Posts: 3
Joined: Sat Sep 16, 2023 12:10 pm

Change the size of text field if the data does not exist

Post by Maria_Vaht »

Hello!

Here I have DataBand with text fields inside. I would like to do the next: the text field which displays MAIN.SEC_PRICE_LAST (yellow) should be hidden if MAIN.SEC_PRICE_LAST is null. Also the height of text field which shows MAIN.SEC_PRICE_FIRST (green) should be stretched to the height of DataBand.
Image

This is how the result looks like now:
Image

The left result is okay but in case when MAIN.SEC_PRICE_LAST is null I would like the report to look as follows:
Image

I would appreciate any assistance. Thank you!
Lech Kulikowski
Posts: 6271
Joined: Tue Mar 20, 2018 5:34 am

Re: Change the size of text field if the data does not exist

Post by Lech Kulikowski »

Hello,

Please send us a sample report with test data that reproduces the issue for analysis.

Thank you.
Maria_Vaht
Posts: 3
Joined: Sat Sep 16, 2023 12:10 pm

Re: Change the size of text field if the data does not exist

Post by Maria_Vaht »

Lech Kulikowski wrote: Mon Sep 18, 2023 10:47 am Hello,

Please send us a sample report with test data that reproduces the issue for analysis.

Thank you.
REPORT_REG_OTHER_OPER support.mrt
(21.43 KiB) Downloaded 110 times
Lech Kulikowski
Posts: 6271
Joined: Tue Mar 20, 2018 5:34 am

Re: Change the size of text field if the data does not exist

Post by Lech Kulikowski »

Hello,

> the text field which displays MAIN.SEC_PRICE_LAST (yellow) should be hidden if MAIN.SEC_PRICE_LAST is null.

You can use the expression for the Enabled property:
MAIN.SEC_PRICE_LAST != ""

> Also the height of text field which shows MAIN.SEC_PRICE_FIRST (green) should be stretched to the height of DataBand.

You can set the GrowToHeight property for the MAIN.SEC_PRICE_FIRST text component.

Thank you.
Attachments
ReportSample.mrt
(7.37 KiB) Downloaded 131 times
Maria_Vaht
Posts: 3
Joined: Sat Sep 16, 2023 12:10 pm

Re: Change the size of text field if the data does not exist

Post by Maria_Vaht »

Lech Kulikowski wrote: Mon Sep 18, 2023 8:47 pm Hello,

> the text field which displays MAIN.SEC_PRICE_LAST (yellow) should be hidden if MAIN.SEC_PRICE_LAST is null.

You can use the expression for the Enabled property:
MAIN.SEC_PRICE_LAST != ""

> Also the height of text field which shows MAIN.SEC_PRICE_FIRST (green) should be stretched to the height of DataBand.

You can set the GrowToHeight property for the MAIN.SEC_PRICE_FIRST text component.

Thank you.
Thank you very much, I solved it! :)
Lech Kulikowski
Posts: 6271
Joined: Tue Mar 20, 2018 5:34 am

Re: Change the size of text field if the data does not exist

Post by Lech Kulikowski »

Hello,

You are welcome.
Post Reply