Sunteți pe pagina 1din 4

OpenTBS demo

Hello [onshow.yourname],
This is a demo of the OpenTBS plugin.
The current document has been generated at [onshow..now;frm='yyyy-mm-dd
hh:nn:ss']
PHP version: [onshow..cst.PHP_VERSION]
TBS version: [onshow..version]

Merge data with a chart


5
4.5
4
3.5
3
Series 1
2.5
Series 2
2 Series 3
1.5
1
0.5
0
Category A Category B Category C Category D
Merge data on the rows of a table

First Name Name Membership number


[a.firstname;block [a.name] [a.number]
=tbs:row]

Example #5: merging data in Header and Footer. demo for “[onshow.yourname]”
OpenTBS automatically merges “onshow” and “onload” fields in the header and the footer. An OpenOffice document can have only one
header/footer contents. You can only choose to show or hide it on each page. Header and footer contents are stored in a separate XML
sub-file (styles.xml). Thus you need the load it in order to perform MergeBlock() or other manual merges in it.
Merge or delete bullets and numberings
1. Numbered titles
1.1. This title is kept
1.2. This one will be deleted [onload;block=tbs:p;when [var.x_delete]=0]
1.3. But numbering will be automatically arranged by LibreOffice/OpenOffice Writer
1.4. As you can see
2. Bullets
• This bullet is kept
• This one will be deleted [onload;block=tbs:p;when [var.x_delete]=0]
• As you can see

Merge or delete a part of the text


As you can see, this part of the text contains a title and two paragraphs.
So you can delete the part using this: [onload;block=text:h+tbs:p+(tbs:p);when [var.x_delete]=0].
You can also merge/delete a custom LibreOffice/OpenOffice Writer section using
“block=text:section”.

Delete a frame

This frame will be deleted.


The frame has been deleted
[onload;block=draw:frame;when [var.x_delete]=0]

Delete all comments


This text should have no comment.

Merge too long TBS fields

• Solution #1 : using parameter “ope=docfield” insdide a document field.


Example : the amout is XX.XX €.
Insert a new Writer field from menu Insert / Fields. Its type must be “Function / Conditional
text”.
In the Condition expression, enter “false”.
In the Then expression, enter a TBS field with parameter “ope=docfield”.
In the Else expression, enter a text to be displayed when the template is not merged.
The Writer field will be replaced with text when merged by OpenTBS. The formatting is kept
as is.
• Solution #2 : using parameter “enlarge=tbs:comment” inside a comment
(only for LibreOffice and OpenOffice)
Example : the amout is XX.XX €.

Example #5: merging data in Header and Footer. demo for “[onshow.yourname]”
OpenTBS automatically merges “onshow” and “onload” fields in the header and the footer. An OpenOffice document can have only one
header/footer contents. You can only choose to show or hide it on each page. Header and footer contents are stored in a separate XML
sub-file (styles.xml). Thus you need the load it in order to perform MergeBlock() or other manual merges in it.
Merge data with pages
In the next page there is an example illustrating how to perform a merge with one page per record.
In this example, the first paragraph has a property giving a page break before. Therefore, the
page-break is repeated for each record.
The example also use a block defined with the alias “tbs:page”. This alias is given by OpenTBS
and it helps to found the bounds of the page (or pages) according to the page-break defined in the
paragraph properties.
If you try to merge one page per record without text before the first page, then make sure that the
first paragraph has the property giving a page break before.

Example #5: merging data in Header and Footer. demo for “[onshow.yourname]”
OpenTBS automatically merges “onshow” and “onload” fields in the header and the footer. An OpenOffice document can have only one
header/footer contents. You can only choose to show or hide it on each page. Header and footer contents are stored in a separate XML
sub-file (styles.xml). Thus you need the load it in order to perform MergeBlock() or other manual merges in it.
Hello [b.firstname;block=tbs:page] [b. name], your membership number is [b.number].

The image is merged using a TBS field which is placed in the Description property of the image.

Example #5: merging data in Header and Footer. demo for “[onshow.yourname]”
OpenTBS automatically merges “onshow” and “onload” fields in the header and the footer. An OpenOffice document can have only one
header/footer contents. You can only choose to show or hide it on each page. Header and footer contents are stored in a separate XML
sub-file (styles.xml). Thus you need the load it in order to perform MergeBlock() or other manual merges in it.

S-ar putea să vă placă și