Planner Item Completion Bar

Hi Bruno,

Having a couple issues with the TDBPlanner (v3.4.5.0) using a TDBTTimeLineSource that I hope you can help me with. (Both in XE10.1 and XE10.2)

I need to set the Item.Completion value for every planner item being displayed in the timeline. I loop through and set values, but the last items bar will always show as 0, even if I explicitly reference that item and set its completion value.

eg.
      MyDataSet.First;
      while NOT MyDataSet.EOF do
      begin
        planItem := MyPlanner.Items.FindKey(MyDataSet.FieldByName('Key').AsString);
        planItem.Completion := 50;
        MyDataSet.Next;
      end;
(I can also use a for loop with Item Indexes to the same effect, I think it has something to do with the current record in the dataset but cannot see why it wouldn't update correctly)

The second issue on the same project is that I cannot seem to get recurring items to display beyond the initial occurrence. 
Using a TPlannerRecurrencyEditor, my recurrency fields in the data table correctly update, but only one entry will appear on the timeline. (In my case I am trying a daily repeating item)

eg.
  RecurEditor.Recurrency := Item.Recurrency;
  if RecurEditor.Execute then
  begin
    Item.Recurrency := RecurEditor.Recurrency;
    Item.Update;
  end;

Am I missing a setting somewhere that would affect the display??
Can provide a small project to showcase the issues if needed.

Cheers
Andrew

I cannot see a reason for the last item not displaying the completion. I can also not reproduce this. If a problem persists, please provide some sample source app with which we can reproduce this here.


Is the recurrency working when you would re-activate the dataset, so the item gets fully reloaded from the dataset? Did you assign the recurrency field in the TDBTTimeLineSource ?
Hi Bruno,

Have sent in a test project as requested.
The issue seems to be that if the current record of the underlying dataset changes,the completion bar on the corresponding planner item resets.

Reproduced this by attaching a dbgrid to the planner datasource and selecting grid rows. The planner resets the completion bar value for that records planner item.

Not sure if this is by design or not?

Cheers
Andrew

Please set the item completion value from the TDBTTimeLineSource.OnFieldsToItem event