Page 1 of 1

Report Builder detail band does not grow dynamically...

PostPosted: Sat Mar 19, 2016 10:27 pm
by Bazsl1
I have created my first report using Oracle Report Builder. One of the fields is a memo field that contains varying amounts of text for each record. How can I get the memo component on the report and the report's detail band to expand and contract dynamically so all of the text in the memo field for each record will be printed? Thanks.

Re: Report Builder detail band does not grow dynamically...

PostPosted: Sun Mar 20, 2016 6:55 pm
by F3K Total
Oracle Report Builder has not this function. It's possible by code, but by far not easy, or with the native-Report Builder.

Re: Report Builder detail band does not grow dynamically...

PostPosted: Mon Mar 28, 2016 7:32 pm
by longi
Something like that:
Code: Select all   Expand viewCollapse view
    ocontroller = Thisdatabasedocument.currentController
    if not ocontroller.isconnected then ocontroller.connect                                         ' We get the conection
    oreportdoc = Thisdatabasedocument.reportdocuments.getbyname("MYREPORT").open                    ' We open the report
    ' 3ยบ We get the control of the texttable
    oTexttable = oreportdoc.Texttables(2)                                                           ' The  texttable in the report which has our data
    oreportdoc.GetCurrentController().Select(oTexttable)                                            ' We get the control of the texttable
    oCell=oTextTable.getCellByPosition(0,17)                                                        ' Cell in which we want to have more than one line (0 is the number of column, and 17 the number of row - which is to change in order of our needs -)
    oText = oCell.Text                                                                              ' Text inside the cell
    oCurs = oText.createTextCursor()                                                                ' We generate a cursor in the cell (Textcursor)
    oCurs.gotoEND(True)                                                                             ' We go to the end of the text, so all actions will be about all the text
    oTexttable.getRows().getByIndex(17).IsAutoHeight = True                                         ' The row has autoheight (The main goal of the request)
    LineSpace = oCurs.paralinespacing                                                               ' We can have more space beetwen lines
    LineSpace.height = 150                                                                          ' Interlineado de 1,5
    oCurs.paralinespacing = LineSpace                                                               ' We put the space in all the text selected by the cursor
Exit Sub

If you use non ORB reports, you have the posibility when you are designing the report, however you have a big trouble if you want a block of text (justified), wich is possible in ORB before finishing the design, but not without ORB (Openoffice).
If you are interested, it is possible, but macros are larger than enough and a bit complicated to follow.
You have several examples in :

Sorry!, explanations are in Spanish. Have a look on the third page of the form, where you have a group of macros to get reports like a mail merge tool.