Fill a memo through a dataset by code
Hello,
I am trying to fill a memoView by code using GetDataset with MasterData3 not connected but without result, here's my code:
I need to do that in the second page where the whole page has an image and the memo on it.
I have two record and only one (the first) is printed
Can you help me please ?
I am trying to fill a memoView by code using GetDataset with MasterData3 not connected but without result, here's my code:
var
  ds: TfrxDataSet;
procedure MasterData3OnBeforePrint(Sender: TfrxComponent);
begin
  if not ds.Eof then
  begin             Â
  memo1.text :=ds.Value('Nom');
  end;
ds.Next;Â Â Â Â Â Â Â Â Â Â Â Â Â Â
end;
begin
ds := Report.GetDataset('Ascendant');
  ds.First;                   Â
end.
I need to do that in the second page where the whole page has an image and the memo on it.
I have two record and only one (the first) is printed
Can you help me please ?
Comments
ie
ds := Report.GetDataset('frxDBDataSet1');
Anyway, I left this method and directly assigned memo to dataset I don't know why it doesn't worked for me before and know it works. Sorry for disturbing and thank you very much gordk
it must be a datasetname not a table name
didn't mean to mislead you, not in office til tomorrow
If your MasterData3 not assigned with dataset - set MasterData3.RowCount to 1 - you will get text from the last record of the dataset
If you want to show all records - use
Your solution works thanks gpi