看看合成的文件名和路径是什么:
Dim dr As DataRow = e.DataRow
Dim n As Integer = e.DataRow.Lines("附件").Count
If dr.IsNull("HIS号") Or dr.IsNull("姓名") Or Dr.IsNull("检查时间") Then
MessageBox.Show("HIS号,姓名和检查时间不能为空!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
e.Cancel = True
Else
e.SubFolder = dr("HIS号") & dr("姓名") & "\" & dr("检查时间").Year
e.FileName = dr("HIS号") & dr("姓名") & dr("检查时间") & "-" & n+1 & ".jpg"
MessageBox.show(e.SubFolder)
MessageBox.show(e.FileName)
End If