Natasha
16th September 2004, 17:19
Hi
Baan 5
I want display total values for specified fields in the grid by function display.total.fields(). if user has chosen records with ‘View/Filter’ how I can count up a total values only the chosen records?
How to receive in script expression SQL which I can see pressing Ctrl-Shift-4?
malutz
17th September 2004, 09:41
Hej,
doesn't Baan automaticly caluculate the total fields correctly when using filters?
With the query.extend-functions you will be able to add new lines to the SQL-Statement.
lbencic
17th September 2004, 20:00
Baan will not total the fields for you, they just provide a space to put them in. The totals are done by the developer :(
2 different suggestions:
1. You can total in the after.read section. Each record goes through there, and they have already been filtered. Problem: you have to reset your total variable in a lot of places - I would say most of the choice.* / before.choice sections.
2. The variable: g.field.parts (on my system anyway) holds the query options picked in qbf, you can parse it out of there. Problem: you need to know dynamic sql to fit that into your sql.
Good luck
Natasha
22nd September 2004, 15:05
Thanks all
But in after.read section I can count up only those records which are visible on the form :(
lbencic
22nd September 2004, 18:49
Ugh, you're right, I missed that. Hmmmm....nobody knows where they store those values? Even that variable I gave you, in Baan V it's too small and does not hold everything. I also further researched and found the tables: ttadv992 and ttadv993 that seemed promising, but don't seem to hold anything. There is a query ID you have in hand, but I really don't know how to get the syntax query based on that ID - it's out there somewhere though.
One other not-so-hot suggestion is to remove the Filter option on the session you are trying to total, and instead provide a set of filter buttons for them. For example I have used filter buttons like:
show unprocessed
show all
show unapproved
You could even zoom them out to your own 'QBF' type session and store the values they enter. Then you can plainly program for those choices.
If anyone knows where the real QBF choices are stored though that would obviously be better.
Hitesh Shah
23rd September 2004, 08:42
If anyone knows where the real QBF choices are stored though that would obviously be better
ttstpqbf program remains in running status. Program variables hold the values till the main program runs. It communicates with main program bms commands and it modifies main table SQL ids upon change of values in it. It does not store any values in ttadv992 though apparently the table is appears to be for QBF. Variable bms.sender.process has the value of ttstpqbf process and u can get the values in ttstpqbf with get.var function.
vineetu1
29th July 2009, 09:17
I have exactly the same requirement what Natasha had...
Hi Natasha, what solution did you finally use ?
Hi Hitesh, can you further elaborate on what you have proposed, how to use it..