使用Reportbuilder for Delphi,是否可以在同一报告中打印横向和纵向?
我们正在使用Reportbuilder for Delphi,我有一个报告,由几个较小的子报告组成,用于打印环境。有没有办法让第一个子报表以纵向打印,而其他子报表以横向打印 在打印之前,我尝试在TppReport PrinterSetup对象上设置方向,这在一开始似乎是可行的,但是它在打印报告和将其导出为PDF时造成了问题使用Reportbuilder for Delphi,是否可以在同一报告中打印横向和纵向?,delphi,printing,reportbuilder,Delphi,Printing,Reportbuilder,我们正在使用Reportbuilder for Delphi,我有一个报告,由几个较小的子报告组成,用于打印环境。有没有办法让第一个子报表以纵向打印,而其他子报表以横向打印 在打印之前,我尝试在TppReport PrinterSetup对象上设置方向,这在一开始似乎是可行的,但是它在打印报告和将其导出为PDF时造成了问题 谢谢 是的,这是可能的。在主报表的报表设计中,取消选中子报表的父打印机设置 在子报告选项卡的PrinterSetup中为子报告设置poLandscape或poPortrai
谢谢 是的,这是可能的。在主报表的报表设计中,取消选中子报表的父打印机设置 在子报告选项卡的
PrinterSetup
中为子报告设置poLandscape
或poPortrait
。
使用ReportBuilder 12.03、Delphi XE和Foxit 4.1.1进行测试
编辑1
还使用D2007和ReportBuilder 10.07进行了测试。打印到pdf时没有问题,第一个子报告为纵向,第二个子报告为横向
这是包含我测试的报告定义的dfm
object Form1: TForm1
Left = 0
Top = 0
Caption = 'Form1'
ClientHeight = 176
ClientWidth = 377
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
OldCreateOrder = False
PixelsPerInch = 96
TextHeight = 13
object ppReport1: TppReport
PrinterSetup.BinName = 'Default'
PrinterSetup.DocumentName = 'Report'
PrinterSetup.PaperName = 'A4'
PrinterSetup.PrinterName = 'Default'
PrinterSetup.mmMarginBottom = 6350
PrinterSetup.mmMarginLeft = 6350
PrinterSetup.mmMarginRight = 6350
PrinterSetup.mmMarginTop = 6350
PrinterSetup.mmPaperHeight = 297000
PrinterSetup.mmPaperWidth = 210000
PrinterSetup.PaperSize = 9
AllowPrintToFile = True
DeviceType = 'Screen'
EmailSettings.ReportFormat = 'PDF'
OutlineSettings.CreateNode = True
OutlineSettings.CreatePageNodes = True
OutlineSettings.Enabled = True
OutlineSettings.Visible = True
TextSearchSettings.DefaultString = '<FindText>'
TextSearchSettings.Enabled = True
Left = 112
Top = 32
Version = '10.07'
mmColumnWidth = 0
object ppDetailBand1: TppDetailBand
PrintHeight = phDynamic
mmBottomOffset = 0
mmHeight = 30692
mmPrintPosition = 0
object ppSubReport2: TppSubReport
UserName = 'SubReport2'
ExpandAll = False
NewPrintJob = False
OutlineSettings.CreateNode = True
ParentPrinterSetup = False
PrintBehavior = pbSection
TraverseAllData = False
mmHeight = 5027
mmLeft = 0
mmTop = 5292
mmWidth = 197300
BandType = 4
mmBottomOffset = 0
mmOverFlowOffset = 0
mmStopPosition = 0
object ppChildReport2: TppChildReport
PrinterSetup.BinName = 'Default'
PrinterSetup.DocumentName = 'Report'
PrinterSetup.PaperName = 'A4'
PrinterSetup.PrinterName = 'Default'
PrinterSetup.mmMarginBottom = 6350
PrinterSetup.mmMarginLeft = 6350
PrinterSetup.mmMarginRight = 6350
PrinterSetup.mmMarginTop = 6350
PrinterSetup.mmPaperHeight = 297000
PrinterSetup.mmPaperWidth = 210000
PrinterSetup.PaperSize = 9
Version = '10.07'
mmColumnWidth = 0
object ppDetailBand3: TppDetailBand
mmBottomOffset = 0
mmHeight = 13229
mmPrintPosition = 0
object ppLabel2: TppLabel
UserName = 'Label2'
Border.BorderPositions = []
Border.Color = clBlack
Border.Style = psSolid
Border.Visible = False
Caption = 'Label2'
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Name = 'Arial'
Font.Size = 12
Font.Style = []
Transparent = True
mmHeight = 4868
mmLeft = 10054
mmTop = 3440
mmWidth = 12785
BandType = 4
end
end
end
end
object ppSubReport1: TppSubReport
UserName = 'SubReport1'
ExpandAll = False
NewPrintJob = False
OutlineSettings.CreateNode = True
ParentPrinterSetup = False
PrintBehavior = pbSection
TraverseAllData = False
mmHeight = 5027
mmLeft = 0
mmTop = 18256
mmWidth = 197300
BandType = 4
mmBottomOffset = 0
mmOverFlowOffset = 0
mmStopPosition = 0
object ppChildReport1: TppChildReport
PrinterSetup.BinName = 'Default'
PrinterSetup.DocumentName = 'Report'
PrinterSetup.Orientation = poLandscape
PrinterSetup.PaperName = 'A4'
PrinterSetup.PrinterName = 'Default'
PrinterSetup.mmMarginBottom = 6350
PrinterSetup.mmMarginLeft = 6350
PrinterSetup.mmMarginRight = 6350
PrinterSetup.mmMarginTop = 6350
PrinterSetup.mmPaperHeight = 210000
PrinterSetup.mmPaperWidth = 297000
PrinterSetup.PaperSize = 9
Version = '10.07'
mmColumnWidth = 0
object ppDetailBand2: TppDetailBand
mmBottomOffset = 0
mmHeight = 13229
mmPrintPosition = 0
object ppLabel1: TppLabel
UserName = 'Label1'
Border.BorderPositions = []
Border.Color = clBlack
Border.Style = psSolid
Border.Visible = False
Caption = 'Label1'
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Name = 'Arial'
Font.Size = 12
Font.Style = []
Transparent = True
mmHeight = 4868
mmLeft = 11906
mmTop = 2646
mmWidth = 12785
BandType = 4
end
end
end
end
end
end
end
对象格式1:t格式1
左=0
Top=0
标题='Form1'
ClientHeight=176
ClientWidth=377
颜色=clBtnFace
Font.Charset=默认字符集
Font.Color=clWindowText
字体高度=-11
Font.Name='Tahoma'
Font.Style=[]
OldCreateOrder=False
PixelsPerInch=96
text高度=13
对象ppReport1:TppReport
PrinterSetup.BinName='Default'
PrinterSetup.DocumentName='Report'
PrinterSetup.PaperName='A4'
PrinterSetup.PrinterName='Default'
PrinterSetup.mmMarginBottom=6350
PrinterSetup.mmMarginLeft=6350
PrinterSetup.mmMarginRight=6350
PrinterSetup.mmMarginTop=6350
PrinterSetup.mmPaperHeight=297000
PrinterSetup.mmPaperWidth=210000
PrinterSetup.PaperSize=9
AllowPrintToFile=True
DeviceType='屏幕'
EmailSettings.ReportFormat='PDF'
OutlineSettings.CreateNode=True
OutlineSettings.CreatePageNodes=True
OutlineSettings.Enabled=True
OutlineSettings.Visible=True
TextSearchSettings.DefaultString=''
TextSearchSettings.Enabled=True
左=112
Top=32
版本='10.07'
mmColumnWidth=0
对象ppDetailBand1:TppDetailBand
PrintHeight=phDynamic
mmBottomOffset=0
毫米高度=30692
mmPrintPosition=0
对象ppSubReport2:TppSubReport
用户名='SubReport2'
ExpandAll=False
NewPrintJob=False
OutlineSettings.CreateNode=True
ParentPrinterSetup=False
PrintBehavior=pbSection
TraverseAllData=False
毫米高度=5027
mmLeft=0
mmTop=5292
毫米宽度=197300
波段类型=4
mmBottomOffset=0
mmOverFlowOffset=0
mmStopPosition=0
对象ppChildReport2:TppChildReport
PrinterSetup.BinName='Default'
PrinterSetup.DocumentName='Report'
PrinterSetup.PaperName='A4'
PrinterSetup.PrinterName='Default'
PrinterSetup.mmMarginBottom=6350
PrinterSetup.mmMarginLeft=6350
PrinterSetup.mmMarginRight=6350
PrinterSetup.mmMarginTop=6350
PrinterSetup.mmPaperHeight=297000
PrinterSetup.mmPaperWidth=210000
PrinterSetup.PaperSize=9
版本='10.07'
mmColumnWidth=0
对象ppDetailBand3:TppDetailBand
mmBottomOffset=0
毫米高度=13229
mmPrintPosition=0
对象ppLabel2:TppLabel
用户名='Label2'
Border.BorderPositions=[]
Border.Color=clBlack
Border.Style=psSolid
Border.Visible=False
标题='Label2'
Font.Charset=默认字符集
Font.Color=clBlack
Font.Name='Arial'
Font.Size=12
Font.Style=[]
透明=真实
毫米高度=4868
毫米左=10054
mmTop=3440
毫米宽度=12785
波段类型=4
结束
结束
结束
结束
对象ppSubReport1:TppSubReport
用户名='SubReport1'
ExpandAll=False
NewPrintJob=False
OutlineSettings.CreateNode=True
ParentPrinterSetup=False
PrintBehavior=pbSection
TraverseAllData=False
毫米高度=5027
mmLeft=0
mmTop=18256
毫米宽度=197300
波段类型=4
mmBottomOffset=0
mmOverFlowOffset=0
mmStopPosition=0
对象ppChildReport1:TppChildReport
PrinterSetup.BinName='Default'
PrinterSetup.DocumentName='Report'
PrinterSet.Orientation=poLandscape
PrinterSetup.PaperName='A4'
PrinterSetup.PrinterName='Default'
PrinterSetup.mmMarginBottom=6350
PrinterSetup.mmMarginLeft=6350
PrinterSetup.mmMarginRight=6350
PrinterSetup.mmMarginTop=6350
PrinterSetup.mmPaperHeight=210000
PrinterSetup.mmPaperWidth=297000
PrinterSetup.PaperSize=9
版本='10.07'
mmColumnWidth=0
对象ppDetailBand2:TppDetailBand
mmBottomOffset=0
毫米高度=13229
mmPrintPosition=0
对象ppLabel1:TppLabel
用户名='Label1'
Border.BorderPositions=[]
Border.Color=clBlack
Border.Style=psSolid
Border.Visible=False
标题='Label1'
Font.Charset=默认字符集
Font.Color=clBlack
Font.Name='Arial'
Font.Size=12
Font.Style=[]
透明=真实
毫米高度=4868