private MemoryStream GenerateRdl(List <string> allFields, List <string> selectedFields)
        {
            MemoryStream ms  = new MemoryStream();
            RdlGenerator gen = new RdlGenerator();

            gen.AllFields      = allFields;
            gen.SelectedFields = selectedFields;
            gen.WriteXml(ms);
            ms.Position = 0;
            return(ms);
        }
        private MemoryStream GetReportDefinition()
        {
            List<ReportColumn> reportColumns = GetReportColumns();

            var ms = new MemoryStream();
            var gen = new RdlGenerator
                          {
                              AllFields = reportColumns,
                              SelectedFields = reportColumns
                          };

            gen.WriteXml(ms);
            ms.Position = 0;

            return ms;
        }