I'd like to add something like "amount carried forward" at the end of a
page, when the details are continued on the next page. How would I set that
up best I can't figure out how to control the pagebreak withn the
detailband.
Thank you for any help
Klaus Westphalen
Comments
that would be handy for you. www.bancoems.com/RBAddon.htm
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
thanks
English - isn't there another workaround with the standard tools ??
next page, is to use draw commands. Since, the detail band may be dynamic
height, you should be able to use the DetailBand.AfterPrint event to check
if DetailBand.Overflow. If it does overflow, then this means that it
couldn't fit on the current page and will print on the next page. Set a
boolean flag if this is true. Then use the Report.OnEndPage event to create
a DrawText command in the location where you want the 'Carried Forward' to
be displayed. To create a DrawText on the page:
uses
ppTypes, ppUtils;
...
procedure TForm1.DrawText(aText: String);
var
liHeight: Integer;
lDrawText: TppDrawText;
liTop: Integer;
liWidth: Integer;
lBitmap: TBitmap;
begin
lBitmap := TBitmap.Create;
{half inch from bottom of page}
liTop := ppReport1.PrinterSetup.PageDef.mmPrintableHeight - 12700;
lDrawText := TppDrawText.Create(nil);
lDrawText.Page := ppReport1.Engine.Page;
lDrawText.Text := aText;
lDrawText.Font.Size := 10;
lDrawText.Font.Name := 'Arial';
lDrawText.Font.Color := clRed;
lDrawText.Color := clAqua;
lDrawText.Left := ppReport1.PrinterSetup.PageDef.mmMarginLeft +
(ppReport1.PrinterSetup.PageDef.mmPrintableWidth div 2);
lBitmap.Canvas.Font := lDrawText.Font;
liHeight := lBitmap.Canvas.TextHeight(lDrawText.Text);
liHeight := ppToMMThousandths(liHeight, utScreenPixels, pprtVertical,
ppReport1.Printer);
lDrawText.Height := liHeight;
lDrawText.Top := liTop - liHeight;
liWidth := lBitmap.Canvas.TextWidth(lDrawText.Text);
liWidth := ppToMMThousandths(liWidth, utScreenPixels, pprtHorizontal,
ppReport1.Printer);
lDrawText.Width := liWidth;
lBitmap.Free;
end;
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
what is the difference between a German and an English pagebreak?
Furthermore, isn't mixing German with English the standard in German
speaking today ('Neudeutsch' or 'Denglisch')?
regards,
Chris Ueberall;