Force new page
Hi
I Have a report with 73 Line.
I need to spesify the position where teh program should go to the next page
There is a line number in the data.
so on the event Before Print of the detail line I would like to add some
code
If LineNo = 44
then .... ppreport1.????
Please help with this part
Edward Potgieter
I Have a report with 73 Line.
I need to spesify the position where teh program should go to the next page
There is a line number in the data.
so on the event Before Print of the detail line I would like to add some
code
If LineNo = 44
then .... ppreport1.????
Please help with this part
Edward Potgieter
This discussion has been closed.
Comments
it can't fit on the current page. Use the DetailBand.BeforePrint event.
Here is the code which breaks when the OrderNo = 1060 using the dbDemos
database.
procedure TForm1.ppReport1BeforePrint(Sender: TObject);
begin
FPageBreak := False;
end;
procedure TForm1.ppDetailBand1BeforePrint(Sender: TObject);
begin
if (ppReport1.DataPipeline['OrderNo'] = 1060) and not(FPageBreak) then
begin
ppDetailband1.OutOfSpace := True;
FPageBreak := True;
end
else
ppDetailband1.OutOfSpace := False;
end;
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
If I Only set Out of space
The report generate A lot of pages an it should only generate 2.
Example
Procedure TFrmReports.ppDetailBand1BeforePrint(Sender: TObject);
begin
IF QryDataLine.Value = 40
then ppDetailBand1.OutOfSpace := True
else ppDetailBand1.OutOfSpace := False ;
end;
Where does FPagebreak come from ?
Report first page
Generate LOTS of blank pages and not the last part
1 FPageBreak Delared as Var of type Boolean.
2 Set to False on Start as example
Check For > 39 ( Value set in Config Table for reports on my database )
All work as planned
thanks Edward Potgieter
Erich Rieder
Zurich