RB7.02 D6 RptExplorer Dade: Autosearch changes discarded in designer
If I have any rap code in a report (even a const declaration) and in
the designer I preview and then pop up the autosearch and change it
then:
1) If you switch tabs away from the preview and then go back it has
wiped out your autosearch changes. This is fatal since the users use
this to nicely set their defaults.
2) If you click the window X button it doesn't ask to save.
If you remove the rap then everything is OK. I think this is related
to the TppDesignerWindow.SaveReportState and
TppDesignerWindow.RestoreReportState procedures.
This is a LARGE problem for me since in addition to the nice "in list"
dialog RB provides I provide a date calendar and other drop downs.
They can use the data tab search criteria form but for some data
elements they don't know the underlying value since it is translated
for them in my derived autosearch dialogs.
I duplicated this in the standard end user demo program by adding any
rap code to any of the autosearch demos.
Thanks,
Rick Matthews
Dartek Systems Inc.
the designer I preview and then pop up the autosearch and change it
then:
1) If you switch tabs away from the preview and then go back it has
wiped out your autosearch changes. This is fatal since the users use
this to nicely set their defaults.
2) If you click the window X button it doesn't ask to save.
If you remove the rap then everything is OK. I think this is related
to the TppDesignerWindow.SaveReportState and
TppDesignerWindow.RestoreReportState procedures.
This is a LARGE problem for me since in addition to the nice "in list"
dialog RB provides I provide a date calendar and other drop downs.
They can use the data tab search criteria form but for some data
elements they don't know the underlying value since it is translated
for them in my derived autosearch dialogs.
I duplicated this in the standard end user demo program by adding any
rap code to any of the autosearch demos.
Thanks,
Rick Matthews
Dartek Systems Inc.
This discussion has been closed.
Comments
It works fine in tests here with RB 7.02.
I ran one of the main autosearch demos in the end user database and the
search criteria entered stayed persistent while the reprot was in the
designer, no matter which tabs were selected. No RAP was used in this case.
Everytime the autosearch dialog was dispalyed, it showed the last search
criteria I entered. So, I added some RAP code to the same report as you said
this causes the problem. When RAP is in a report, the report must stream
itself as a copy while the report runs, then it restores itself to overwrite
any changes that the code which ran for the report had on the report layout.
I added RAP code, but I still could not reproduce the problem. The
autosearch values did not get overwritten. Can you describe the RAP
code/event you added to which demo autosearch end user report and I'll try
it again.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
I used C:\Program Files\Borland\Delphi6\RBuilder\Demos\3. EndUser\1.
Report Explorer. I modified the "LessThan: Amount Paid (Currency)"
report.
With no rap then the autosearch sticks for me. If I add a global
const declaration of: gcJunk = 33; then any autosearch changes are
wiped out when you go from preview to design and back to preview.
Thanks,
to make sure the layout doesn't get changed by the RAP code. This causes the
dataviews to be reloaded and the search criteria is restored to the value
that is in the criteria in DADE, not the last criteria that the end user
entered. It would be cool if there was a OnSave event in RAP that you could
use to grab the user's criteria and make it more persistent like you want.
You may be able to use the designer's OnTabChange event to try and check to
see if you are going to leave the preview tab and then grab the
Report.AutosearchFields[] values and then restore them when moving to the
preview tab the next time they preview the report in the same designer
session.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
RAP
Could you put it on the wish list?
Thanks,