Categories > OpenTBS with ODT >

Table

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: xotix
Date: 2010-12-09
Time: 11:45

Table

Hi, sry its me again.

I have a table, 2x2. my template looks like:

Titel                        |        |
Describtion               | Price |

So that looks like:

Pizza Margherita
Tomatos, Onions, Chees                  16.-


My problem is now, that if the describtion is quite large, the cell gets bigger and the Prise isnt at the lowest line anymore, like:

Pizza margherita
Tomatos, Onions, Chees, Oregano,   16.-
Fish, Meet, something

But it should be like:

Pizza margherita
Tomatos, Onions, Chees, Oregano,  
Fish, Meet, something                      16.-


Can i somehow align the price to the bottom?

Hope you understood me :)

By: Skrol29
Date: 2010-12-09
Time: 14:47

Re: Table

Hi,

This is a Word problem. Right-click on the cell in the template, and choose "Cell align" (or a similar item).
By: xotix
Date: 2010-12-09
Time: 16:11

Re: Table

okay thanks, works fine. And also, can i ask that if Describtion==empty dont do that cell ?
By: Skrol29
Date: 2010-12-09
Time: 17:04

Re: Table

what do you mean by "don't do that cell" ?
By: xotix
Date: 2010-12-10
Time: 08:26

Re: Table

like, if describtion is empty, repeat that, if not repeat that. like having a 1x2 table and a 2x2 and a if/else, like, imagen a template liek that:

if(empty(describtion))
repeat the table like above
else
repeat this table


this table looksl ike:

Title_DE                 |               Price


the above got a 2nd row with describtion and price like above.
By: Skrol29
Date: 2010-12-10
Time: 10:56

Re: Table

Something like that should work:
OpenOffice:
Table 1:
-----------------------------------------------------------------------
| [b.Titel_DE]                                            |           |
-----------------------------------------------------------------------
| [b.Describtion;magnet=table:table]                      | [b.Price] |
-----------------------------------------------------------------------

Table 2:
-----------------------------------------------------------------------
| [b.Titel_DE] [b.Describtion;magnet=table:table;ope=mok:]| [b.Price] |
-----------------------------------------------------------------------

Note: parameter "ope=mok:" makes the magnet to be kept when the value is empty.
By: xotix
Date: 2010-12-10
Time: 15:40

Re: Table

okay thansk a lot i'll try that.
By: xotix
Date: 2010-12-15
Time: 11:30

Re: Table

Hi,

So first, thanks a lot. it works.

I now get like

Item 1
Desc 1

Item 2

Item 3

Item 4
Desc 4

So i got the desc and the space between is always the same.

But what makes the space? i have like

starting the loop
table1 row 1
table1 row 2
table2 row 1
endloop

does maybe the endloop stuff cause the gap.

heres the template:

http://xotix.bplaced.net/Karte.odt

thanks! :)


oh and why does the second categorie title [c.catDetails.Titel_DE] always take the font adn style of [c_sub1;block=end][c;block=end]?

oh and if the title is bigger than the column i get a red arrow in the document, hwo can i force the table to expand?
By: Skrol29
Date: 2010-12-15
Time: 16:00

Re: Table

Hi,

The newline between tables you've got in the merged result is the new line between the tag [c_sub1;block=begin] and the table in your template.

You can avoid the newline by doing as follow:
- delete both tags [c_sub1;block=begin] and [c_sub1;block=end] from your template
- in the first row of the first table, replace:
  [c_sub1.Titel_DE]
with:
  [c_sub1.Titel_DE;block=table:table+table:table]

Using the relative syntax for blocks, you avoid unexpected characters.
By: xotix
Date: 2010-12-15
Time: 16:09

Re: Table

oaky, thansk a lot. i'll take a look at the relative syntax and do you now how i can force the row to expand if the inserted data is logner then the row itself? so i get break and not a stupid arrow for expanding in the generated document? i've had it once, but i dont know why it is now like that.
By: xotix
Date: 2010-12-22
Time: 10:23

Re: Table

i dont rly get it.  Does i see it right, with the table:table + table: table you'r saying do the loop in the table.  remember, the c_sub1 was connected with an assoziative array. maybe you could give me the tempalte as a example, since i dont get it. i'll read again the manual and hope i get it.

thanks for all the help. :)