I have an Xdocument object which is populated with xml (the definition for a report -rdl). I would like to give the contents of this XDocument to the report viewer.
this.reportViewer1.LocalReport.LoadReportDefinition();
LoadReportDefinition only seems to take either TextReader or FileStream arguments….but my report definition is loaded within my XDocument? How can I stream the contents of my XDocument?
You can use the
StringReaderclass like so:Or alternatively use a
Stream: