没有用过FastReport。
这个意思?
Dim r As Row =Foxtools.Tools.Rows(eform)
'r("审批状态") = "草稿"
Dim cmd As New SQLCommand
cmd.C
cmd.CommandText ="select * FROM [YW_销售订单明细] where 订单编号 = '" & r("编号") & "'"
Dim dt As DataTable = cmd.ExecuteReader
If dt.DataRows.Count =0 Then
MessageBox.Show("没有订单明细,增加明细后再进行打印操作 ! 谢谢 ! ","提示",MessageBoxButtons.OK,MessageBoxIcon.Error)
Exit Function
Else
Dim FDataSet = New System.Data.DataSet
Dim Table As New System.Data.DataTable
Table=dt.BaseTable.copy
Table.tablename = "xxxx"
FDataSet.Tables.Add(Table)
Dim report As New FastReport.Report
report.RegisterData(FDataSet)
report.GetDataSource("xxxx").Enabled = True
report.Load(ProjectPath & "Skins\" & "销售订单.frx")
'report.Design()
'report.Dispose()
report.Prepare()
report.ShowPrepared()
End If