Page 1 of 1

Hide fields

Posted: Wed May 23, 2007 3:38 am
by Chan Kuan Leang
Hi,

Can I know how do hide fields if there is no data?

For example, I have 2 fields side by side. One is DiscountLabel, another is DiscountAmount.

So can i hide both fields if DiscountAmount is $0 or null?

Can someone teach me that?

Thank you.

Hide fields

Posted: Wed May 23, 2007 3:45 am
by Stéphane
I think there is two ways to do this :

- you can set the Enabled properties of your two text components in the BeforePrintEvent of the DataBand
- or, you can use the property Conditions of the text component

Hide fields

Posted: Wed May 23, 2007 4:18 am
by Chan Kuan Leang
kakone wrote:I think there is two ways to do this :

- you can set the Enabled properties of your two text components in the BeforePrintEvent of the DataBand
- or, you can use the property Conditions of the text component
I am very new to this StimulReport. Is there any example you can show it. So sorry to trouble you.

Hide fields

Posted: Wed May 23, 2007 4:27 am
by Stéphane
Look at the Highlight Condition report in the Demo program (Basic reports).

Look at the Text1 component in the dataBand, and instead of setting the color in red (into the Conditions property), you can uncheck the visible property.

Hide fields

Posted: Wed May 23, 2007 5:13 am
by Stéphane
For your DiscountAmount field, you can also set the HideZeros property of the StiText component to true.

Hide fields

Posted: Wed May 23, 2007 10:54 am
by Chan Kuan Leang
kakone wrote:For your DiscountAmount field, you can also set the HideZeros property of the StiText component to true.
Thank you so much. Helps me to solve this problem.

Thank you!!