Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Refresh a page of report with changed data

edited September 2011 in General
Hi,

I have set up DrawCommandClick/DrawCommandCreate events so I can click on a
line item on my report and do something, one of which updates the
corresponding dataset record with a flag i.e.

procedure
TFormRptRbPalletsInStoreNew.dbtPalletNumberpCatDrawCommandClick(Sender,
aDrawCommand: TObject);
....
if cdsPacking.Locate('PalletNumber',
fLoadoutForm.QryLink.FieldByName('PalletNumber').AsInteger, []) then
begin
cdsPacking.Edit;
cdsPacking.FieldByName('PreAllocated').AsString := 'T';
cdsPacking.Post;
end;
....
end;

- all good


I have an OnGetText handler set up that does the following....

if cdsPacking.FieldByName('PreAllocated').AsString = 'T' then
dbtPalletNumberpCat.Font.Color := clRed
else
dbtPalletNumberpCat.Font.Color := clBlack;


Is it possible to "refresh" my preview form's current page to reflect the
change in the underlying dataset. I currently have to scroll to the next
page of the report and then return to the current page to get the red
item(s) to draw.

TIA


Comments

This discussion has been closed.