diff --git a/ENI-2/ENI2/ENI2/ENI2.csproj b/ENI-2/ENI2/ENI2/ENI2.csproj
index d4a80c9b..f5c75fb4 100644
--- a/ENI-2/ENI2/ENI2/ENI2.csproj
+++ b/ENI-2/ENI2/ENI2/ENI2.csproj
@@ -35,8 +35,8 @@
3.5.1.0
true
publish.html
- 1
- 3.9.9.%2a
+ 0
+ 3.9.10.%2a
false
true
true
diff --git a/nsw/Source/bsmd.ReportGenerator/BSMDDocument.cs b/nsw/Source/bsmd.ReportGenerator/BSMDDocument.cs
index 783e02ee..d012d6d4 100644
--- a/nsw/Source/bsmd.ReportGenerator/BSMDDocument.cs
+++ b/nsw/Source/bsmd.ReportGenerator/BSMDDocument.cs
@@ -696,7 +696,7 @@ namespace bsmd.ReportGenerator
portOfCallLast30Days.PortOfCallLast30DaysCrewMembersJoined.Value ? "Yes" : "No" : "");
for (int i = 0; i < portOfCallLast30Days.CrewJoinedShip.Count; i++)
{
- row.Cells[4].AddParagraph(portOfCallLast30Days.CrewJoinedShip[i].PortOfCallLast30DaysCrewJoinedShipName ?? "");
+ row.Cells[4].AddParagraph(((PortOfCallLast30DaysCrewJoinedShip)portOfCallLast30Days.CrewJoinedShip[i]).PortOfCallLast30DaysCrewJoinedShipName ?? "");
}
}
@@ -903,7 +903,7 @@ namespace bsmd.ReportGenerator
row.Cells[1].AddParagraph("Waste disposal order (all, some, none)");
row = table.AddRow();
for (int i = 0; i < was.WasteDisposalServiceProvider.Count; i++)
- row.Cells[0].AddParagraph(was.WasteDisposalServiceProvider[i].WasteDisposalServiceProviderName);
+ row.Cells[0].AddParagraph(((WasteDisposalServiceProvider) was.WasteDisposalServiceProvider[i]).WasteDisposalServiceProviderName);
if (was.WasteDisposalDelivery.HasValue)
row.Cells[1].AddParagraph((was.WasteDisposalDelivery.Value == 0) ? "ALL" : (was.WasteDisposalDelivery == 1) ? "SOME" : "NONE");
diff --git a/nsw/Source/bsmd.ReportGenerator/ReportService.cs b/nsw/Source/bsmd.ReportGenerator/ReportService.cs
index 8b53fe72..35a0eb6b 100644
--- a/nsw/Source/bsmd.ReportGenerator/ReportService.cs
+++ b/nsw/Source/bsmd.ReportGenerator/ReportService.cs
@@ -282,6 +282,11 @@ namespace bsmd.ReportGenerator
// Schiffsname_ID_Meldeklassen.pdf
string shipName = DBManager.Instance.GetShipNameFromCore(reportCore);
if (shipName.IsNullOrEmpty()) shipName = "UNKNOWN";
+ // INSANITY CHECK!!!
+ string invalid = new string(Path.GetInvalidFileNameChars()) + new string(Path.GetInvalidPathChars());
+ foreach (char c in invalid)
+ shipName = shipName.Replace(c.ToString(), "");
+
shipName = shipName.Replace(' ', '_');
string fullPath = string.Format("{0}\\{1}_{2}_{3}.pdf", Properties.Settings.Default.OutputDirectory, shipName, reportCore.DisplayId, classes);