I have a data block, under I have a summary field. I receive about 2 mln records but it takes to much time. It is very annoying for user so i decided to execute summary function using button only for user whos want to wait.
And now is a problem. When users use own query to filtr records I can't find the query to use it in my when-button-pressed trigger.
I spend a lot of time resolving this problem so please help me :(
I tried :system.last_query but I didn't know how can i use it in sql statement. I fought that :system.last_query is string for use is in property of data block named "where clausule"?. I also tried enable and disable properties of summary field but I can't find how to use set_property for calculation section of this control.
Thanks for yours answers. I will try solution with substr but i think that I don't have to use record group when I get "where section". Do you think it will be faster to get SUM straight from database?