Concatenate two columns in reportviewer
Hi,
I am using reportviewer control in .net 3.5. In report, display fields based on group by invoice number. When I try to concatenate two columns in the body of the 'Table" control, getting error. Pls help. Thanks in advance.
December 21st, 2010 4:50pm
Can it be done in data set , meaning via T-SQL such as
SELECT Lastname+FirstName AS Surname FROM .....Best Regards, Uri Dimant SQL Server MVP http://dimantdatabasesolutions.blogspot.com/ http://sqlblog.com/blogs/uri_dimant/
Free Windows Admin Tool Kit Click here and download it now
December 21st, 2010 5:29pm
Hi rhari_139,
In detaile row, we can use the following expression to concatenate two fields:
=Fields!fieldA.Value & " " & Fields!fieldB.Value
However, in group header or footer, we must use the aggregate function such as First for the filed:
=First(Fields!fieldA.Value, "Group1") & " " & First(Fields!fieldB.Value, "Group1")
Thanks,
Jin ChenJin Chen - MSFT
December 22nd, 2010 4:48pm