`
Templates: Legacy changes for more embeds around views 1999-01-09 -- Malcolm Collett Newsgroups: comp.lang.clarion >I am using the Validate Record:Filter Checking Embed from the early >responses to my post. This method works well with small tables but >with the large one that I am working with it takes a whole lot of >time. > >I was looking for something like your second option. I have not done >much template programming (last did it 1 1/2 years ago) and was >wondering if you or someone else could give me a hint as to how and >where to modify the report template. Hi Gilbert You must remember that Range Limits are fast, Filters are slow. A range limit needs a key. If there is no suitable key, it will always be slow. If there is a suitable key, Prop:Filter will use. Add the 3 marked lines to the Gpprocess.tpw file. When you do reports, you will have 3 additional embeds. I use the the Before and After View embeds to change the sort order. The same 3 embeds will also be in Process procedures - both Process and Report use the Gpprocess.tpw file. #!--------------------------------------------------- #GROUP(%ProcessSaveLimits),AUTO #EMBED(%WindowEventOpenWindowBefore,'Window Event: Open Window, before setting up for reading') #EMBED(%BeforeKeySet,'Before SET() issued') #IF(%PrimaryKey) SET(%PrimaryKey) #ELSE SET(%Primary) #ENDIF #INSERT(%StandardWriteViewFilter,%ProcessFilter) #EMBED(%MGCAfterPropFilter,'MGC After Prop:Filter') #! MGC IF ERRORCODE() StandardWarning(Warn:ViewOpenError) END #EMBED(%MGCBeforeOpenView,'MGC Before Opening the View') #! MGC OPEN(%ListView) #EMBED(%MGCAfterOpenView,'MGC After Opening the View') #! MGC IF ERRORCODE() StandardWarning(Warn:ViewOpenError) END #EMBED(%BeforeInitialGet,'Before first record retrieval') Regards Malcolm Collett ------------------------------ mcollett AT iafrica DOT com ============================== Printed November 23, 2024, 2:18 am This article has been viewed/printed 35243 times. Google search has resulted in 8 hits on this article since January 25, 2004. |