TfrxMasterData : TfrxUserDataSet Help!
Hi all.
I'm very new to fast report so please be easy on me [img]style_emoticons/<#EMO_DIR#>/rolleyes.gif" style="vertical-align:middle" emoid=":rolleyes:" border="0" alt="rolleyes.gif" /> I'm trying to create a report 'dynamically' (from code in delphi) to show data from an array. The user will press a button (for example) to add this record to the report. So I do something like this: var masterData : TfrxMasterData; begin Page := frxReport.Pages[1]; if Page<>nil then begin masterData := TfrxMasterData.Create(Page); masterData.CreateUniqueName; masterData.Left etc... My question is how do I now add data to this masterData? Can I use a TfrxUserDataSet and if so could someone please show some example code? I'd guess that I could: dataSet := TfrxUserDataSet.Create(FPage) // or masterData? dataSet.Fields.Add('fieldName'); dataSet.Add (string from my array)!!! ??? masterData.DataSet := dataSet; Thanks![/img]
I'm very new to fast report so please be easy on me [img]style_emoticons/<#EMO_DIR#>/rolleyes.gif" style="vertical-align:middle" emoid=":rolleyes:" border="0" alt="rolleyes.gif" /> I'm trying to create a report 'dynamically' (from code in delphi) to show data from an array. The user will press a button (for example) to add this record to the report. So I do something like this: var masterData : TfrxMasterData; begin Page := frxReport.Pages[1]; if Page<>nil then begin masterData := TfrxMasterData.Create(Page); masterData.CreateUniqueName; masterData.Left etc... My question is how do I now add data to this masterData? Can I use a TfrxUserDataSet and if so could someone please show some example code? I'd guess that I could: dataSet := TfrxUserDataSet.Create(FPage) // or masterData? dataSet.Fields.Add('fieldName'); dataSet.Add (string from my array)!!! ??? masterData.DataSet := dataSet; Thanks![/img]
Comments
Bands are only place holders on the design page the data must be placed in memo views, wich have been created in the bands.
Also look in your fast reports demo folders for ways to use the userdataset and place code in the memos.
and note you must write code for the events of the tfrx userdataset.
Last when posting please state your version and level of fr that you are using.