Using Microsoft Reports (.rdlc) in a 3-tier application

I am new to reporting, so I need good information / resources to help me get some reports created in our 3-tier application.

Currently we have: UI (ASP.Net MVC 2 at present, but also winforms in the future), Business Logic and DAL (Entity Framework - only for code, i.e. without edmx)

BL has “control” objects for selecting and managing objects.

Now, I started by creating a .rdlc report and choosing an object as a data source that wraps BL managers to get the relevant records.

Now I'm trying to add a front-end to see if my report works ... I believe that there is no good way to make ReportViewer in a pure MVC way, so I plan to use the .aspx web form. I added a ReportViewer control, but I don’t know how to connect it to my report ...

I expected to create a copy of the report I created (which lives in BL) and transmit it to the viewer. But it looks like this is not how it should work?

I googled and only found links to ReportViewer either to access the url or to the local file for rdlc.

(For now, suppose I don't have access to SSRS)

, URL-. rdlc, , , ObjectDataSource - .

URL-, , -, , , -/DAL. , 2 - .

, , , , , , , -, - . winforms BL .

-, , .

, , .Net 4, VS2010, MVC 2 IIS 7.

+1
1

, ASP, , , .
WinForms :

  • ( )
  • ( )

, . .

With rptVwr.LocalReport
    'use this if the report is embedded in the project                     '
    'the name is of the following format [ProjectNamespace].[ReportName]   '
    .ReportEmbeddedResource = "ObjectReport.SampleReport.rdlc"

    'use the ReportPath if the report is stored somewhere else             '
    .ReportPath = "C:\Path\to\your\report" 'For demonstration purposes only'
End With

, , , .

, "" . , .


1
MSDN, , . . , , .

CodeProject, .

, :

  • ProcessingMode Server.
  • (url) ServerReport.ReportServerUrl.
  • ServerReport.ReportPath.

Properties Window for Server Reports


:

LocalReport ReportViewer > . - ServerReoprt ReportViewer > .

+1

Source: https://habr.com/ru/post/1569346/


All Articles