Hello
I need to create a document consisting of some header text, then the output of two Base ReportBuilder (RB) files. I am currently using a Writer master document for this. I can load the two subdocuments successfully with silent update to refresh content. My problem is the tables generated in RB have ‘break before’ attribute, so there is a page break before each subdocument; cannot find anyway to change this in RB. I want to change the tables BreakType to NONE.
The code below tries to do this, but does not seem to be working as the saved document still has the page breaks. I have tried a couple approaches, neither works. I can manually change the output to remove the page break, but need this automated. Any suggestions?
Using LO Version: 5.3.7.2
REM Variable declarations not shown for brevity
Set oController = CurrentDb.Document.CurrentController
'Create registration base file
pvArgs(0).Name = "Hidden"
pvArgs(0).Value = True
Set odReport = oController.loadComponentWithArguments(com.sun.star.sdb.application.DatabaseObject.REPORT, acCampRegRep, acViewNormal, pvArgs)
pvArgs(0).Name = "Overwrite"
pvArgs(0).Value = True
odReport.storeAsURL(acCampRegURL, pvArgs)
odReport.dispose()
'Create registration invoice file
pvArgs(0).Name = "Hidden"
pvArgs(0).Value = True
Set odReport = oController.loadComponentWithArguments(com.sun.star.sdb.application.DatabaseObject.REPORT, acCampInvRep, acViewNormal, pvArgs)
pvArgs(0).Name = "Overwrite"
pvArgs(0).Value = True
odReport.storeAsURL(acCampInvURL, pvArgs)
odReport.dispose()
'Open MASTER file and update links
pvArgs(0).Name = "UpdateDocMode"
pvArgs(0).Value = com.sun.star.document.UpdateDocMode.QUIET_UPDATE
Set odReport = StarDesktop.loadComponentFromURL(acCampTplURL, "_blank", 0, pvArgs)
'Set textflow on ingested subdocuments
Set oTables = odReport.getTextTables()
Set oTable = oTables.getByIndex(0)
oTable.BreakType = com.sun.star.style.BreakType.NONE
' odReport.getTextTables().getByIndex(0).BreakType = com.sun.star.style.BreakType.NONE
odReport.getTextTables().getByIndex(1).BreakType = com.sun.star.style.BreakType.NONE
odReport.Select(oTable)
oCurs = odReport.getViewCursor()
oCurs.BreakType = com.sun.star.style.BreakType.NONE
pvArgs(0).Name = "Overwrite"
pvArgs(0).Value = True
odReport.storeAsURL(acCampOutURL, pvArgs)