Drawing columns

edited October 2018 in FastReport 4.0
Hi to all,


I am drawing columns in a invoice using an overlay band named body with that procedure executed in a OAP event of the overlay:
procedure draw_columns;
var
  idx:integer;
  obj:TfrxShapeView;
   
begin
  for idx:=0 to header.objects.count-1 do
  begin
    obj:=TfrxShapeView(header.objects[idx]);
    if obj.tagstr='COLUMN' then
    begin
      with TfrxShapeView.create(body) do
      begin      
        left:=obj.left;
        top:=header.height;  
        width:=obj.width;
        If (<Page><><TotalPages>) Then            
        height:= engine.pageheight-header.height-footer.height+160;
        if Engine.FinalPass and (<Page> = <TotalPages>) then            
        height:= engine.pageheight-header.height-footer.height-160;            
     end;
   end;
end;

My pages are well drawed but I need the last page to be drawed with a reduced height than the previous pages this is why I tried with that line without result
If Engine.FinalPass and (<Page> = <TotalPages>) then  
 height:= engine.pageheight-header.height-footer.height-160;


Nothing happens with just
if (<Page> = <TotalPages>) then

Can you please help me ?

Comments

  • gpigpi
    edited 1:00AM
    FR's engine doesn't allow to change page's dimensions during report's preparing
  • edited October 2018
    I am not changing the page's dimensions but changing columns height in the page.

    Sorry I didn't explain correctly I mean my columns are well drawed instead of my pages are well drawed
    So it is not the page I want to reduce but the columns height.

    I found this code years ago in the FR binaries I have just added the following line:
    if Engine.FinalPass and (<Page> = <TotalPages>) then
    

Leave a Comment