Calculations on crosstabs
My crosstab is to show a summary of sales compared to budgets
The columns are sales types.
The rows are salespeople with a value for the Sales amount, the Budget
amount and a % of budget.
My query has the % calculation for each salesperson.
I need a way of accessing the total sales and budgets in the grand totals to
calculate the % correctly as the cross tab just adds these together.
Any suggestions?
The columns are sales types.
The rows are salespeople with a value for the Sales amount, the Budget
amount and a % of budget.
My query has the % calculation for each salesperson.
I need a way of accessing the total sales and budgets in the grand totals to
calculate the % correctly as the cross tab just adds these together.
Any suggestions?
This discussion has been closed.
Comments
You can use the TppCrosstab.AfterCalc event to access the TppMatrix
after it has been generated but before anything has been rendered.
Then you can use the TppMatrix (TppCrosstab.Matrix) to access the values
of any cells you need. Matrix.Value().
See the help topics for TppCrosstab, TppMatrix, and TppElement for more
help with these classes.
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
So is it Crosstab1.Matrix[Row,Column].Value to access the cells ?
The correct syntax to obtain a cell value would be
CrossTab1.Matrix.Value[Column, Row];
See the help topic for TppMatrix.Value for this and other interface
declarations. I also suggest taking a look at the help topic for the
TppElement class. This gives a nice diagram of the different parts of a
crosstab component.
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com