Question about creating report programmatically(Delphi 2007)

Hello fast report community!

So my fquestion is how does memo and masterdata controls work together? For the moment, I have a masterdata on my frxreport interface and I add memos in it dynamicly at runtime. I set each memo a datafield and everything is working great because the memos are fill automaticly from the datafield but what I want to do is to fetch my query and to create masterdata rows and memos dynamicly so I have more control over it. The thing is, I dont know how controls work..Like when I set a datafield on a memo I write automaticly every rows data from my query on the report, but are each new lines a new memo or masterdata row? I'm kinda lost at the moment trying to understand how it work in background...


What i want to do is something like this:
for I := 0 to qry.recordcount do
begin
  
  Add new masterdata row?...   
 
  for I := 0 to qry.fieldCount do
  begin

   Add memo in new masterdata
  
  end;
end;


Seriously I'm lost somehow...Hope you can understand my need!

Thanks, Marc.

Comments

  • gpigpi
    edited 7:31PM
    See Programmer's manual "1.12 Creating a report form from code" chapter
  • edited January 2012
    Hi gpi, thank you for your reply. I have read the part about creating report by code but the example is not really what I am looking for. Let's say I dont want the memo to have any datafield but i'd like to create each row/columns (my report look like a datagrid object) by code using double loops(see first example). Is it possible?

    Like in this picture imagine each text would be a memo and each row a masterdata? How does a memo work in background when when you set a datafield to it? Cause when you set the datafield the memo automaticly create "rows" and set the data to it........
    datagrid-3.png
  • gpigpi
    edited 7:31PM
    wrote:
    Like in this picture imagine each text would be a memo
    Yes
    wrote:
    and each row a masterdata
    No. Only one masterdata

    See also PrintTable and PrintStringGrid demos in FR's DEMOS folder

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.