Thanks for the ideas! I can't modify the where clause as this is a calculated field using a lookup.
I tried the following code and it doesn't seem to work. Is this what you had in mind?:
procedure TrbCatalog1.ppDetailBand1BeforePrint(Sender: TObject); begin If SuppressTotals then begin If (plCatalog['Qty'] <= 0) then begin plCatalog.Skip; end; end; end;
Limit the dataset. Are you using DADE? If not, then add the calcfield in the WHERE clause to limit the dataset. If you are using DADE, then you'll have to wait until RB 7 which will support Calc fields as search criteria in DADE dataviews or skip the record when the detail band prints. The best bet is to skip a record by using the DetailBand.BeforePrint event to check the datapipeline value and calling the Skip method on the datapipeline. You can also use bookmarks to mark the records to print as show in the main report demo project in the data traversal settings group of reports #111-116
It is going to be much easier to try and limit the dataset. Can you create an inner join so that you can get the calc field as part of the single dataset instead of using a look up to get it? Then you can filter the joined dataset to get only the records that you want.
Comments
I can't modify the where clause as this is a calculated field using a
lookup.
I tried the following code and it doesn't seem to work.
Is this what you had in mind?:
procedure TrbCatalog1.ppDetailBand1BeforePrint(Sender: TObject);
begin
If SuppressTotals then
begin
If (plCatalog['Qty'] <= 0) then
begin
plCatalog.Skip;
end;
end;
end;
the WHERE clause to limit the dataset. If you are using DADE, then you'll
have to wait until RB 7 which will support Calc fields as search criteria in
DADE dataviews or skip the record when the detail band prints. The best bet
is to skip a record by using the DetailBand.BeforePrint event to check the
datapipeline value and calling the Skip method on the datapipeline. You can
also use bookmarks to mark the records to print as show in the main report
demo project in the data traversal settings group of reports #111-116
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
an inner join so that you can get the calc field as part of the single
dataset instead of using a look up to get it? Then you can filter the
joined dataset to get only the records that you want.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com