Parameters
Is the ParametersList destroyed when the report is closed?. I'm creating
parameters in a Custom RAP function in the OnInitializaParameters event of
the report, and everytime that I change tabs, from Preview to Design and
the event is triggered the parameters list is empty and I have to create
the list again. I don't want this behavior. Because I'm using this
parameters to "remember" the last option the user select and when the
userPreview the report again the value is lost.
Another question, What event is the best to perform updates to a table
after the report is printed. I tried AfterPrint but the event fires right
after it start printing and then again at the end, when clicking in the
Design tab, for example. Thanks
--- posted by geoForum on http://delphi.newswhat.com
parameters in a Custom RAP function in the OnInitializaParameters event of
the report, and everytime that I change tabs, from Preview to Design and
the event is triggered the parameters list is empty and I have to create
the list again. I don't want this behavior. Because I'm using this
parameters to "remember" the last option the user select and when the
userPreview the report again the value is lost.
Another question, What event is the best to perform updates to a table
after the report is printed. I tried AfterPrint but the event fires right
after it start printing and then again at the end, when clicking in the
Design tab, for example. Thanks
--- posted by geoForum on http://delphi.newswhat.com
This discussion has been closed.
Comments
Rap does not include any events that only fire once regardless how many
times the report is generated. If you would like to restrict your event
code, perhaps you could check if the Report.Parameters property is nil and
if it isn't, simply do not create new parameters.
The reason your AfterPrint event is being called twice is probably due to
the fact that you have a two pass report. Check to be sure you are on the
second pass before altering your data...
if Report.SecondPass then
//alter data;
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com