以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- mysql数据源的问题 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=188920) |
||
-- 作者:lin98 -- 发布时间:2023/10/31 8:35:00 -- mysql数据源的问题 mysql数据源的问题 问题一:表中的内置录入没有,比如日期,数字的内置录入,要如何实现日期,数字的内置录入? 问题二:专业报表连接打印,无法实现按选中的数据打印,出现全部打印,如何实现按选中的数据打印? Dim doc As New Printdoc Dim rx As prt.RenderText Dim rt As prt.RenderTable Dim Rows As List(Of DataRow) Dim tbl As Table = Tables("销售主表") For i As Integer = tbl.TopRow To tbl.BottomRow rx = New prt.RenderText \' rx.BreakBefore = prt.BreakEnum.Page \'另起一页再打印 rx.Style.FontSize = 14 rx.Style.FontBold = True rx.Style.Spacing.Bottom = 5 rx.Text = "公司名称: " & Tables("销售主表").Rows(i)("公司名称") doc.Body.Children.Add(rx) rt = New prt.RenderTable rt.Style.TextAlignHorz = prt.AlignHorzEnum.Center rt.Style.TextAlignVert = prt.AlignVertEnum.Center rt.Style.Borders.Bottom = New prt.LineDef(0.3, Color.LightGray) rt.CellStyle.Spacing.All = 1 rt.Cols.Count = 4 rt.Cells(0, 0).Text = "产品" rt.Cells(0, 1).Text = "客户" rt.Cells(0, 2).Text = "雇员" rt.Cells(0, 3).Text = "单价" rt.Cells(0, 4).Text = "折扣" rt.Cells(0, 5).Text = "数量" rt.rows(0).Style.Borders.Top = New prt.LineDef(1, Color.LightGray) rt.rows(0).Style.Borders.Bottom = New prt.LineDef(1, Color.LightGray) Rows = DataTables("销售明细").select("客户=\'" & Tables("销售主表").Rows(i)("公司名称") & "\'") For r As Integer = 0 To Rows.Count - 1 rt.Cells(r + 1, 0).Text = rows(r)("产品") rt.Cells(r + 1, 1).Text = rows(r)("客户") rt.Cells(r + 1, 2).Text = rows(r)("雇员") rt.Cells(r + 1, 3).Text = rows(r)("单价") rt.Cells(r + 1, 4).Text = rows(r)("折扣") rt.Cells(r + 1, 4).Text = rows(r)("数量") Next doc.Body.Children.Add(rt) rx = New prt.RenderText rx.Style.FontBold = True rx.Style.Spacing.Top = 3 rx.Text = "销售明细数目: " & Rows.Count rx.Style.TextAlignHorz = prt.AlignHorzEnum.Right doc.Body.Children.Add(rx) Next doc.Preview [此贴子已经被作者于2023/10/31 8:42:08编辑过]
|
||
-- 作者:有点蓝 -- 发布时间:2023/10/31 9:05:00 -- 1、http://www.foxtable.com/webhelp/topics/1375.htm
2、代码没有问题,请上传实例测试
|