Show/Hide Field Label
Show/Hide Field Label
I have a field label (Text54) that is next to a field with an expression in it (Text13). The expression is as follows {Substring(ContractOwners,0,(int)Length(ContractOwners)-2)} . The expression lists out contract owners, and ContractOwners is a variable where I'm capturing the names. Not all records have contract owners, so if the expression in Text13 doesn't have any data, or Text13 is empty I want to hide the label (Text 54).
I tried several things including conditions, but couldn't make Text54 appear when Text13 is populated or disappear when Text13 is empty. What do I need to do to turn Text 54 on or off depending on the contents of Text13.
I tried several things including conditions, but couldn't make Text54 appear when Text13 is populated or disappear when Text13 is empty. What do I need to do to turn Text 54 on or off depending on the contents of Text13.
Show/Hide Field Label
Hello,
Please send us your report with test data for analysis.
Thank you.
Please send us your report with test data for analysis.
Thank you.
Show/Hide Field Label
I can't send you a copy of the report with the data, since it contains sensitive information.
It should be simple-I just need to show or hide a label based on the contents of it's associated data field. If the data field is empty I want the label to hide. If there is data in the data field I want the label to show. Can't Stimulsoft do something that simple?
It should be simple-I just need to show or hide a label based on the contents of it's associated data field. If the data field is empty I want the label to hide. If there is data in the data field I want the label to show. Can't Stimulsoft do something that simple?
Show/Hide Field Label
Hello,
You can use Conditions - if data empty then set the ComponentIsEnabled property to false.
Thank you.
You can use Conditions - if data empty then set the ComponentIsEnabled property to false.
Thank you.
-
- Posts: 91
- Joined: Mon Oct 15, 2012 10:03 am
Re: Show/Hide Field Label
can u plz let me know, how to show and hide labels dynamically, On C# code can we access the reports instances like property or methods through which we can achieve this...
this is urgent ..... thanx in advance
this is urgent ..... thanx in advance
Re: Show/Hide Field Label
Hello,
You can use the following code:
Thank you.
You can use the following code:
Code: Select all
Stimulsoft.Report.Components.StiText text1 = report.GetComponents()["Text1"] as StiText;
text1.Enabled = false;
-
- Posts: 91
- Joined: Mon Oct 15, 2012 10:03 am
Re: Show/Hide Field Label
Thanx for ur great help... it's working ,
But there is another issue, If we do enable false for a label, the space taken by the label remain same
can we fill the empty space by the adjacent control
Thanks
But there is another issue, If we do enable false for a label, the space taken by the label remain same
can we fill the empty space by the adjacent control

Thanks
Re: Show/Hide Field Label
Hello.
Please, send us your report template with data for analysis.
Thank you.
Please, send us your report template with data for analysis.
Thank you.
-
- Posts: 91
- Joined: Mon Oct 15, 2012 10:03 am
Re: Show/Hide Field Label
This is the scenario
First i have created a .mrt file(report), with some labels like
|-------------------------------|
| lbl1 lbl2 |
| lbl3 lbl4 |
| lbl5 lbl6 |
| lbl7 lbl8 |
| lbl9 lbl10 |
| lbl11 lbl12 |
|-------------------------------|
I put some value on the label at the time of report creations and now I want to do enable false lbl1 and lbl2 on c# code,
with the help of above code achieved this.Both the labels are not displaying when report creates in pdf format. But when the labels (lbl1 and lbl2) are disable, the first row sets blank and empty row displays. I want to shift second row at first place, third row at second, fourth row at third and so on....
First i have created a .mrt file(report), with some labels like
|-------------------------------|
| lbl1 lbl2 |
| lbl3 lbl4 |
| lbl5 lbl6 |
| lbl7 lbl8 |
| lbl9 lbl10 |
| lbl11 lbl12 |
|-------------------------------|
I put some value on the label at the time of report creations and now I want to do enable false lbl1 and lbl2 on c# code,
with the help of above code achieved this.Both the labels are not displaying when report creates in pdf format. But when the labels (lbl1 and lbl2) are disable, the first row sets blank and empty row displays. I want to shift second row at first place, third row at second, fourth row at third and so on....
Re: Show/Hide Field Label
Hello,
Please try to set the CanShrink property to true.
Thank you.
Please try to set the CanShrink property to true.
Thank you.