I have multiple reports I am trying to show in the viewer using the Report book. I have created them in the Report Builder which produces a .trdx file. I am able to put those in my application and when I run the page, I can see the reports placed properly but they have no data.
Public Function DeserializeReport(path As String) As Report
Dim settings As New System.Xml.XmlReaderSettings()
settings.IgnoreWhitespace = True
Using xmlReader As System.Xml.XmlReader = System.Xml.XmlReader.Create(path, settings)
Dim xmlSerializer As New Telerik.Reporting.XmlSerialization.ReportXmlSerializer()
Dim report As Telerik.Reporting.Report = DirectCast(xmlSerializer.Deserialize(xmlReader), Telerik.Reporting.Report)
Return report
End Using
End Function
Protected Sub GetCIReport()
'Dim CIReportSource As New Telerik.Reporting.UriReportSource()
'CIReportSource.Uri = "CONTACTINFORMATION.trdx"
Dim sqlCIData As SqlDataSource = New SqlDataSource()
sqlCIData.ConnectionString = "Data Source=********;Initial Catalog=AppForFinancing;Persist Security Info=True;User ID=**********;Password=*********"
sqlCIData.SelectCommand = "SELECT * FROM ContactInformation WHERE id=1"
CIReport.DataSource = sqlCIData
CIReport = DeserializeReport("C:\test.trdx")
End Sub
Protected Sub GetAffiliationsReport()
Dim sqlAffiliationsData As SqlDataSource = New SqlDataSource()
sqlAffiliationsData.ConnectionString = "Data Source=DATASERVER;Initial Catalog=AppForFinancing;Persist Security Info=True;User ID=*********;Password=**********"
sqlAffiliationsData.SelectCommand = "SELECT * FROM Affiliations WHERE id=1"
affiliationsReport.DataSource = sqlReligiousAffiliationsData
affiliationsReport = DeserializeReport("C:\test1.trdx")
End Sub
Like I said, both reports are showing correctly, there is just no data in the reports...What am I missing??? Thanks for the help.