Background1 / Background2 alternate color when Detail band is empty some times
Hi all,
I am new here so if I messed up the category feel free to move the discussion to the right place!
I am trying to achieve alterating background colors in the detail band using Detail.Background1.Brush.Color and Detail.Background2.Brush.Color.
This is working great so far, but I need to filter some detail bands and exclude them from printing. I set the visibility of the SubReport (located in the detail band with no other elements at all) in the Detail.BeforPrint event, based on a field in a database.
But as soon as a subreport is beeing skipped, the alternating detail band double prints one color, then proceeds to alternate. I think this is because the detail band is still visible and counting, but has a height of 0. Is there a proper way to manage this problem?
Image to describe the problem. Every line represents one detail band thus one supreport.
I am new here so if I messed up the category feel free to move the discussion to the right place!
I am trying to achieve alterating background colors in the detail band using Detail.Background1.Brush.Color and Detail.Background2.Brush.Color.
This is working great so far, but I need to filter some detail bands and exclude them from printing. I set the visibility of the SubReport (located in the detail band with no other elements at all) in the Detail.BeforPrint event, based on a field in a database.
But as soon as a subreport is beeing skipped, the alternating detail band double prints one color, then proceeds to alternate. I think this is because the detail band is still visible and counting, but has a height of 0. Is there a proper way to manage this problem?
Image to describe the problem. Every line represents one detail band thus one supreport.