Contact Us!
303|905-4110

bpi.make.tabtable()

This subroutine is a front-end router routine that evaluates the format param and then redirects to a make table routine specific to that format.  For example, if the format param is set to ‘odt’, the this routine will redirect to bpi.make.tabtable.odt().  The routine accepts inbound arrays and generates a odt tab delimited table structure that may be inserted into a document using normal placeholder tag replacement techniques.

Subroutine Syntax

CALL bpi.make.tabtable( in, out, format, verbose, status, message

Parameters

Param

Direction

Description

in

passed

Inbound array wgere each @AM denotes a linebreak and each @VM denotes a tab

out

returned

same as in except @AM and @VM are converted to the internal markup that is appropriate for the value passed by the format param.

format

passed

Document type (odt is default)

verbose

passed

Level of verbosity

status

returned

@FALSE for normal operation, otherwise integer indicating error

message

returned

message associated with error

 

Example Integration Code

myTable = \\
verbose = 0
myTable<1> = \ColumnA_line1\:@VM:\ColumnB_line1\:@VM:\ColumnC_line1\ ; * define first row of tab table
myTable<2> = \ColumnA_line2\:@VM:\ColumnB_line2\:@VM:\ColumnC_line2\ ; * define second row of tab table
CALL bpi.make.tabtable(myTable, myTableODT,\odt\,verbose,status,message) ; * produce odt formatted tab table
bpi.set.tagval2(tags,vals,\\,\%tabTable%\, myTableODT, \\, vector) ; * assign to a tag placeholder

 

Use in a template

With the table structure assigned to a tag, you simply place the tag into the template wherever you wish for the tab delimited table to be inserted.   You can also assign a odt tab table structure into a repeating table by using the normal repeat group technique used for normal table-based templating.  In this case, you must ensure that tab stops are properly set within the cell into which the tab delimited table tag will be inserted.

Note: Tab-delimited tables are unlike normal tables.  In tab delimited tables, if the content of a column is too long and it overruns the tab stop intended for the column(s) to its right, the alignment of the columns can be impacted.   In some cases, tab-stop overrun is desired.  This allows for data in a left column to extend into columns to the right.  However, if you wish to preserve alignment of the columns, you must ensure that the tab-stops do not become overrun.  This usually involves truncating the length of data for each column so that it cannot overrun a tab stop to the column's right.