title: Can I create an RDLC dynamically and pass it to report viewer instead of using a file?
body: <p>My problem is that I need Ad-Hoc reports with variable queries and variable content/columns/etc. customized and saved per user and I don't have a solution yet.</p>
  
  <p>I have an MVC 4 C# application with a SQL Server database and I have SSRS available.</p>
  
  <p>I'm looking at displaying reports using the visual studio report viewer.  </p>
  
  <p><a href="http://www.code-magazine.com/articleprint.aspx?quickid=1009061&amp;printmode=true" rel="nofollow">This</a> is a simple example of putting the reportViewer into an MVC application on a web forms page.</p>
  
  <p>The report viewer can show different reports by changing the reportViewer's source dataset, ReportPath and ReportServerURL</p>
  
  <p>In code, I see examples <a href="http://www.vbforums.com/showthread.php?717175-How-to-use-Report-Viewer-with-Visual-Studio-2012-Express" rel="nofollow">like this</a> where I can override the dataset and path to the RDLC file, but what I would like to do is just pass a dynamically generated dataset and RDLC file to the viewer.  This would give me the flexibility to build and save the user's report template in the database, and then just recall it and run the report.</p>
  
  <p>Is this possible, or am I barking up the wrong tree?</p>