BandsPerRecord = 0
Delphi 7 Pro
RBuilder 7.04 Pro
Hi!
I use the folowwing code in the "RecordPositionChange" event of the
BDEPipeLine to print X times the same row, where X is a value of the Dataset
(for example, for printing labels by stock).
procedure TForm5.ProductsPipeLineRecordPositionChange(Sender: TObject);
begin
try
report.Detailband.BandsPerRecord:=ProductsPipeLine.DataSource.DataSet.fieldbyname(
'stock' ).asinteger;
except
report.Detailband.BandsPerRecord:=1;
end;
end;
All works fine! BUT if the stock of one of the products is "0", it will
print 1 Label instead. How can I skip it or not to print labels where STOCk
field = 0 in this event?
Thanks!
RBuilder 7.04 Pro
Hi!
I use the folowwing code in the "RecordPositionChange" event of the
BDEPipeLine to print X times the same row, where X is a value of the Dataset
(for example, for printing labels by stock).
procedure TForm5.ProductsPipeLineRecordPositionChange(Sender: TObject);
begin
try
report.Detailband.BandsPerRecord:=ProductsPipeLine.DataSource.DataSet.fieldbyname(
'stock' ).asinteger;
except
report.Detailband.BandsPerRecord:=1;
end;
end;
All works fine! BUT if the stock of one of the products is "0", it will
print 1 Label instead. How can I skip it or not to print labels where STOCk
field = 0 in this event?
Thanks!
This discussion has been closed.
Comments
Setting the TppDetailBand.BandsPerRecord proeprty to 0 simply disables the
functionality of this property. If you would like to remove the detail band
completely when there are no records, you will need to toggle the visibility
of that band in the Band.BeforePrint event.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
I can't toggle the visibility in the BeforePrint event because I use saved
.rtm reports.
I have solved the problem calling the ProductsPipeLine.Next to skip those
records where STOCK <= 0
Thanks