Tuesday, May 1, 2012

Add Header and Footer for your Report

Method 1:

  Select Report--> Add Page Header. Or Report--> Add Page Footer.



Method 2:
 
   Right  Click on your report select Insert-->, then choose Page Header, Or Page Footer



Where we have to use Page Header and Footer?

1. Where we have to use page number, Total pages etc. 

2. Where we have to display the particular content on every page. (Ex: Header, Footer Page Number)





How to retrieve the table's particular cell value or Textbox

Note:


        Step 1:  Select anyone of table cell or Textbox in your SSRS report.



        Step 2:  Note that cell name or textbox name in properties.

        Step 3:  Then you can retrieve and use that value in anywhere, Like ReportItems!Textbox1.Value
                       Ex: ReportItems!TextboxName.Value



Fields in SSRS

Fields:


Note:

       Ex: (=Fields!bgt_rq_nbr_id.Value)
1. If you used this in table or list etc. The total values will display from dataset. The table will fetch the value one by one from dataset.

About DataSet in SSRS

DataSet:

Note:
        your datasource can be stored procedure or table etc. Anyway your result will be a dataset only.
you can see the list of dataset column names(First value of each column. Ex:=First(Fields!ColumnName.Value, "DataSetName")) in Expression window.



To Find a last value of dataset, 

Ex: Last(Fields!ColumnName.Value, "DataSetName")

Note:
        If you used(=First(Fields!ColumnName.Value, "DataSetName"))  this in table,the same value(first value) will repeated. For  Example, if dataset contains 100 recordes, it will repeat for 100 times. Because it pointing the first value position of dataset.




Create Variables and Constants

1.Select Expression.

2.Select Report in menu bar. Report--> Report Properties. Then Select Variables.

3.Here Read Only property is checked. Then you cant reassign value to this variable. Also you can enter your own expression by clicking          fx    button(Uncheck the readonly property). 

4. Now you check the variables list in Expression window.


5. Now you can use this variable in your project. :) 

Build-In-Fields




1.       Rigth click on TextBox or Table Cell etc. Select Expression.


2.       Select Build-In-Fields.


ExecutionTime:
The date and time that the report began to run.( =Globals!ExecutionTime)


Language:
The language ID of the client running the report.(=User-language)
Ex: (=User!language) – is              en-US.


OverallPageNumber:
The current overall page number. Can be used only in a page header or footer.
Note:
It returns the current page number.


OverallTotalPages:
The total number of pages in the report. Can be used only in a page header and footer.
Note:
 It returns the total number of pages generated.


PageName:
The name of the current page in the report. Can be used only in page header or footer.


PageNumber:
The current page number, which can be reset through the use of page breaks. Can be used only in page header or footer.
Note:
Its similar to OverallPageNumber.The difference is PageNumber can be reset through page break.


RenderFormat.Name:
The name of the renderer as registered in the RSReportServer configuration file.
Ex: Globales!RenderFormat.Name ----   IMAGE


ReportFolder:
The full path to the folder containing the report. This does not include the report server URL.
Ex: Globals!ReportFolder


ReportName:
The name of the report as it is stored in the report server database.
Ex: Globals!ReportName


ReportServerUrl
The URL of the report server on which the report is being run.
Ex: =Globals!ReportServerUrl


TotalPages:
The total number of pages in the current continous page sequence. The number can be reset by using page breaks. Can be used only in a page header and footer.
Ex:=Globals!TotalPages ----  Current Total Pages. It can be reset by the page breaks or group break etc.


UserId:
The ID of the user running the report.
Ex: =User!UserID  ----   Will returns the current user Name and group name.