Adding conditional spacing between data.
-
- Posts: 19
- Joined: Tue Jan 06, 2015 7:39 pm
Adding conditional spacing between data.
Hi, I'm trying to solve this very simple issue for several hours.
I need to skip a line, or add a space above registers that has the Data.Alive == true, when the Data2.Skip == true too.
Ex:
Id Name Type Alive
1 Raphael Master True
2 Leonardo Master True
3 Donatello Slave False
4 Michellangelo Slave False
5 Splinter Master False
6 Shredder Master True
And so on...
My report layout is very simple too: just a Group header band with one condition (grouping by Masters), and the data band showing the data.
I really tryed a lot of things before asking here... I know it seems very simple, but i couldn't solve it yet. What would be the best approach to do it?
Thank you.
EDIT: Solved it.
I need to skip a line, or add a space above registers that has the Data.Alive == true, when the Data2.Skip == true too.
Ex:
Id Name Type Alive
1 Raphael Master True
2 Leonardo Master True
3 Donatello Slave False
4 Michellangelo Slave False
5 Splinter Master False
6 Shredder Master True
And so on...
My report layout is very simple too: just a Group header band with one condition (grouping by Masters), and the data band showing the data.
I really tryed a lot of things before asking here... I know it seems very simple, but i couldn't solve it yet. What would be the best approach to do it?
Thank you.
EDIT: Solved it.
Last edited by Paulo Lemos on Fri Jan 16, 2015 8:06 pm, edited 1 time in total.
-
- Posts: 19
- Joined: Tue Jan 06, 2015 7:39 pm
Re: Adding conditional spacing between data.
Can I set the Height, or some other property of the band with a expression?
Ex:
Set GroupHeaderBand: Masters Height to 1.6 when the register shown on it is Data.Alive == true.
Actually, setting Band and Label properties with expressions would solve 90% of all my problems with Stimulsoft. Is it possible?
Ex:
Set GroupHeaderBand: Masters Height to 1.6 when the register shown on it is Data.Alive == true.
Actually, setting Band and Label properties with expressions would solve 90% of all my problems with Stimulsoft. Is it possible?
-
- Posts: 19
- Joined: Tue Jan 06, 2015 7:39 pm
Re: Adding conditional spacing between data.
Finally, after a day trying it, I could solve it myself. I added a second GroupHeaderBand above the another one, with the same conditions to group by Master, but with the condition to only enable it if the value of Data2.Skip == true AND Data.Alive == true.
But my other question remains, about setting properties with expressions.
Thank you.
But my other question remains, about setting properties with expressions.
Thank you.
Re: Adding conditional spacing between data.
Hello,
Please try to set the bands Height property in the BeforePrint events.
Thank you.
Please try to set the bands Height property in the BeforePrint events.
Thank you.
-
- Posts: 19
- Joined: Tue Jan 06, 2015 7:39 pm
Re: Adding conditional spacing between data.
My question is exactly that. How do I set properties with expressions. What do I need to write in the BeforePrint event to set the height or any other property of some component? Can you send me an example?Aleksey wrote:Hello,
Please try to set the bands Height property in the BeforePrint events.
Thank you.
Thank you.
-
- Posts: 19
- Joined: Tue Jan 06, 2015 7:39 pm
Re: Adding conditional spacing between data.
I will test it. Thanks a lot!Aleksey Andreyanov wrote:Hello.
You could use code like next:Thank you.Code: Select all
Text1.Height = 3;
Re: Adding conditional spacing between data.
Hello,
Let us know if you need any additional help.
Let us know if you need any additional help.
-
- Posts: 19
- Joined: Tue Jan 06, 2015 7:39 pm
Re: Adding conditional spacing between data.
Hi Aleksey!Aleksey wrote:Hello,
Let us know if you need any additional help.
I tried to set the "Before Print" event of a GroupHeaderBand with the follow expression:
data.SpacesBetweenAlive == true ? Text1.Height = 3 : Text1.Height = 1
And many other variations without success.
I hope you can understand what I'm trying to do here: to set Height and any other property by conditional expressions.
If you could please send me some example doing it or teach me how to write it properly, would be great. If this can't be done by expressions, but you can set any property values on the "condition" property somehow, would work for me too.
Thank you.
Re: Adding conditional spacing between data.
Hello.
We are sending you a sample report template. Thank you.
We are sending you a sample report template. Thank you.