Hide row in the Databand

Stimulsoft Reports.NET discussion
Post Reply
jjc
Posts: 97
Joined: Mon Apr 19, 2010 10:14 pm

Hide row in the Databand

Post by jjc »

Hi ,
i have in a databand 3 fields that retrieve data from the database:
1 - FlightDescription;
2 - EconomicHigh_Adult (decimal);
3 - EconomicHigh_Child (decimal);

so when the value (price) of the fields EconomicHigh_Adult and EconomicHigh_Child equal to 0 (zero) i wish the current row is not enabled in the report , i tried many way (Conditions,BeforePrintEvent)to do this task but i couldn't work out it.

How i can do to perform this task correctly?

Thanks so much for your attention.

Cheers
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Hide row in the Databand

Post by Alex K. »

Hello,

You can use the conditions. Please see the sample report in attachment.

Thank you.
Attachments
796.SampleReport.mrt
(13.51 KiB) Downloaded 664 times
jjc
Posts: 97
Joined: Mon Apr 19, 2010 10:14 pm

Hide row in the Databand

Post by jjc »

Hi Aleksey ,
thanks for your example but i can't work out the situation in my case ,i explain you why;

i have to Report Page "Page1" and "Page2" , in the "Page2" there is the Anchors of the Report and in the "Page1" there is the Data .
in the "Page1" i have a DataBand "Databand1" that show all info about Hotels ,in the Condition of "DataBand1" i use this code to hide the row as follow :

Code: Select all

HotelRoom_TBL.SGL_LowSeason == 0 || HotelRoom_TBL.SGL_LowSeason == null && HotelRoom_TBL.DBL_LowSeason == 0 ||HotelRoom_TBL.DBL_LowSeason == null &&  
HotelRoom_TBL.TPL_LowSeason == 0 || HotelRoom_TBL.TPL_LowSeason == null && HotelRoom_TBL2.SGL_HighSeason == 0 ||HotelRoom_TBL2.SGL_HighSeason == null &&
HotelRoom_TBL2.DBL_HighSeason == 0 ||HotelRoom_TBL2.DBL_HighSeason == null && HotelRoom_TBL2.TPL_HighSeason  == 0 ||HotelRoom_TBL2.TPL_HighSeason  == null &&
HotelRoom_TBL3.SGL_PeakSeason == 0 || HotelRoom_TBL3.SGL_PeakSeason == null && HotelRoom_TBL3.DBL_PeakSeason == 0 || HotelRoom_TBL3.DBL_PeakSeason == null &&  
HotelRoom_TBL3.TPL_PeakSeason == 0 ||HotelRoom_TBL3.TPL_PeakSeason == null && Hotel_Meals_TBL._24Dec == 0 || Hotel_Meals_TBL._24Dec == null &&
Hotel_Meals_TBL._31Dec == 0 || Hotel_Meals_TBL._31Dec == null && Hotel_Meals_TBL.Breakfast == 0 ||Hotel_Meals_TBL.Breakfast == null &&
Hotel_Meals_TBL.Dinner == 0 || Hotel_Meals_TBL.Dinner == null && Hotel_Meals_TBL.Lunch == 0 ||Hotel_Meals_TBL.Lunch == null &&
HotelRoom_TBL4.SGL_TopPeakSeason == 0 || HotelRoom_TBL4.SGL_TopPeakSeason == null && HotelRoom_TBL4.DBL_TopPeakSeason == 0 ||
HotelRoom_TBL4.DBL_TopPeakSeason == null && HotelRoom_TBL4.TPL_TopPeakSeason == 0 || HotelRoom_TBL4.TPL_TopPeakSeason == null &&
HotelRoom_TBL5.SGL_ShoulderSeason == 0 || HotelRoom_TBL5.SGL_ShoulderSeason == null && HotelRoom_TBL5.DBL_ShoulderSeason == 0 ||
HotelRoom_TBL5.DBL_ShoulderSeason == null && HotelRoom_TBL5.TPL_ShoulderSeason == 0 ||HotelRoom_TBL5.TPL_ShoulderSeason == null
so if it is true the Row of DataBand1 is Hidden(the Component is not Enabled),this Conditions is right infact the DataBand 1 hide the Rows but in the report "Page2" i have another Databand "DataHotel_Meals_TBL" that show the name of the Hotel and in the Conditions i use the same code above to hide the Rows but it is not right infact it shows the Row and set the page "Page 0".

Do you have any help about this error?

Thanks so much for your attention.

Have a good time.

Cheers
jjc
Posts: 97
Joined: Mon Apr 19, 2010 10:14 pm

Hide row in the Databand

Post by jjc »

Hi ,
i could find out a solution about this trouble ,i should add other DataBands(with the property Enabled =false) in the report "Page1" and create a relationship with the DataBand "DataHotel_Meals_TBL" so it can hide the Row without value.

Thanks so much for your attention.

Have a good time.

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

Hide row in the Databand

Post by Andrew »

Ok!

Have a nice day!
Post Reply