Partager via


Give Blood (Report Expressions in Report Builder)

It's not obvious, but SQL Server 2005 Report Builder allows you to use expressions in textboxes on the report surface. You don't get an expression editor, but if you begin a textbox value with '=', it will be evaluated at report processing time. For example, you can add a time / date stamp to a report by using =Globals.ExecutionTime.ToString("f"). Since you can't set the formatting property, you will have to format the string yourself if you don't like the default format.

Comments

  • Anonymous
    January 04, 2006
    may I add a column show a field value in the matrix after I have a column group ?
  • Anonymous
    January 30, 2006
    Not sure what you are asking. You want to add a field value to the matrix after you have defined a column group? This is just basic matrix manipulation.
  • Anonymous
    March 11, 2006
    Hello Brian,

    i am looking for a way to create report parameters in Report Builder. Is there any way to do that?

    Enrico
  • Anonymous
    March 26, 2006
    For parameters in Report Builder, in the filter dialog, click on the left hand item (attribute or entitry) and select prompt.
  • Anonymous
    July 26, 2006
    The comment has been removed
  • Anonymous
    July 28, 2006
    I just posted an entry on how to do this at http://blogs.msdn.com/bwelcker/archive/2006/07/29/682444.aspx.
  • Anonymous
    September 26, 2006
    I assume I can add page numbers this way? Ideally, Page # of ##.
  • Anonymous
    September 28, 2006
    Unfortunately, Report Builder doesn't provide access to the Report Header and Footer and you can't use page numbers in the body. This is possible in Report Designer.