Rss & SiteMap

Foxtable(狐表) http://www.foxtable.com

新一代数据库软件,完美融合Access、Foxpro、Excel、vb.net之优势,人人都能掌握的快速软件开发工具!
共8 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:专业报表如何实现单元格字体缩小

1楼
allenyen 发表于:2023/11/10 16:15:00
图片点击可在新窗口打开查看
当此行数据内容超出时自动缩小字体显示
使用自带的style 属性 判断时 只能调整整体的字号,不能设置此单元格缩小
Dim doc As New PrintDoc
    Doc.PageSetting.Width = 80
    Doc.PageSetting.Height = 135
    Doc.PageSetting.LeftMargin = 0
    Doc.PageSetting.TopMargin = 1.5
    doc.Stacking = prt.StackingRulesEnum.InlineLeftToRight
    Doc.PrinterName = _dyj
    Dim rx As prt.RenderText    
    Dim rt As New prt.RenderTable()
    Dim rt1 As new prt.RenderArea
    rt.Style.GridLines.All = New prt.LineDef
    rt.Width = 77
    rt.Style.Spacing.All = 1
    rt.X = 1.5
    rt.SplitVertBehavior = prt.SplitBehaviorEnum.Never
    rt.Rows.Count = 23
    rt.Cols.Count = 2
    rt.Cols(0).Width = 43 '40
    If rt.Style.WordWrap = True Then
    rt.Style.Font = New Font("宋体",6.5)
    Else
    rt.Style.Font = New Font("宋体",7.5)
    End If
红色部分 怎么设置只对这一单元格生效

[此贴子已经被作者于2023/11/10 16:18:39编辑过]
2楼
有点蓝 发表于:2023/11/10 16:17:00
http://www.foxtable.com/webhelp/topics/1179.htm
http://www.foxtable.com/webhelp/topics/1207.htm

rt.Cells(12).Style.Font = New Font("宋体"6'设置字体
3楼
allenyen 发表于:2023/11/10 16:21:00
这个出现的行是不固定的 也能这样设置吗
4楼
有点蓝 发表于:2023/11/10 16:34:00
可以设置任意一个单元格的。任意一行,一列都可以
5楼
allenyen 发表于:2023/11/10 16:35:00
图片点击可在新窗口打开查看
不固定的 是不是要用这个去获取了
6楼
allenyen 发表于:2023/11/10 16:37:00
专业报表有没有

  • Rg.ShrinkToFit = True  这个属性的,可以自动判断并缩小
7楼
有点蓝 发表于:2023/11/10 16:47:00
没有的。需要自己计算控制:http://www.foxtable.com/bbs/dispbbs.asp?BoardID=2&ID=64395&skin=0
8楼
程兴刚 发表于:2023/11/10 16:50:00
rt.Cells(rt.rows.count-12).Style.Font = New Font("宋体",6.5)
[此贴子已经被作者于2023/11/10 16:51:00编辑过]
共8 条记录, 每页显示 10 条, 页签: [1]

Copyright © 2000 - 2018 foxtable.com Tel: 4000-810-820 粤ICP备11091905号

Powered By Dvbbs Version 8.3.0
Processed in .08301 s, 2 queries.