Range from array

Hi. I have an array of items:



TPersonal = record
  id: integer;
  name :string;
  equipo_id :integer
end;


arPersonal : array of TPersonal;

is there a simple way to pass "arPersonal" items values to a table in my report, like with datasets or TLists ?

regards

Hi,

Array off.. is not supported because it is not type compatible. That is, if you have
arPersonal: array of TPersonal;
arPersonal2: array of TPersonal;

Then those variables are of different types and you can't do arPersonal := arPersonal2.

So what we support instead is TArray<TPersonal> which is functionally the same as "array of TPersonal" but the types are the same.

This code should work:


var
  arPersonal : TArray<TPersonal>;
...
report.AddTable<TPersonal>('personal', arPersonal);