Change band height by code

  Hello, I have a problem when dynamically changing the height of a band (with name DetailCuer, is detail from another master), the band has an image and various texts and in the onbeforeprint event I check if a text field is empty, if so I make the band less high, if it has text I put the band at its normal height, the code is (I change text color to make sure the condition is ejecuted correctly):


procedure DetailCuerOnBeforePrint(Sender: TfrxComponent);
begin
 if (<CUERPOS."NOMITEM"> = '') then
 begin
 MemNomCuer.Color:= clRed;
 DetailCuer.Height:= 0.46;
 end else
 begin
 MemNomCuer.Color:= clSilver;
 DetailCuer.Height:= 2.5; 
 end;
end;

but this code does not work, it overlaps the texts of several bands and does not correctly show the assigned height. Is there anything special that i should consider when changing the height of a band ?, thanks


Comments

  • 0.46 or 2.5 pixels is too small. Use 2.5 * fr1cm

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.