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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pesty Error in Report Cell???

Status
Not open for further replies.

sconti11

Technical User
Jan 31, 2011
95
US
For the past hour I have tried to resolve an error within my SSRS 2005 report. It should not be an issue, but it is!

I have a cell within a matrix that is a calculated field which I created within the dataset fields. This calculated field is doing the following simple aggregation:

=Fields!cell1.Value - (Fields!cell2.Value + Fields!cell3.Value)

I continue to get the Error# within the calculated cell.

But when I write the same calculation directly into the expression of the cell, then it works??

The reason I need the calculation within the dataset field is because I need to use that value as part of another calculation.

Anybody know what is happening, and what I can do to get it to work?
 
Is that the exact expression you are using?
What are the field names in teh dataset?
Can you describe the fields that are used as the row/column groups and the data field(s) in the matrix?

When you preview the dataset, what do you see for the calculated field?

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
Here is the expression that I have within the dataset calculated field, and this is called Gross_Margin:

=Fields!Sales_Dol.Value - (Fields!CM_Paid_Dol.Value + Fields!Warranty_Dol.Value)

So, as I stated I needed to place the formula above within the cell expression like this:

=Sum(Fields!Sales_Dol.Value) - (Sum(Fields!CM_Paid_Dol.Value) + Sum(Fields!Warranty_Dol.Value))

But the next row below is using Gross_Margin as part of its expression, like this:

=ReportItems!Gross_Margin.Value / Fields!Sales_Dol.Value

I just get zero...
 
I ran into another issue that is related to my opening question about cell exporessions within the matrix.

Now I have the following formula within a cell of a matrix:

=(Sum(Fields!B_Completed_Dol.Value) \ Sum(Fields!B_AJS_Completed.Value)) \ Sum(Fields!B_Completion_Ratio.Value)

When I preview the data, the calculation stops after the first group of calculations, and gives me that number???

All the fields within this calculation are found wihtin the same dataset

Does anybody have any suggestions?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top