|  | @@ -285,6 +285,22 @@ namespace InABox.DynamicGrid
 | 
	
		
			
				|  |  |          #endregion
 | 
	
		
			
				|  |  |          
 | 
	
		
			
				|  |  |          #region Report Generator
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        private static string ElementName(HashSet<string> names, string name)
 | 
	
		
			
				|  |  | +        {
 | 
	
		
			
				|  |  | +            int i = 0;
 | 
	
		
			
				|  |  | +            if(names.Contains(name))
 | 
	
		
			
				|  |  | +            {
 | 
	
		
			
				|  |  | +                string newName;
 | 
	
		
			
				|  |  | +                do
 | 
	
		
			
				|  |  | +                {
 | 
	
		
			
				|  |  | +                    newName = $"{name}{i}";
 | 
	
		
			
				|  |  | +                    ++i;
 | 
	
		
			
				|  |  | +                } while (names.Contains(newName));
 | 
	
		
			
				|  |  | +                name = newName;
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            return name;
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  |          
 | 
	
		
			
				|  |  |          public static Report? GenerateReport(DigitalFormLayout layout, DataModel model)
 | 
	
		
			
				|  |  |          {
 | 
	
	
		
			
				|  | @@ -306,16 +322,21 @@ namespace InABox.DynamicGrid
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |              var formData = report.GetDataSource("Form_Data");
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -            var band = new DataBand();
 | 
	
		
			
				|  |  | -            band.Name = "Data1";
 | 
	
		
			
				|  |  | -            band.Height = Units.Millimeters * (page.PaperHeight - (page.TopMargin + page.BottomMargin));
 | 
	
		
			
				|  |  | -            band.Width = Units.Millimeters * (page.PaperWidth - (page.LeftMargin + page.RightMargin));
 | 
	
		
			
				|  |  | -            band.PrintIfDatasourceEmpty = true;
 | 
	
		
			
				|  |  | -            band.DataSource = formData;
 | 
	
		
			
				|  |  | +            var band = new DataBand
 | 
	
		
			
				|  |  | +            {
 | 
	
		
			
				|  |  | +                Name = "Data1",
 | 
	
		
			
				|  |  | +                Height = Units.Millimeters * (page.PaperHeight - (page.TopMargin + page.BottomMargin)),
 | 
	
		
			
				|  |  | +                Width = Units.Millimeters * (page.PaperWidth - (page.LeftMargin + page.RightMargin)),
 | 
	
		
			
				|  |  | +                PrintIfDatasourceEmpty = true,
 | 
	
		
			
				|  |  | +                DataSource = formData
 | 
	
		
			
				|  |  | +            };
 | 
	
		
			
				|  |  |              page.AddChild(band);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +            var elementNames = new HashSet<string>();
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |              var table = new TableObject()
 | 
	
		
			
				|  |  |              {
 | 
	
		
			
				|  |  | +                Name = "FormTable",
 | 
	
		
			
				|  |  |                  ColumnCount = dfLayout.ColumnWidths.Count,
 | 
	
		
			
				|  |  |                  RowCount = dfLayout.RowHeights.Count
 | 
	
		
			
				|  |  |              };
 | 
	
	
		
			
				|  | @@ -335,6 +356,8 @@ namespace InABox.DynamicGrid
 | 
	
		
			
				|  |  |                      {
 | 
	
		
			
				|  |  |                          var manualHeight = 0.0f;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +                        cell.Name = ElementName(elementNames, $"Cell_{new string(field.Name.Where(c => !Char.IsWhiteSpace(c)).ToArray())}");
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |                          var dataColumn = $"Form_Data.{field.Name}";
 | 
	
		
			
				|  |  |                          if(field is DFLayoutEmbeddedImage || field is DFLayoutSignaturePad)
 | 
	
		
			
				|  |  |                          {
 | 
	
	
		
			
				|  | @@ -389,10 +412,12 @@ namespace InABox.DynamicGrid
 | 
	
		
			
				|  |  |                              label.Style.BackgroundColour = Color.WhiteSmoke;
 | 
	
		
			
				|  |  |                          }
 | 
	
		
			
				|  |  |                          cell.Text = label.Description;
 | 
	
		
			
				|  |  | +                        cell.Name = ElementName(elementNames, "Label_" + element.Row + "_" + element.Column);
 | 
	
		
			
				|  |  |                          ApplyStyle(cell, label.Style);
 | 
	
		
			
				|  |  |                      }
 | 
	
		
			
				|  |  |                      else if (element is DFLayoutHeader header)
 | 
	
		
			
				|  |  |                      {
 | 
	
		
			
				|  |  | +                        cell.Name = ElementName(elementNames, "Header_" + element.Row + "_" + element.Column);
 | 
	
		
			
				|  |  |                          cell.Text = header.Header;
 | 
	
		
			
				|  |  |                          ApplyStyle(cell, header.Style);
 | 
	
		
			
				|  |  |                      }
 |