This topic is locked

Percent Of Total On List Page

5/16/2013 2:28:56 PM
ASPRunnerPro General questions
author

I would like to create a column that would display a percentage of total based on the total records displayed. At first blush I don't think I can do this without dipping into the database using the search criteria, but if there is an easier way I would love to know.
My percentage column would have custom format something like this:

strValue = data("pageTotal")/data("myLineTotal")

Is there a way of using the total at the bottom of the page or is it not available?
If that is not possible, it has been so long since I have done this, but how can I grab the search criteria to pass to the database in a query string?

Sergey Kornilov admin 5/16/2013

Unfortunately it won't work this way. Totals are not calculated yet when you trying to calculate percentage.
The only solution is calculate totals manually using event like BeforeProcess, save it to session variable and then use this session variable in your calculations.