Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

To Get Subtraction in last Column of Cross Tab Report 1

Status
Not open for further replies.

crysln

Technical User
Jun 24, 2009
9
BH
Hi

I am using CRX-11 and MS SQL Server. I made a cross tab rpeort in which left side are the names of employee and right side are their salary details. Finally in the last column i want to showw the net salary of each employee.It will be his total earnings munus deduction. I have the earnings as well as deduction in the table but iam not able to get the net salary of the employee.
How can i subtract values in cross tab report.
If needed more description please let me know?

Thanks
 
Are the salary and deductions two separate summary fields in the crosstab expert? Or is there a column field that distinguishes the two and only one summary field?

-LB
 
I presume all records are positive figures but something identifies them as salary or deduction : e.g.
Employee Desc Amount
G Brown salary 5000.00
G Brown pension 1000.00

Create formula field "amount2": select description field
case "salary","Bonus","expenses": {amount)
default:(amount)*-1

then use the new amount in the pivot the total for G Brown will be + salary mimus deductions as the deductions are now a minus number.
If you want + and - columns to show the split, do a case statement to split the addition descriptions from deduction ones and then do

if (@split type) like "Addition" then {amount} else ({amount}*-1). I did the same thing recently to compare figures from one source with figs from the system to get the differences per month/year. Saved loads of work!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top