from 4 days i am trying to work out a task but i can't so i am here to share my problem .
In my report i have a Databand and retrieve data from Hotel,the design of this Databand is a bit complicated because i have 6 Panels (with 6 Databands ) into this Databand .Each Hotel has 3 Periods ("Low","High","Peak") with the Room's Price that list the price of the rooms in different period (the Room's Price are different choosing the period,i.e. in the "Low" period the price is cheaper than "Peak" period ),but not all Hotel got 3 Periods ,infact there are Hotels got only 1 period so here there is the problem when i choose some Hotel with just 1 period("High") i wish hide the databand that retrieve the data of "Low" and "Peak" period but i can't perform this task ; in this case i wish hide in the Report the Databand that show the "Low" period using this code in the Events Before Print :
Code: Select all
if( DataHotelPeriod_TBL.Count == 0)
{DataHotelPeriod_TBL.Enabled= false;
Panel1.Enabled = false;
Panel1.Printable = false;
DataBand10.Enabled= false;
Panel10.Enabled = false;
//Panel6.Border.Side = StiBorderSides.None;
}
else
{DataHotelPeriod_TBL.Enabled = true;
//Panel6.Border.Side = StiBorderSides.All;
Panel1.Enabled = true;
Panel1.Printable = true;
DataBand10.Enabled= true;
Panel10.Enabled = true;
}
I hope you can understand my problem ,however i will send you the Project file with the database so you can understand better my problem.
Thanks so much for your attention.
Have a good day.
Cheers