Contact Us!
303|905-4110

bpi.form.make2.odt()

Note: This subroutine is not called directly.  Instead, call via bpi.form.make2.

This program accepts a template filename and a set of data to insert into that template.  Repeating multivalue data can be handled and parts of the template will be repeated for as many mulitvalues as are contained in the data.  The subroutine unpacks the ‘odt’ format, makes the insertions and then repacks the document and writes it to a specified output path.

Subroutine Syntax

 CALL bpi.form.make2.odt( template.path, output.path, temp.path, params, blocks, tags, vals, verbose,error, message)

Parameters

Param

Direction

Description

template.path

passed

path to template file (odt file that contains tag/placeholders)

output.path

passed

Path to output file (where you want finished doc written)

temp.path

passed

path to temp (working) directory.  Usually based on pid

params

passed

An array of params for processing

params<.p.format> if set is the doc format (e.g., odt).  If not set, will try to determine format based on file extension.

blocks

passed

New in version 2 of BPI Forms.  @AM array associated with tags array.  If blockname is defined, then this tag will ONLY be applied to tag references if the tag in the document contains the same block reference.  For example, in a odt document, if the tag {repeat=tr;block=myblock} appared, then this tag’s values can be multivalued and the document block (in this example tr (table row) will be repeated for as many multivalues as are associated this tag.

tags

passed

Array of tag names associated with blocks and vals params

vals

passed

Array of values associated with same attribute position in the tags array.  This can be a multivalued array of values. 

verbose

passed

Level of verbosity

status

returned

error code or @FALSE if successful

message

returned

error message or blank if successful