This was an issue for me a while back. I was making a report using SQL Server Reporting Services (SSRS) in SQL 2005 and I needed to put data into a textbox in the header. After searching the internet fairly thoroughly I found many posts and articles that pointed me in the right direction but they just didn’t work for me.
The solution I used was to place a textbox on the body of the report and make it hidden. In the textbox I would add in the data I needed (i.e. =Fields or =Countrows). I would then set that textbox to RepeatWith the table in the body.
In the header I would place a textbox and have it set to =ReportItems!hidden_textbox.Value.
Just doing that would give me the data in the header but only on the last page of the report (note if your report is only one page you might not experience this frustration). To get the data to show in the header for each page I needed to move the textbox so it was positioned on top of the table. The easiest way to do this was to change the Left and Top Location properties of the textbox. It makes it a little hard to see parts of the table since the textbox covers up parts of it but it gets the data in the header.