Search code examples
c#reporting-servicesdevexpressreportxtrareport

Xtrareports Bands Size and Location


How could I set at runtime my bands size and location ?

Bands.Add(_reportHeader);
_reportHeader.Height = 300;
Bands.Add(_pageHeader);
_pageHeader.LocationF = new PointF(0, _reportHeader.HeightF);

When I do this, the heightf and locationf of both bands dont change, they keep constant.


Solution

  • You dont need to worry about the automatic size, since the bottom most control will say what size the band will have. For automatic sizing, just do like this:

    _reportHeader.HeightF = 0f;
    Bands.Add(_reportHeader);
    _pageHeader.HeightF = 0f;
    Bands.Add(_pageHeader);