diff --git a/bsmd.ReportGenerator/BSMDDocument.cs b/bsmd.ReportGenerator/BSMDDocument.cs index 96f6b710..d1f5bdf1 100644 --- a/bsmd.ReportGenerator/BSMDDocument.cs +++ b/bsmd.ReportGenerator/BSMDDocument.cs @@ -1595,13 +1595,13 @@ namespace bsmd.ReportGenerator row.Cells[0].AddParagraph(pos.Identifier ?? ""); row.Cells[1].AddParagraph(string.Format("{0}\n{1}",pos.ContainerNumber, pos.VehicleLicenseNumber)); row.Cells[2].AddParagraph(pos.StowagePosition.IsNullOrEmpty() ? string.Format("{0} {1} {2}", pos.Bay, pos.Row, pos.Tier) : pos.StowagePosition); - row.Cells[3].AddParagraph(pos.IMOClass); - row.Cells[4].AddParagraph(pos.UNNumber); + row.Cells[3].AddParagraph(pos.IMOClass ?? ""); + row.Cells[4].AddParagraph(pos.UNNumber ?? ""); row.Cells[5].AddParagraph(DatabaseEntity_ReportReplacer("PackingGroup", pos.PackingGroup.ToString())); row.Cells[6].AddParagraph((pos.MarinePollutant ?? false) ? "Y" : "N"); - row.Cells[7].AddParagraph(pos.Flashpoint_CEL); + row.Cells[7].AddParagraph(pos.Flashpoint_CEL ?? ""); row.Cells[8].AddParagraph(pos.NumberOfPackages.ToString()); - row.Cells[9].AddParagraph(pos.PackageType); + row.Cells[9].AddParagraph(pos.PackageType ?? ""); row.Cells[10].AddParagraph((pos.LimitedQuantities ?? false) ? "Y" : "N"); row.Cells[11].AddParagraph((pos.ExceptedQuantities ?? false) ? "Y" : "N"); row.Cells[12].AddParagraph(string.Format("GW:{0}\nNW:{1}", pos.GrossQuantity_KGM, pos.NetQuantity_KGM)); @@ -1686,7 +1686,7 @@ namespace bsmd.ReportGenerator { IBCPosition pos = haz.IBCPositions[i]; Row row = table.AddRow(); - row.Cells[0].AddParagraph(pos.Identifier); + row.Cells[0].AddParagraph(pos.Identifier ?? ""); row.Cells[1].AddParagraph(pos.ProductName ?? ""); row.Cells[2].AddParagraph(pos.PollutionCategoryDisplay); row.Cells[3].AddParagraph(pos.HazardsDisplay); @@ -1751,7 +1751,7 @@ namespace bsmd.ReportGenerator IGCPosition pos = haz.IGCPositions[i]; Row row = table.AddRow(); - row.Cells[0].AddParagraph(pos.Identifier); + row.Cells[0].AddParagraph(pos.Identifier ?? ""); row.Cells[1].AddParagraph(pos.UNNumber ?? ""); row.Cells[2].AddParagraph(pos.IMOClass ?? ""); row.Cells[3].AddParagraph(pos.ProductName ?? ""); @@ -1816,12 +1816,12 @@ namespace bsmd.ReportGenerator IMSBCPosition pos = haz.IMSBCPositions[i]; Row row = table.AddRow(); - row.Cells[0].AddParagraph(pos.Identifier); + row.Cells[0].AddParagraph(pos.Identifier ?? ""); row.Cells[1].AddParagraph(pos.BulkCargoShippingName ?? ""); row.Cells[2].AddParagraph(pos.IMOHazardClassDisplay); row.Cells[3].AddParagraph(pos.MHB.HasValue ? (pos.MHB.Value ? "Y" : "N") : ""); row.Cells[4].AddParagraph(pos.UNNumber ?? ""); - row.Cells[5].AddParagraph(pos.IMOClass); + row.Cells[5].AddParagraph(pos.IMOClass ?? ""); row.Cells[6].AddParagraph(pos.Quantity_KGM.HasValue ? pos.Quantity_KGM.Value.ToString("N3") : ""); row.Cells[7].AddParagraph(pos.StowagePosition ?? ""); row.Cells[8].AddParagraph(pos.PortOfLoading ?? ""); @@ -1879,7 +1879,7 @@ namespace bsmd.ReportGenerator MARPOL_Annex_I_Position pos = haz.MARPOLPositions[i]; Row row = table.AddRow(); - row.Cells[0].AddParagraph(pos.Identifier); + row.Cells[0].AddParagraph(pos.Identifier ?? ""); row.Cells[1].AddParagraph(pos.Name ?? ""); row.Cells[2].AddParagraph(pos.FlashpointInformationDisplay); row.Cells[3].AddParagraph(pos.Flashpoint_CEL ?? "");