Using a .NET class as a data source with SSRS RDLC

I have an MVC4 application in Visual Studio 2010 that contains many classes. I am trying to use them for transmission as a data source for a client Report Definition Language ( RDLC ). But I cannot access classes from my assembly anywhere in the data source constructor

According to the MSDN Walkthrough on Using a business object data source using the ReportViewer web server management tool in local processing mode , I should be able to do this on the Dataset Properties page

On the Dataset Properties page , in the Datasource field , select global .

According to this Stackoverflow question on How to use an object's data source in a report (.rdlc) , when on the “Dataset Properties” page I should be able to create a new data source:

Create a new data source :

  • Select the object and click "Next."
  • Browse the decision tree and select the class (s) to which you want to bind.
  • Click Finish.

But not one of them is present as parameters ...

When I create a new dataset, nothing is displayed in the data source:

DataSet Properties

"" , , :

Data Source Configuration Wizard

?

, , , :

Public Class Employee
    Public Property Name As String
    Public Property ID As Integer
End Class

:

Dim lr As New LocalReport
lr.ReportPath = Server.MapPath("~\Reports\Report1.rdlc")
lr.DataSources.Add(New ReportDataSource("Data", New Employee("Kyle",27)))
+6
2

, .

1 (okay)

, MVC Web Application, (, ). Visual Studio 2010 Report Viewer - Object Datasource, rdlc. :

data source configuration wizard

2 ()

- RDLC ASP.NET MVC, aspx MVC, Visual Studio .

:

  • .
  • WebForm1.aspx
  • RDLC DataSource :

    DataSource Dropdown

+13

. Bin Obj .

Visual Studio 2015 ASP.NET MVC5 RDLC. . // RDLC.

Bin Obj ,

+2

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


All Articles