Created
November 4, 2012 19:11
-
-
Save lohithgn/4013144 to your computer and use it in GitHub Desktop.
Report XML Serializer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
XmlReaderSettings settings = new XmlReaderSettings(); | |
settings.IgnoreWhitespace = true; | |
using (XmlReader xmlReader = XmlReader.Create(<.TRDX URI or .TRDX XML Content>, settings)) | |
{ | |
Telerik.Reporting.XmlSerialization.ReportXmlSerializer xmlSerializer = | |
new Telerik.Reporting.XmlSerialization.ReportXmlSerializer(); | |
Telerik.Reporting.Report report = (Telerik.Reporting.Report)xmlSerializer.Deserialize(xmlReader); | |
(report.DataSource as SqlDataSource).ConnectionString = "<Connection String OR Connection String Name>"; | |
reportViewer.Report = report; | |
reportViewer.RefreshReport(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment