SQL Server Report Builder - Dynamic report for Header infomation
Hi I have the following client requirement, End users can drag and drop the fields in header part for each employee details like employee Name, Employee Code,Address,etc.Is it possible to display in Sql server Reporting services header?.
April 11th, 2009 7:26am

Hi giran, Putting fields in the page header and footer is not the same as putting a data region in these sections. Because of the impact on layout, we do not want to have growing items in these sections. Therefore, any fields in these regions will be a single textbox at a report level aggregate scope (so there is only one instance). To use a field in the page header and footer, you can use one of the following solutions: 1. Referencing a textbox in the body of the report using =ReportItems!TextboxName.Value syntax. This is very useful for useful for dictionary or address book style reports as it allows you to reference the first or last instance of a textbox in the page. The challenge with this approach is that you need to make sure that the textbox appears on every page, which can be a tough in some reports. 2. Using hidden parameters. To do this, create a new data set that contains the values that you want to put in the report.In general, the query should only return a single row.After defining the data set, create a hidden parameter for each value you want to display. Set both of the available values and the default values for these parameter to the data set and field that contains the information that you want to show. Then you can simply add them to the page header or footer using the =Parameters!ParameterName.Value syntax. 3. Using an aggregate function. Such as First,Last, and so on. For your request, you can use any of the following solutions to solve the issue: 1. Any one of the above solutions 2. Add a table in the top of the body, drag and drop the fields into the table to solve the issue. As a side-note, for using fields in page header or footer in Reporting Services 2005, please read this older postingon Brian Welcker's blog. If you have any more questions, please feel free to ask. Thanks, JinJin Chen - MSFT
Free Windows Admin Tool Kit Click here and download it now
April 14th, 2009 6:18am

Some times we want to display some dynamic content like database-driven value to appear in the page header and footer section in the SQLReport, that functionality can be acheived by putting a textbox in the header/footer section and have it refer to a TextBox value which is bound to a dataset field in the Report body section. So the steps can be as follows. i) Put a Text Box in the Body section in the Report page and bind it with the appropriate dataset field value that is required to be displayed in the header/footer. You can make it hidden field as well so the end user can not see it in the Report. ii) Put a Text Box in the header/footer section of the Report and write an expression which in turn would refer to the above placed Text Box value. e.g : Suppose we have a TextBox as txtConsigneeName in the Report body section and we want to display that value in the header, then what we can do is just put another TextBox in the header section and write an expression as First(ReportItems!txtConsigneeName.Value) One thing should be noted that we can not write/refer directly to a dataset field from a TextBox in a page Header/Footer. Hope this added value.Any suggestions are appreciated Cheers, Eliza
March 30th, 2010 3:36pm

hi, now i know how to add fields data on header or footer..now my question is, if i have a date textbox (dd/mm/yyyy) and i want to display only the month (january,february n etc) and year on the header, how i'm gonna to do? thank you in advance =)
Free Windows Admin Tool Kit Click here and download it now
January 31st, 2011 11:07pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics