Categories > [old] TbsOoo & TinyDoc >

encapsulation problem with openoffice

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: pupah
Date: 2010-07-02
Time: 17:58

encapsulation problem with openoffice

This is my query. My proble is how write in openoffice this block:

from contacts where contacts.deleted=0");

            from accounts
            join project_contacts on project_contacts.contact_id = and project_contacts.deleted=0
            where accounts.contact_id='{$c['id']}' and accounts.deleted=0");

In my openoffice I need a table that show my contacts and for each of them the linked accounts. so I try to show this with 2 table: table b inside table A.
So in the first table A I wrote something like this:
and in a second table B inside the first table A a wrote:

but is not
By: Skrol29
Date: 2010-07-03
Time: 01:10

Re: encapsulation problem with openoffice

hi Pupah,

The PHP snippet you've posted do not produce a correct data representation. After it is run, $mm contains only accounts names of the last contact, and $cc contains a resource id. But what ever, I think I have the idea of what you're trying to do.

In order to perform your encapsulation, you just have to use TBS sub-blocks. They are described in the online examples. Go and see here
and choose the Sub-block Example. It works exactly the same way for HTML or OpenOffice, you just have to take in account that the row entity in an OO table is "table:table-row".

Assuming that the $contacts array contains records having an "id" column and an "mm" column. And that the mm column contains the records having a "name" column. Then you can build your template with a table [A] with:
and a table [B] placed inside table A with:
(not tested)