If we are talking about SQL RS 2005 - then I don't think you can do it programmatically in the report. You can try doing it for embedded reports from a .NET application, but for plain reports don't really know how or where you would do it... There is ability to use VB coding as functions, but not to an extend of manipulating with datasets.