Data persistence in custom report components

I have created a couple of custom components for my reports - using the developer guide to help me figure this out.

It seems that member data isn't persistent for these components unless the member data is exposed through a published property. If the component performs custom drawing by using its member data, the member data must be published in this way or the component will draw with default (zero) or uninitialized data. Take the checkbox example from the Developer's guide, delete the published property for "Checked" and the component will always draw False - regardless of the data to which it is connected. GetData() is still called, and the FChecked property will be properly assigned, but somehow when the Draw() method is called, FChecked is always False. Simply add back the published property for FChecked and Draw() works as expected again.

I want my custom component to draw based on several fields in a dataset. Is there any way to accomplish this without creating member variables and published properties for each field required?

Comments

  • edited 12:24AM
    Did you happen to resolve this? This will be relevant to a project I'm working on and appreciate knowing how you solved this.

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.