Why do available fields have Sum function applied?

  • Hello,

    I am working on a report project in Visual Studio 2005. (I'm modifying the form and it has a lot of other data besides mine.) I have created a dataset that performs a selection of rows from a table. In the "data" pane, I can choose the dataset, specify some parameter values and see rows of data.

    On the "layout" pane I am attempting to put the relevant fields in a tablix. I drop a table on the form. I put a textbox in one of the table's cells. I right-click on the textbox and choose "expression". I chose Datasets. I click on the dataset that I added. However, what is baffling is that the fields on the right all have the "Sum" function applied. (For example, Sum(Field1), Sum(Field2), etc.)

    I don't want a Sum, I want to place the field by itself in the textbox. When I remove the "Sum" function and save, I get this error: "The expression for the textbox....Report item expressions can only refer to fields within the current data set scope or, if inside an aggregate, the specified data set scope."

    I assume this error is because I removed the "Sum" function from the field I need, but I don't wish to have a text field summed! Does anyone know why the "Sum" function is applied to these fields in the first place?

    Thanks,

  • Do you by chance have a grouping set up on the tablix?

  • Hi higgim,

    I put a tablix on the report so that it is isolated from anything else. There is no grouping set up. When I attempt to fill one of the detail columns via an expression, and get to the dataset all the fields have the "Sum" function.

    Thanks,

  • This is normal behaviour. I have just tried this and removed the sum, what you get is basically the first value it comes across in the dataset.

    However, if you use a table instead of a tablix you get to see all values in the dataset. (I am using 2008 R2 as a side note)

  • OK, when I view the datasets window and identify one of the fields I wish to show in the tablix, then drop it in the intended column, it doesn't have the "Sum" function. It sure is strange that when I click on "expressions" that this is the case. However, I have what I need.

    Thanks,

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply