Please help: How can you create report controls programmatically?

Anyone know how to *programatically* create elements on the report at runtime?

For example, not knowing how many columns will be in your report until runtime and programatically creating memos for each column when the report runs?

Thanks,
Ben

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 6:54PM
    read the programmers manual on building reports from code.
  • edited 6:54PM
    gordk wrote: »
    read the programmers manual on building reports from code.

    Okay, I've had a look in the programmers manual but from what I can see it doesn't create any new report controls programmatically that weren't already on the page. From the examples, all the controls are already on the page. They did use a CrossView to show some contents of a TStrings but CrossView isn't an option for me because it's too slow.

    Am I looking in the wrong spot in the documentation? Any code sample would be appreciated. :)
  • gordkgordk St.Catherines On. Canada.
    edited 6:54PM
    see the print table demo.
  • edited 6:54PM
    gordk wrote: »
    see the print table demo.

    Maybe you didn't see this: "...CrossView isn't an option for me because it's too slow."

    The Print Table demo uses a CrossView, just like the TStrings demo, just like all their demos that have dynamic columns from what I've seen. [img]style_emoticons/<#EMO_DIR#>/sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" /> I'm starting to think it's just not possible.[/img]
  • gordkgordk St.Catherines On. Canada.
    edited 6:54PM
    anything is possible some are not practical, the crossview method is the quickest and least amount of code writing needed.
    After reading the programmers manual on how to create reports from code, and you understand the context in which objects are created, read the usermanual chapter Creation of objects under Service objects anything can be created and accessed by declaring variables of the correct type at the beginning of the code page, and in the empty begin end block write your code to create objects and set their properties.
  • edited 6:54PM
    Ahh sweet, I was looking in the wrong section of the documentation and have found the reports from code section you mentioned. Thanks that's exactly what I was after.

    Cheers,
    Ben

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.