0

I have a report that has two datasets. One contains detail with a total amount. The second is a dataset that contains data for breaking down totals by description.

The expression I am having difficulty with is one the second tablex for dataset2. It is a calculation to find the percentage of the description totals against the grand total amount from dataset1.

It appears that the dataset1 total is correct, the problem is that the calculation which is on a total line for the description group appears to be calculating based on the grand total of the description set instead of the total of the description group.

Here is the expression in question:

=iif(sum(Fields!credit_amt.Value, "DataSet2")<0,abs(Sum(Fields!credit_amt.Value, "DataSet2")/Sum(Fields!NonCredit_total.Value, "DataSet2")),0)

I am working with Visual Studio 2008 / SLQ Server 2008 R2

Any ideas???

VladoDemcak
  • 4,893
  • 4
  • 35
  • 42
PadreBob
  • 1
  • 2
  • If you use the dataset name (DataSet2) as the Group, it will SUM the total in the dataset. If you are doing this in a table with grouping, you should use the group name - you may not need a group name at all if you're on a Total line. – Hannover Fist Oct 13 '16 at 18:36
  • I have a row grouped on Reason_code in dataset2 – PadreBob Oct 13 '16 at 19:49
  • Here is the report layout and the results I am getting. Sorry, I apparently can not add a screen shot. – PadreBob Oct 14 '16 at 10:32

0 Answers0