Hi,
What type of data source would I need to create to allow me to use a list(of xxxxxxx) where xxxxxxx is a derived class.
I have created an object that holds data about people I have tried to link it to a dataset in the RDLC file and when I do this it will not render?
How do I setup the schemer in the RDLC to match the object content. Your examples are not total clear on this.
Hi Darren,
Thanks for using Syncfusion Products.
Q) What type of data source would I need to create to allow
me to use a list(of xxxxxxx) where
xxxxxxx is a derived class.
A) DataSource with type IEnumerable collection of class works
with ReportViewer.
Please find sample for this in the following location.
Sample:http://www.syncfusion.com/downloads/support/directtrac/113888/InvoiceDemoVb-2109428047.zip
Please let us know if you have any questions.
Regards,
Anandakumar S
Public Class SalesPerson Private m_id As Int32 Private m_FullName As String = "" Private m_Title As String = "" Private m_SalesTerritory As String = "" Private m_ID2002 As String = "" Private m_ID2003 As String = "" Private m_ID2004 As String = "" Public Property id As Int32 Get Return m_id End Get Set(value As Int32) m_id = value End Set End Property Public Property FullName As String Get Return m_FullName End Get Set(value As String) m_FullName = value End Set End Property Public Property Title As String Get Return m_SalesTerritory End Get Set(value As String) m_SalesTerritory = value End Set End Property Public Property SalesTerritory As String Get Return m_SalesTerritory End Get Set(value As String) m_SalesTerritory = value End Set End Property Public Property ID2002 As String Get Return m_ID2002 End Get Set(value As String) m_ID2002 = value End Set End Property Public Property ID2003 As String Get Return m_ID2003 End Get Set(value As String) m_ID2003 = value End Set End Property Public Property ID2004 As String Get Return m_ID2004 End Get Set(value As String) m_ID2004 = value End Set End Property End Class
The code on form load of the windows form is
Imports Microsoft.Reporting.WinForms Imports System.Collections Public Class Form1 Dim ds As DataSet Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load Dim staff As New List(Of SalesPerson) Dim tempstaff As New SalesPerson 'Dim reportDataSource4 As New ReportDataSource() staff = New List(Of SalesPerson) tempstaff.id = 1 tempstaff.FullName = "Jason Smith" tempstaff.Title = "Sales Representative" tempstaff.SalesTerritory = "Northeast" tempstaff.ID2002 = "1375876.8256" tempstaff.ID2003 = "40" tempstaff.ID2004 = "4557045.0459" staff.Add(tempstaff) 'reportDataSource4.Name = "SalesPerson" 'reportDataSource4.Value = staff.ToList Me.ReportViewer1.LocalReport.ReportPath = "C:\Development\Silverlighttest\ReportTest\ReportTest\Reports\Report1.rdlc" 'Me.ReportViewer1.LocalReport.DataSources.Add(reportDataSource4) Me.ReportViewer1.LocalReport.DataSources.Add(New ReportDataSource With {.Name = "SalesPerson", .Value = staff.ToList}) Me.ReportViewer1.RefreshReport() 'ds = New DataSet 'ds.ReadXml("c:\temp18\1.xml") 'ds.WriteXmlSchema("c:\temp18\Data.xsd") End Sub End Class
As you can see I am createing a derived class of salesperson and then adding that to the report and it works.
But when I load the report in to the silverlight control you have created then the
report throughs uri errors Even if the report refrenced correctly.
I need to be able to set data in the report this way NOT LINKING TO ANY DATABASE, WE ONLY HAVE A DATASET ON THE
REPORT.
Can you please get back to be as soon as possible.....
Thanks.
Woops it was me been stupped I changed the processing mode to local from remote that seem to allow the report to render.
Hi Darren .
We are glad to know that your issue has been fixed .
Please let us know if you need further assistance regarding on this .
Ragavan G