Using Temporary table
Temporary tables can be create and populated within XML reports and can be useful in a number of ways. (See Temporary Tables for details)..
T-SQL - Functions
Build in functions within T-SQL can be used. (See T-SQL Functions for details).
User Defined Functions (UDF)
There are a number of useful User Defined functions which can be used in XML reports. See Using UDF's for details. User entered parameters can be used in UDF's, but there are some restrictions on this. (see UDF and Parameters for details). It is also possible to add your own UDF's to the database if you have the appropriate skill in Transact SQL programmimg.
DMAP can accept .CSV files which can be generated through XML reports. However, there si now an addin which produces DMAP output ands this is a preferred option.
For various purposes it is sometimes useful to be able to add a sequential number to a temporary table. This can be done, but the process is not that efficient should be used only if absolutely necessary. The main reason would be to supply a sequential number to an application which requires it. For more detail see Sequential Number..