Dynamic Fields
I Attacted Datasource in delphi to frxDataSet1 in FastREport.
It's ok when i use <frxdataset1."Name">,<frxdataset1."Address">. But How i can call Field Value dynamicly like Fields[1], or FieldByName by code?
when i use :
1. Value := <frxdataset1."'+FieldByName+"> ; Error!
2. Value := <frxdataset1."'+Fields[1]+"> ;Error !
Thank for your attension
Endry
It's ok when i use <frxdataset1."Name">,<frxdataset1."Address">. But How i can call Field Value dynamicly like Fields[1], or FieldByName by code?
when i use :
1. Value := <frxdataset1."'+FieldByName+"> ; Error!
2. Value := <frxdataset1."'+Fields[1]+"> ;Error !
Thank for your attension
Endry
Comments
function GetDynamicField(DataSetName, FieldName : String) : Variant;
In Delphi with FindComponent(DataSetName) -> FieldByName(FieldName)...
Daniel