title: Using Microsoft Reports (.rdlc) in a 3-Tier app
body: <p>I'm new to reporting so need some good information/resources to help me get some reports set up in our 3-tier app.</p>
  
  <p>We currently have: UI (ASP.Net MVC 2 at present but also winforms in future), Business Logic and DAL (Entity Framework - Code-Only ie no edmx)</p>
  
  <p>The BL has "manager" objects for selecting and manipulating entities.</p>
  
  <p>Now I've started by creating a <strong>.rdlc</strong> report and have chosen as a data source an object which wraps the BL managers to retrieve the appropriate records.</p>
  
  <p>Now I'm trying to add a front-end to see if my report works... I believe there's no good way to do a ReportViewer in a pure MVC way so I'm planning to use a .aspx webform. I've added the ReportViewer control but am unsure how to wire it up to my report...</p>
  
  <p>I had expected to instantiate the report I created (which lives in the BL) and pass it to the viewer - But this doesn't seem to be the way it's supposed to work?</p>
  
  <p>I've googled and have only found references to the ReportViewer either accessing a URL or a local file for the rdlc.</p>
  
  <p>(For the moment, assume I don't have access to SSRS)</p>
  
  <p>I don't see how either a local file OR a url helps me. If I were to point directly at the rdlc using a local path, I have no idea how I can properly initialise the ObjectDataSource - it relies on dependency injection and has a lot of dependencies.</p>
  
  <p>If I point at a URL, I presumably need a reporting server up - and if the report lives on there, there's no way it can reference my business logic/DAL - Which means I'm maintaining 2 methods of accessing data in parallel - which seems awful to me.</p>
  
  <p>I'm obviously approaching this wrong but most of the tutorials I can find assume the reports all live in the UI layer and have data sources specified on the webform itself - which is not what I need in this case. In theory, I should be able to provide a winforms front-end to the BL and have it generate exactly the same report with minimal effort.</p>
  
  <p>Can someone please point me in the right direction.</p>
  
  <p>Many thanks</p>
  
  <p>In case it's relevant, I'm using .Net 4, VS2010, MVC 2 and IIS 7.</p>