Categories > OpenTBS with DOCX >

docx with aggregate?

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: M. Polat
Date: 2014-10-27
Time: 17:36

docx with aggregate?

Hello
I am trying to use the the plugin "Aggregate" withing a docx template. It does not work, Am I doing corect thing? Can I use aggregate with a docx template?
I need the opearation "sum".
Is there sample block how to use it
This my php file:

include_once('tbs/tbs_us/tbs_class.php');
include_once('tbs/tbs_plugin_opentbs/tbs_plugin_opentbs.php');
include_once('tbs/tbs_plugin_aggregate/tbs_plugin_aggregate.php');

$TBS = new clsTinyButStrong;
$TBS->Plugin(TBS_INSTALL, OPENTBS_PLUGIN);

In docx I am using this:

[a1;block=begin]
[a1.Num] [a1.Art;block:tbs:row;aggregate=Total:sum]
[a1.Total:sum]
[a1;block=end]

And I am getting the following error:
TinyButStrong Error in field [a1.Total:sum...]: item 'Total:sum' is not an existing key in the array. This message can be cancelled using parameter 'noerr'.
..

mpol_ch


By: M. Polat
Date: 2014-10-28
Time: 08:37

Re: docx with aggregate?

Hello
The following code solved my problem. It was the formating issue with template:


[sub.Num;block=tbs:row;p1=[main.PId]; aggregate=Total:sum]    [sub.Art;]    [sub.Menge]    [sub.Ansatz]    [sub.Total]
       
Total:        [sub.Total:sum]

Thanks
mpol_ch