Hiding a row with empty values

Stimulsoft Reports.WEB discussion
thalescouto
Posts: 10
Joined: Wed Jul 31, 2013 5:53 pm

Hiding a row with empty values

Post by thalescouto »

I've been trying to hide a row with two columns in a databand when one of the items is empty, but I cant find out how to do this.

Here is how my databand looks like in the Design:
databand.png
databand.png (16.87 KiB) Viewed 6237 times
I have set "SUBCATEGORIA" row enabled property to false (5th row). When I run the report, the row dont show up but turns into a white space.
databand2.png
databand2.png (9.4 KiB) Viewed 6237 times
What should I do so the report dont show the white space when every item in the row is disabled?

Thanks in advance.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Hiding a row with empty values

Post by HighAley »

Hello.

Please, read the Automatically Shifting Components section of our User Manual.

Thank you.
thalescouto
Posts: 10
Joined: Wed Jul 31, 2013 5:53 pm

Re: Hiding a row with empty values

Post by thalescouto »

Thanks for the reply, Aleksey!

I've read the section you said, but I still cant find out how to do what I want.

I'm attaching a sample report and a xml with some data to this post.

As you can see, I created a condition to the "City" row (City label and {Customers.City} data field) that will be set disabled when there's no data to display. When I run the report, this row is not displayed but turns into an empty space.
sample2.png
sample2.png (16.13 KiB) Viewed 6220 times
Could you please help me?

Thank you!
Attachments
Sample.rar
(4.13 KiB) Downloaded 332 times
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Hiding a row with empty values

Post by HighAley »

Hello.

The Shift Mode works if there is no data in the text component and Can Shrink property is set to true. But doesn't work if you disable component in the Conditions.
Here is a modified report template where you could see how to do it.
SampleReport_modified.mrt
(16.5 KiB) Downloaded 762 times
Thank you.
thalescouto
Posts: 10
Joined: Wed Jul 31, 2013 5:53 pm

Re: Hiding a row with empty values

Post by thalescouto »

Everything is working as I wanted.

Thank you
Andrew
Posts: 4109
Joined: Fri Jun 09, 2006 3:58 am

Re: Hiding a row with empty values

Post by Andrew »

Hello,

Thank you for letting us know about this.
thalescouto
Posts: 10
Joined: Wed Jul 31, 2013 5:53 pm

Re: Hiding a row with empty values

Post by thalescouto »

Hello Andrew,

I thought that everything was ok, but I found something wrong.

When there's more than one "Customer" in the report data and it has City value filled, the row height is shrinked to fit the font size.

Is there a way to make the row height the same as it was specified in the Design and still hide it when it has empty values?
Attachments
Sample.rar
(4.23 KiB) Downloaded 325 times
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Hiding a row with empty values

Post by HighAley »

Hello.

You could set the CanShrink property in the Before Print event of the text components to False if there is any value.

Thank you.
thalescouto
Posts: 10
Joined: Wed Jul 31, 2013 5:53 pm

Re: Hiding a row with empty values

Post by thalescouto »

Aleksey,

I did that and it's all good now.

Thank you again!
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Hiding a row with empty values

Post by HighAley »

Hello.

We are always glad to help you.
Let us know if you need any additional help.

Thank you.
Post Reply