Hello Stimulsoft,
is it possible to define a condition for a StiText-Component which is placed in a GroupHeaderBand so that the text component is only enabled / shown if the group is expanded?
Thanks and regards
Thorsten Pontow
Condition for Text-Component in GroupHeaderBand
Condition for Text-Component in GroupHeaderBand
- Attachments
-
- Group Header is expanded and it is ok to see the text.
- GroupHeaderExpanded.png (11.8 KiB) Viewed 2618 times
-
- Group Header is collapsed and the text should now be hidden.
- GroupHeaderCollapsed.png (10.85 KiB) Viewed 2618 times
Thorsten Pontow
It is easier to write an incorrect program than to understand a correct one. (Alan J. Perlis, Epigrams in programming No. 7)
It is easier to write an incorrect program than to understand a correct one. (Alan J. Perlis, Epigrams in programming No. 7)
Re: Condition for Text-Component in GroupHeaderBand
Hello,
In this case, you can place Text components from GroupHeader on the DataBand and by Condition show it only for the first line.
Thank you.
In this case, you can place Text components from GroupHeader on the DataBand and by Condition show it only for the first line.
Thank you.
Re: Condition for Text-Component in GroupHeaderBand
Is it then shown (with expanded Group) on following pages after page break as it is when i place it in Group header? Should Condition be (GroupLine == 1 => textComponent is enabled)?
Thorsten Pontow
It is easier to write an incorrect program than to understand a correct one. (Alan J. Perlis, Epigrams in programming No. 7)
It is easier to write an incorrect program than to understand a correct one. (Alan J. Perlis, Epigrams in programming No. 7)
Re: Condition for Text-Component in GroupHeaderBand
Hello,
Please send us a sample report which reproduces the issue for analysis.
Thank you.
Please send us a sample report which reproduces the issue for analysis.
Thank you.
Re: Condition for Text-Component in GroupHeaderBand
Hi Alex,
thanks for your response. Meanwhile i found a solution that works for me. I used the GetTag-Event for components in compiled Report.
In the Event handler i use:
Kind regards
Thorsten Pontow
thanks for your response. Meanwhile i found a solution that works for me. I used the GetTag-Event for components in compiled Report.
Code: Select all
dataBandComponent.GetTag += ChangeComponentAppearanceByCellInformation;
Code: Select all
if (textComponent.Parent is StiGroupHeaderBand groupHeaderBand)
{
bool collapsed = StiDataBandV2Builder.IsCollapsed(groupHeaderBand, false);
if (textComponent.Name.StartsWith("GroupHeaderText"))
{
textComponent.Enabled = !collapsed;
}
Thorsten Pontow
Thorsten Pontow
It is easier to write an incorrect program than to understand a correct one. (Alan J. Perlis, Epigrams in programming No. 7)
It is easier to write an incorrect program than to understand a correct one. (Alan J. Perlis, Epigrams in programming No. 7)
Re: Condition for Text-Component in GroupHeaderBand
Hello,
Thank you for the provided solution.
Thank you for the provided solution.