Removing header and footer
I am thinking of using ReportBuilder as a label-design tool (using rtm-files
as a way of passing the information to a label-printer).
When i create a new template and start the designer, I need to find a way
to remove header and footer band from the report.
I have tried to use the code below to create a new report (label), but i am
not getting the desired result.
Any help would be appreciated.
Michael
procedure TfrmMain.NewReport;
begin
Report.Template.New;
Designer.Report.PrinterSetup.MarginBottom := 0;
Designer.Report.PrinterSetup.MarginLeft := 0;
Designer.Report.PrinterSetup.MarginRight := 0;
Designer.Report.PrinterSetup.MarginTop := 0;
Designer.Report.PrinterSetup.Units := utMillimeters;
Designer.Report.PrinterSetup.PaperHeight := 100; // standard settings for
a label
Designer.Report.PrinterSetup.PaperWidth := 100;
Designer.Report.HeaderBand.Visible := False;
Designer.Report.FooterBand.Visible := False;
Designer.Report.DefaultBands := [btDetail];
Designer.Show;
end;
as a way of passing the information to a label-printer).
When i create a new template and start the designer, I need to find a way
to remove header and footer band from the report.
I have tried to use the code below to create a new report (label), but i am
not getting the desired result.
Any help would be appreciated.
Michael
procedure TfrmMain.NewReport;
begin
Report.Template.New;
Designer.Report.PrinterSetup.MarginBottom := 0;
Designer.Report.PrinterSetup.MarginLeft := 0;
Designer.Report.PrinterSetup.MarginRight := 0;
Designer.Report.PrinterSetup.MarginTop := 0;
Designer.Report.PrinterSetup.Units := utMillimeters;
Designer.Report.PrinterSetup.PaperHeight := 100; // standard settings for
a label
Designer.Report.PrinterSetup.PaperWidth := 100;
Designer.Report.HeaderBand.Visible := False;
Designer.Report.FooterBand.Visible := False;
Designer.Report.DefaultBands := [btDetail];
Designer.Show;
end;
This discussion has been closed.
Comments
the designer. The simplest way to accomplish this is to replace the lines
Designer.Report.HeaderBand.Visible := False;
Designer.Report.FooterBand.Visible := False;
with
Designer.Report.HeaderBand.Free;
Designer.Report.FooterBand.Free;
--
Cheers,
Alexander Kramnik
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com