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
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
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.
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]
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.
Cheers,
Ben