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

Comments

  • dschuchdschuch Dresden,Germany
    edited 8:13AM
    good question. For that purpose I wrote a own function that i call from inside FR. The Return Value is FieldByName - Value of the requested DataSet.


    function GetDynamicField(DataSetName, FieldName : String) : Variant;

    In Delphi with FindComponent(DataSetName) -> FieldByName(FieldName)...

    Daniel

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.