views:

671

answers:

1

My report is as follows:

One table provides financial information with sums at the group footer (Grouping is called "StockTable_Shipped"). The group is controlled by a boolean value (1=shows shipped data, 0 = shows received data)

The second table is a variance report for data that has been shipped (boolean value of 1) and has a sum at the bottom of the table.

My ultimate goal is to take the sum from table1 where shipped=1 and subtract it from the variance sum from table2.

This will be placed in a textbox at the bottom of the report.

I understand if this sounds confusing but I would be more then happy to provide more information.

A: 

If I were you, I would create a new calculated field which would hold the sum of all your Shipped Data (1's) not just the sum of all your data (1's and 0's).

After that, it should be as simple as putting in the expression that subtracts your calculated field from the Sum of your table2 field.

TheTXI
At the footer of my StockTable_Shipped group I have a Sum(Fields!ShippedPrice). However this provides the sum for both shipped and unshipped. I have tried =SUM(iif(Fields!Shipped.Value=1,Fields!ShippedPrice,0),"Table1Dataset") however this does not seem to give me the desired result.Is this what you mean in terms of calculated field?
Neomoon
=SUM(iif(Fields!Shipped.Value=1,Fields!ShippedPrice.Value,0),"Table1Dataset")sorry typo in my SUM()
Neomoon
Neomoon: You should be able to right click on your dataset and select "Add Field" which will allow you to create a calculated field which you can then use elsewhere.
TheTXI
Thanks, I understand the calculated field concept. What I am having trouble understanding is how I can sum only the prices who's Fields!Shipped.Value=1?The statement above results in errors. Is this along the lines of what you were trying to explain?
Neomoon