My boss ended up fixing it.
This was his solution
Public Function FormatJob(pJob As String)
Dim NewJob As String
Dim J As String
Dim Pos as Integer
Dim Part1 as String
Dim Part2 as String
J=Trim(pJob)
Pos=InStr(J,"-")
If Pos=0 Then
NewJob=Right(" " + J,5) + "-"
Else
Part1=Left(J,Pos-1)
Part2=Mid(J,Pos+1,99)
NewJob=Right(" " + Part1,5) + "-" + Right(" " + Part2,2)
End If
Return NewJob
End Function
2) I changed the Expression values for the two parameters @BeginContract and @EndContract in the Dataset to be: "=Code.FormatJob(Parameters!Job.Value)"