does not recognize current-record
Jim,
If I make a 5-level master-detail report using the afterscroll-event of the
different TTables ( SETRANGE() )
Rangebegin = rbCurrentRecord
Rangeend = rbCurrentRecord
does not work properly ( and that is also with paradox and memdataset )
It first repositions the record to Recordnr 1 of the range and then treats
that record as CURRENT record.
Example:
Level1.Rangebegin = rbCurrentRecord;
Level1.Rangeend = rbCurrentRecord;
Level2.Rangebegin = rbCurrentRecord; <======= moves to record 1 of the
range first in stead of staying on the correct record.
Level2.Rangeend = rbCurrentRecord;
Level3.Rangebegin = rbFirstRecord;
Level3.Rangeend = rbLastRecord;
Level4.Rangebegin = rbFirstRecord;
Level4.Rangeend = rbLastRecord;
Level5.Rangebegin = rbFirstRecord;
Level5.Rangeend = rbLastRecord;
Could you please look into it and give me a workaround for that ?
Leon
If I make a 5-level master-detail report using the afterscroll-event of the
different TTables ( SETRANGE() )
Rangebegin = rbCurrentRecord
Rangeend = rbCurrentRecord
does not work properly ( and that is also with paradox and memdataset )
It first repositions the record to Recordnr 1 of the range and then treats
that record as CURRENT record.
Example:
Level1.Rangebegin = rbCurrentRecord;
Level1.Rangeend = rbCurrentRecord;
Level2.Rangebegin = rbCurrentRecord; <======= moves to record 1 of the
range first in stead of staying on the correct record.
Level2.Rangeend = rbCurrentRecord;
Level3.Rangebegin = rbFirstRecord;
Level3.Rangeend = rbLastRecord;
Level4.Rangebegin = rbFirstRecord;
Level4.Rangeend = rbLastRecord;
Level5.Rangebegin = rbFirstRecord;
Level5.Rangeend = rbLastRecord;
Could you please look into it and give me a workaround for that ?
Leon
This discussion has been closed.
Comments
Life ain't easy.
I changed code in the afterscroll-event and now it works, so have a nice
weekend.
==============================
bad code:
ID := dataset.fieldbyname('ID').asinteger;
SetRange(.....)
==============================
==============================
good code:
ID := dataset.fieldbyname('ID').asinteger;
IF ID <> OldId then
begin
SetRange(.....);
OldId := ID;
end;
==============================