We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

RDLC Report Data Source

Thread ID:

Created:

Updated:

Platform:

Replies:

113619 Oct 2,2013 02:45 PM UTC Oct 4,2013 09:19 AM UTC Silverlight 4
loading
Tags: ReportViewer
Darren Hunnter
Asked On October 2, 2013 02:45 PM UTC

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.


Anandakumar S [Syncfusion]
Replied On October 3, 2013 05:24 AM UTC

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


Darren Hunnter
Replied On October 3, 2013 12:40 PM UTC

The example is not what I need, what we are doing is creating and xds file, and linking that to the RDLC file the RDLC dose not link to SQL Server, MDB, SDF or any other external data source. When I look at the xml of the report it gives me the following name space.

System.Data.DataSet.

The dataset is not connecting to any external data sources, I have created a class that I put data in to and then attach this to a report. If I view the report with the windows report viewer and the report works fine.

But when I load the report in to the silver light report viewer it will not render the report. If I take the dataset out of the report then the report renders.

So is it the fact that the control dose not understand the namespace System.Data.DataSet, when it is trying to render the report.

There are cases like ours where we store raw data in the database and then interpret this as the software this is going to be used with is bespoke and we dont store the interpreted data in the DB we just store the raw data and then process it.

So we need to be able to add an object to a dataset and then display the object.

The winforms object class is

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.EventArgsHandles 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.



Darren Hunnter
Replied On October 3, 2013 01:43 PM UTC

Woops it was me been stupped I changed the processing mode to local from remote that seem to allow the report to render.

 


Ragavan G [Syncfusion]
Replied On October 4, 2013 09:19 AM UTC

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 .

Thanks ,

Ragavan G


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;