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 11:21PM
    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

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.