views:

111

answers:

1

Hi all, I have the following issue: I have a report that uses a Dataset as its datasource. The dataset has two tables, one would be the main table, say Employee, and the second table is EmployeePaycheck, so an employee can have several paychecks. I can compute the sum of a column in the second table, say paycheckValue, but what I can't seem to do is also add to this computed field the value of some additional fields in the Employee table, such as ChristmasBonus or YearlyBonus, to see how much the employee was paid at the end of the year. Could someone help me with that, please? Thanks.

+1  A: 

Without knowing more information on this it will be difficult to answer, but I'll give you a couple things to look for.

First, I would make sure that the fields are of a similar type that will allow for a summary. For example, if one is a string then a summary wouldn't be able to be done without casting or convertingthe value to a number. I'm assuming that the fields are probably number or decimal columns so that is probably not the case.

I'd also check to make sure that none of the values that you are trying to sum are null. I haven't tested this, but I believe that it will not sum correctly if one of the rows has a null value. In this scenario you should just be able to use a formula field to check for the null and if the field is null return 0 instead. Then you can use the formula field in your calculations instead of the field itself.

If neither of these are the case please provide a little more info how you are computing the fields and what is happening when you do it.

Hope this helps.

Dusty
Hi Dusty, I managed to solve the problem in the mean time, It seems I had an error in the formaul I edited for that, though I don't understand what could have happened. Anyway, the formula should be something like: {Employee.Column1} + {Employee.Column2} + SUM({EmployeePaycheck.Column1})
Sorryn