I have a MVC4 application in Visual Studio 2010 which contains plenty of classes. I'm trying to use them to pass in as the DataSource for a Report Definition Language Client (RDLC) file. But I can't access the classes from my assembly anywhere in the data source designer
According to the MSDN Walkthrough on Using a Business Object Data Source with the ReportViewer Web Server Control in Local Processing Mode, I should be able to do so in the Dataset Properties page
In the Dataset Properties page, in the Data source box, select global.
According to this Stackoverflow question on How to use an Object data source in report (.rdlc), when in Dataset Properties page, I should be able to create a new data source like this:
Creating a New Data source:
- Select Object and click Next.
- Browse the solution tree and select the class(es) you want to bind to.
- Click Finish.
But neither of these present as options...
When I create a new dataset, nothing shows up under Data Source:
When I click New to create a New DataSource, I just get a connection Wizard that forces me to connect to a database:
Where can I add classes from my assembly?
As a trivial example, here's an example of an object I have built into the assembly that I would expect to show up:
<!-- language: lang-vb -->Public Class Employee
Public Property Name As String
Public Property ID As Integer
End Class
I would eventually like to populate this information programmatically like this:
<!-- language: lang-vb -->Dim lr As New LocalReport
lr.ReportPath = Server.MapPath("~\Reports\Report1.rdlc")
lr.DataSources.Add(New ReportDataSource("Data", New Employee("Kyle",27)))