We have a FDquery with calculated fields on a datasnap server.
When openeing the Query on a client with a FDMemtable, the calculated fields are empty.
Q: How can we send the calculated data through datasnap to the client?
function TCOMServerMethods.QRY_Get(): TFDJSONDataSets;
begin
result:=TFDJSONDataSets.Create;
FDQRY.Close;
//SQL
FDQRY.Open;
TFDJSONDataSetsWriter.ListAdd(result,'TABLENAME',FDQRY);
end;
procedure TCOMServerMethods.FDQRYCalcFields(DataSet: TDataSet);
begin
inherited;
//Add calculated value
FDQRYCalcField.Value:='Calculated'
end;