Page 1 of 1
Hide text conditionaly
Posted: Wed Feb 21, 2007 9:22 am
by Claudio Maccari
How can I hide/show a StiText on the report ?
The control does not have a Visible property
Many thank
Hide text conditionaly
Posted: Wed Feb 21, 2007 9:38 am
by EDV Gradl
Text.Enabled = true / false ??
Hide text conditionaly
Posted: Thu Feb 22, 2007 3:31 am
by Edward
You can do it in the BeforePrintEvent of the DataBand or any other band on which the StiText component is placed.
Thank you.
Hide text conditionaly
Posted: Thu Feb 22, 2007 2:28 pm
by Vital
For also you can use property Conditions of this text component.
Thank you.
Hide text conditionaly
Posted: Tue May 29, 2007 11:39 pm
by nelson chai
Hi,
I can Hide StiText Using BeforePrintEvent but StiText = "" it can't work. Only StiText = " " it's work. (got a space inside)
Another things is StiText is in Databand. I set Databand to AutoShrink. The StiText i want to hide is in the last row.
But it can't Auto Shrink.
I think the problem is at StiText cause it's value " ".
In this case, how to solve this kind of problem?
Thanks.
Regards,
Nelson Chai
Hide text conditionaly
Posted: Wed May 30, 2007 2:12 am
by Edward
nelson wrote:Another things is StiText is in Databand. I set Databand to AutoShrink. The StiText i want to hide is in the last row.
But it can't Auto Shrink.
I think the problem is at StiText cause it's value " ".
In this case, how to solve this kind of problem?
Yes, it is true.
If Text1.
TextValue contains " " value then such component will not be shrunken to zero height.
You can set Text property of the text component in the following way:
Code: Select all
{Line==Categories.Count?String.Empty:Categories.CategoryID.ToString()}
In that case text component from the last row printed will contain an empty string inside. If you set
CanShrink property of the DataBand and of the Text component on it in true then the last row will disappear.
Thank you.
Hide text conditionaly
Posted: Wed May 30, 2007 11:08 pm
by nelson chai
Hi,
I'm using VB.Net.
If Fields Label is stiText, How do i hide it?
For eg, Name : Steven Tan -> Format (Label : FieldValue)
How to hide label "Name" when FieldValue is empty?
Thanks a lot.
Regards,
Nelson Chai
Hide text conditionaly
Posted: Wed May 30, 2007 11:14 pm
by nelson chai
Hi,
Thanks for your previous advice.
Another question...
I'm using VB.Net.
If Fields Label is stiText, How do i hide it?
For eg, Name : Steven Tan -> Format (Label : FieldValue)
How to hide label "Name" when FieldValue is empty?
Thanks a lot.
Regards,
Nelson Chai
Hide text conditionaly
Posted: Thu May 31, 2007 2:01 pm
by Vital
For example:
Code: Select all
{IIF(FieldValue.Length = 0, "", FieldValue.ToString()}
Thank you.