BdLm
asked on
rave , page margins -code based report
can I set with rave the page margins ?
(eg. the foot is cutrrently set to close to the paper boarder)
(eg. the foot is cutrrently set to close to the paper boarder)
ASKER
unit is pixel ?
ASKER
i play around ... but the command does not seem to be effective ....
///
/// support : http://www.experts-exchange.com/Programming/Languages/Pascal/Delphi/Q_26902682.html?cid=239#a35188192
///
procedure TMainForm.LibRvSystemPrintFooter(Sender: TObject);
begin
With Sender as TBaseReport do
begin
//...
PrintFooter('Page : '+ IntToStr(CurrentPage), pjCenter); // or pjLeft/pjRight
//...
end
end;
function TMainForm.LibRvSystemPrintPage(Sender: TObject;
var PageNum: Integer): Boolean;
begin
With Sender as TBaseReport do
begin
//...
SectionTop := 30 ;
SectionLeft:= 30;
SectionRight := 30;
SectionBottom := 30;
//...
end
end;
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
is there a drawing showing the difference between margin and sectionTop, sectionBottom ....
ASKER
problem solving progress :
-------------------------- -------
///
/// support : https://www.experts-exchange.com/questions/26902682/rave-page-numbers-code-based-reports.html?cid=239&anchorAnswerId=35188192#a35188192
/// procedure : Pass
procedure TMainForm.LibRvSystemPrint Footer(Sen der: TObject);
begin
With Sender as TBaseReport do
begin
PrintFooter('Page : '+ IntToStr(CurrentPage), pjCenter); // or pjLeft/pjRight
end
end;
///
/// support https://www.experts-exchange.com/questions/26902799/rave-page-margins-code-based-report.html
///
/// margin setting, orientation and Section do not seem to be functional !!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!
/// procedure : fail
function TMainForm.LibRvSystemPrint Page(Sende r: TObject;
var PageNum: Integer): Boolean;
begin
With Sender as TBaseReport do
begin
//...
SectionTop := 2 ;
SectionLeft:= 2;
SectionRight := 2;
SectionBottom := 2;
MarginLeft := 0.5;
MarginRight := 0.5;
MarginTop := 0.5;
MarginBottom := 0.5;
Orientation := poLandscape;
//...
end
end;
--------------------------
///
/// support : https://www.experts-exchange.com/questions/26902682/rave-page-numbers-code-based-reports.html?cid=239&anchorAnswerId=35188192#a35188192
/// procedure : Pass
procedure TMainForm.LibRvSystemPrint
begin
With Sender as TBaseReport do
begin
PrintFooter('Page : '+ IntToStr(CurrentPage), pjCenter); // or pjLeft/pjRight
end
end;
///
/// support https://www.experts-exchange.com/questions/26902799/rave-page-margins-code-based-report.html
///
/// margin setting, orientation and Section do not seem to be functional !!!!!!!!!!!!!!!!!!!!!!!!!!
/// procedure : fail
function TMainForm.LibRvSystemPrint
var PageNum: Integer): Boolean;
begin
With Sender as TBaseReport do
begin
//...
SectionTop := 2 ;
SectionLeft:= 2;
SectionRight := 2;
SectionBottom := 2;
MarginLeft := 0.5;
MarginRight := 0.5;
MarginTop := 0.5;
MarginBottom := 0.5;
Orientation := poLandscape;
//...
end
end;
You can find your margins from RpDev.Waste property
Left := RpDev.Waste.Left / RpDev.XDPI;
Top := RpDev.Waste.Top / RpDev.YDPI;
Right := RpDev.Waste.Right / RpDev.XDPI;
Bottom := RpDev.Waste.Bottom / RpDev.YDPI;
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
is there a way to change all units from inches to mm ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
So you can try and put PrintFooter() under this line:
SectionBottom := 10;