TfrxMasterData : TfrxUserDataSet Help!

edited 4:57AM in FastReport 4.0
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]

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 4:57AM
    read the programmers manual on building reports from code.
    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.

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.