If I understand you correctly, you could do it like this. First, create a stored procedure as the data source of your report and set it up to expect a parm called "@TableName". (Now all you need is a dynamic sql statement inside your stored procedure.) Next create a parm named "@sql" as a string. Then, set @sql = 'select col1, col2 from '+@tablename. Finally just do: "Exec (@sql)" Hope this helps.
|