I found a nice little feature in SQL Server Reporting Services (SSRS) today. Through the expression "=dataset!<dataset name>.commandtext" the query executed by the dataset can be returned to the report. There is also a rewrittencommandtext function
Read More...