Пример #1
0
        static string GetReportData(ReportBuilder reportBuilder)
        {
            reportBuilder = InitAutoGenerateReport(reportBuilder);
            string rdlcXML = "";

            rdlcXML += @"<?xml version=""1.0"" encoding=""utf-8""?> 
                        <Report xmlns=""http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition""  
                        xmlns:rd=""http://schemas.microsoft.com/SQLServer/reporting/reportdesigner""> 
                      <Body>";

            string _tableData = GenerateTable(reportBuilder);

            if (_tableData.Trim() != "")
            {
                rdlcXML += @"<ReportItems>" + _tableData + @"</ReportItems>";
            }

            rdlcXML += $@"<Height>2.1162cm</Height> 
                        <Style /> 
                      </Body> 
                      <Width>20.8cm</Width> 
                      <Page> 
                        " + GetPageHeader(reportBuilder) + GetFooter(reportBuilder) + GetReportPageSettings(reportBuilder) + @" 
                        <Style /> 
                      </Page> 
                      <AutoRefresh>0</AutoRefresh> 
                        " + GetDataSet(reportBuilder) + $@" 
                      <Language>{DomainUtility.GetCulture()}</Language> 
                      <ConsumeContainerWhitespace>true</ConsumeContainerWhitespace> 
                      <rd:ReportUnitType>Cm</rd:ReportUnitType> 
                      <rd:ReportID>17efa4a3-5c39-4892-a44b-fbde95c96585</rd:ReportID> 
                    </Report>";
            return(rdlcXML);
        }