Ejemplo n.º 1
0
        public static PageReport BuildContentLayout(ReportWizardState state)
        {
            PageReport def = null;

            //check if Table can be created
            if (state.DisplayFields.Count > 0 || state.GroupingFields.Count > 0)
            {
                FileInfo masterFile = new FileInfo("../../" + state.SelectedMasterReport.MasterReportFile);
                def = PageReport.CreateFromMaster(new Uri(masterFile.FullName));
                CustomReportItem placeHolder   = (CustomReportItem)def.Report.Body.ReportItems[CRIName];
                Length           contentHeight = placeHolder.Height;
                Table            table         = BuildTable(state, contentHeight);
                placeHolder.ReportItems.Add(table);
            }
            if (def == null)
            {
                def = new PageReport();
                def.Report.Body.Height = "15cm";
                def.Report.Width       = "20cm";
            }
            return(def);
        }