Hi
I'm building a Local Report. Because of some limitations of the Hidden property, I need to dynamically generate the report.
I found some documentation here.
The ReportViewer Control needs a stream.
I don't really like the method that's used in the documentation. And building an XmlDocument isn't very readable imo.
Is there something stopping me from doing it like this
class Program { static void Main(string[] args) { GenerateReport(); }
static void GenerateReport(){
StringBuilder reportXml = new StringBuilder();
reportXml.Append("<Report>");
reportXml.Append("<PageHeight>8.5in</PageHeight>");
reportXml.Append("</Report>");
XmlDocument xmlDocument = new XmlDocument();
xmlDocument.LoadXml(reportXml.ToString());
xmlDocument.Save(@"C:\test.xml");
xmlDocument.Save(Console.Out);
Console.ReadLine();
}
}