'参考
Private Sub sscmdOK_Click(Index As Integer)
Dim sqlprint As String
Dim J As Integer
Dim XX As String
Dim bb As Integer
sqlprint = "SELECT * FROM Jc_Shhy WHERE hth='" & Trim(W_Jc_Shhy.Text1(0).Text) & "'"
ReportPrint "com_jc_shhy", sqlprint, Dr_Jc_Shhy1
DE_Report.Con_report.Close
OpenDEConnection
'打印选择
If SSOption1(0).Value = True Then '正文
ReportPrint "com_jc_shhy", sqlprint, Dr_Jc_Shhy1
Call TaoPrint(Dr_Jc_Shhy1, nPrintMode)
If W_Jc_Shhy.Text1(9).Text = "TO BE COVERED BY THE BUYERS." Then
Dr_Jc_Shhy1.Sections(3).Controls("label46").Visible = True
Dr_Jc_Shhy1.Sections(3).Controls("Label47").Visible = True
Dr_Jc_Shhy1.Sections(3).Controls("Label48").Visible = True
Dr_Jc_Shhy1.Sections(3).Controls("Label49").Visible = True
Else
Dr_Jc_Shhy1.Sections(3).Controls("Label46").Visible = False
Dr_Jc_Shhy1.Sections(3).Controls("Label47").Visible = False
Dr_Jc_Shhy1.Sections(3).Controls("Label48").Visible = False
Dr_Jc_Shhy1.Sections(3).Controls("Label49").Visible = False
End If
Dr_Jc_Shhy1.Show 1
Else
If SSOption1(1).Value = True Then '附页
XX = mmLine(Rs_Jc_Shhy.Fields("addpage"))
ReportPrint "com_jc_shhy", sqlprint, Dr_Jc_Shhy2
Call TaoPrint(Dr_Jc_Shhy2, nPrintMode)
bb = 1
Dr_Jc_Shhy2.Sections(3).Controls("LABEL2").Caption = bb
Dr_Jc_Shhy2.Show 1
If XX > 53 Then
bb = 2
For I = 1 To Int(XX / 53)
ReportPrint "com_jc_shhy", sqlprint, Dr_Jc_Shhy2
Dr_Jc_Shhy2.Sections(3).Controls("TXTaddpage").Visible = False
Dr_Jc_Shhy2.Sections(3).Controls("LABEL23").Caption = ""
For J = I * 53 + 1 To (I + 1) * 53
Dr_Jc_Shhy2.Sections(3).Controls("LABEL23").Caption = Dr_Jc_Shhy2.Sections(3).Controls("LABEL23").Caption & Mline(Rs_Jc_Shhy.Fields("addpage"), J) & Chr(10) & Chr(13)
Next J
Dr_Jc_Shhy2.Sections(3).Controls("LABEL23").Visible = True
Dr_Jc_Shhy2.Sections(3).Controls("LABEL2").Caption = bb
Dr_Jc_Shhy2.Show 1
bb = bb + 1
Next I
End If
Else
If SSOption1(2).Value = True Then '背面
ReportPrint "com_jc_shhy", sqlprint, Dr_Jc_Shhy3
Call TaoPrint(Dr_Jc_Shhy3, nPrintMode)
Dr_Jc_Shhy3.Show 1
End If
End If
End If
Unload Me
End Sub