By: SunWuKung
Date: 2006-05-22
Time: 23:39
|
columns from arrayIs it possible to create a table with TBS where not only the number of rows are dependent on the array, but also the number of columns?
eg. I create a pivot table with PHP from a db - I don't know beforehand the number of columns and the number of rows, still I would like to print this table, is it possible? thx SWK |
|
By: Olivier Loynet
Date: 2006-05-23
Time: 09:30
|
Re: columns from arrayIt's possible to do only in spreadsheet files (SXC or ODS).
See the example http://www.tinybutstrong.com/apps/tbsooo/example/tbsooo_us_examples_datanum.php Olivier |
|
By: SunWuKung
Date: 2006-05-23
Time: 21:53
|
Re: columns from arrayI am out of luck here then - I work with Writer.
There is no way to do it in writer? Maybe with two blocks - the first creating the columns the second the rows? thx. SWK |
|
By: Olivier Loynet
Date: 2006-05-24
Time: 10:10
|
Re: columns from arrayThe problem is, the numbers of columns are fixed when you prepare the template in the writer. In the spredsheet (calc), the table has many columns pre allocate.
Olivier |
|
By: nathangray
Date: 2007-03-19
Time: 20:27
|
Re: columns from arrayI'm trying to do this, but I can only do rows or columns, not both.
If I have the columns [stock.stock_num;block=table:table-row;headergrp=stock_id] [stock.quantity_in_stock;block=table:table-cell;] I get one row per stock item. If I use: [stock.stock_num;block=table:table-row] [stock.quantity_in_stock;block=table:table-cell;] I get one row per array entry. I'm trying to get one row per stock item, and one column per location. Does anyone know the magic combination to do this? My data looks like this:
Thanks, Nathan |
|
By: nathangray
Date: 2007-03-20
Time: 18:41
|
Re: columns from arrayThe missing magic was defining the columns, then using them first:
[location0.location_name;block=table:table-cell;noerr] as the column heading and [stock.stock_num;block=table:table-row;noerr] [stock.[location1.location_id;block=table:table-cell;noerr].quantity_in_stock] as the row data |