After Update: Changes to AutoSearchFields and ShiftRelativeTo not persistent
Hi guys,
I'm updating an older application from Delphi 2007 RB 10.06 to the current version, and am experiencing some weird behavior.
After loading a template I make some changes to the report in code: I set the autosearchfields on the datasource and/or change the ShiftRelativeTo property of subreports or memos.
After opening the designer and switching over to the preview tab, everything works as expected. But as soon as I switch back to the designer, the changes I previously made via code have disappeared, so when I preview again the wrong row is selected and/or components are all over the place because their ShiftRelativeTo has become nil.
When I open the designer and don't switch directly to the preview but to the data tab and open the datasource, the correct value I set via code is there - and then it stays there even after I did a preview. Opening and closing the datasource editor seems to make the changes I did via code persistent.
Does anybody have an idea what could cause this?
Thanks in advance!
I'm updating an older application from Delphi 2007 RB 10.06 to the current version, and am experiencing some weird behavior.
After loading a template I make some changes to the report in code: I set the autosearchfields on the datasource and/or change the ShiftRelativeTo property of subreports or memos.
After opening the designer and switching over to the preview tab, everything works as expected. But as soon as I switch back to the designer, the changes I previously made via code have disappeared, so when I preview again the wrong row is selected and/or components are all over the place because their ShiftRelativeTo has become nil.
When I open the designer and don't switch directly to the preview but to the data tab and open the datasource, the correct value I set via code is there - and then it stays there even after I did a preview. Opening and closing the datasource editor seems to make the changes I did via code persistent.
Does anybody have an idea what could cause this?
Thanks in advance!
Comments
This is not a known issue with RB 22.06 and I am unable to recreate it with a simple example.
1. Where (in code) are you assigning the autosearch fields and ShiftRelativeTo properties?
2. How are you accessing the components loaded by the template?
3. Be sure you are using the latest release of RB (22.06).
If you are able to recreate this with a simple example, please send it to support@ in .zip format and we'll take a look at what is causing the issue.
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com