I have been requested to add the sum of an interger field to the table header. I have the sum in the footer (which is very easy to do), but I cannot get the sum to appear in the table header.
I then set-up the stored procedure to run the sum, and place it into a dummy field. I still cannot add this field to the table header. Instead of printing the data for the dummy field (the correct total), it instead prints the actual field name on the report.
Is there anyway to place a sum in a table header on a SQL Server Report?
Let me know.
Thank you,
T.J.
You should be able to just copy the code that you're using in the sum field in your table footer into a textbox in the table header.
Jarret
|||Thank you very much. I got busy and didn't get time to get back to this yesterday.
I tested this today, and if I just drop the field into a blank header cell, the number displays correctly.
But when I place this field in with text (such as "# of Boxes" and then add in the summed field, it displays the text of the field name, rather than the value (the number).
Very strange. When mixed with text, it displays the field name rather than the actual value.
Is there anyway to work around this?
Thank you,
T.J.
|||Can you post your expression you have in your textbox?
You should be able to use something like this:
="# of Boxes - " & count(Fields!boxes.Value)
Jarret
|||Yes, and thank you...
"# of Boxes - " & Sum(Fields_CountBoxes.Value)
When I preview this, it displays exactly like my formula.
Where if I just drop Sum(Fields_CountBoxes.Value) into the column header, it gives just the summed number I want to display.
|||You are missing the '='. Try putting this into your textbox:
="# of Boxes - " & Sum(Fields_CountBoxes.Value)
If you don't have the '=' at the front, it takes whatever you have in there as literal. The '=' makes it an expression.
Jarret
|||Oh, what an over sight.
Thank you very much, that fixed my error!
|||Glad I could help TJ. Can you mark this one as answered so others can see this solution?
Thanks.
Jarret
No comments:
Post a Comment