2008-05-09

SQL Server 2005 Reports: tips

SSRS:
  • Page Header:
    • TextBox via Expression...: =Globals.ReportFolder & Globals.ReportName
  • Page Footer:
    • Page Footer: TextBox via Expression...: =Format(Globals!PageNumber) & " of " & Format(Globals!TotalPages) & " pages"
    • ="Printed by " & User!UserID & " on " & DateTime.Now.ToString()
    • ="Execution Time: " & IIF(System.DateTime.Now.Subtract(Globals!ExecutionTime).TotalSeconds < 1, "0 seconds", ( IIF(System.DateTime.Now.Subtract(Globals!ExecutionTime).Hours > 0, System.DateTime.Now.Subtract(Globals!ExecutionTime).Hours & " hour(s), ", "") & IIf(System.DateTime.Now.Subtract(Globals!ExecutionTime).Minutes > 0, System.DateTime.Now.Subtract(Globals!ExecutionTime).Minutes & " minute(s), ", "") & IIf(System.DateTime.Now.Subtract(Globals!ExecutionTime).Seconds > 0, System.DateTime.Now.Subtract(Globals!ExecutionTime).Seconds & " second(s)", "")) )
  • Body:
    • TextBox via Expression...: =Format(Sum(Fields!Account.Value), "C0") (Works if column is numeric data type.)
    • Alternate rows by adding the following to the row via Properties > BackgroundColor expression of your detail row: =IIF(RowNumber(Nothing) Mod 2, "White", "Gainsboro")
Post a Comment