It seems such a trivial issue, I can’t imagine why SQL Server Reporting Services Team has not addressed this. It seems that this problem was in SQL Server 2000 Reports and is carried through SQL Server 2005 Reports.
Unfortunately, there is no solution available for this and it becomes so irritating not been able to find a solution for this extremely common requirement. Though there are advantages of using Reporting Services, but just because of small issues/bugs like these I am regretting my decision of using SQL Server Reports in the first place.
One workaround to this suggested on many groups/lists is to bind data values to a report item like TextBox and access this report Item in the Header to show the value. The following funciton can be added as a custom code in the report to retrieve the value of any report item.
Public Function GetItemValue(ByVal Items As ReportItems, ByVal item As String) As String
return Items(item).Value
End Function
However, this solution is fairly useless becuase the ReportItem value is only retrieved in the header if the Report Item is on the smae page. So, for example if the TextBox which contains the value is on the first page, then only first page header will contain the value. This actually negates the actual purpose of using the Header/Footer when it can only be used on only single page.
To get rid of the problem, I had to pass all the values which I had to show in Header as Report Parameters.