LazReport: report option for printing PageHeader band before ReportTitle band, issue #30345

git-svn-id: trunk@52689 -
This commit is contained in:
jesus 2016-07-15 01:27:37 +00:00
parent 3f249dd4c1
commit 49851a1b4e

View File

@ -91,8 +91,9 @@ type
TfrFrameStyle = (frsSolid,frsDash, frsDot, frsDashDot, frsDashDotDot,frsDouble);
TfrPageType = (ptReport, ptDialog); //todo: - remove this
TfrReportOption = (roIgnoreFieldNotFound, roIgnoreSymbolNotFound, roHideDefaultFilter,
roDontUpgradePreparedReport, // on saving an old prepared report don't update to current version
roSaveAndRestoreBookmarks // try to save and later restore dataset bookmarks on building report
roDontUpgradePreparedReport, // on saving an old prepared report don't update to current version
roSaveAndRestoreBookmarks, // try to save and later restore dataset bookmarks on building report
roPageHeaderBeforeReportTitle // PageHeader band is printed before ReportTitle band
);
TfrReportOptions = set of TfrReportOption;
TfrObjectType = (otlReportView, otlUIControl);
@ -8543,12 +8544,15 @@ begin
{$IFDEF DebugLR}
DebugLn('XAdjust=%d CurY=%d sfPage=%d',[XAdjust,CurY,sfpage]);
{$ENDIF}
ShowBand(Bands[btReportTitle]);
if not (roPageHeaderBeforeReportTitle in MasterReport.Options) then
ShowBand(Bands[btReportTitle]);
if PageNo = sfPage then // check if new page was formed
begin
if BandExists(Bands[btPageHeader]) and
((Bands[btPageHeader].Flags and flBandOnFirstPage) <> 0) then
ShowBand(Bands[btPageHeader]);
if roPageHeaderBeforeReportTitle in MasterReport.Options then
ShowBand(Bands[btReportTitle]);
if not RowsLayout then
ShowBand(Bands[btColumnHeader]);
end;