"for each" function filtered by categories

Hi,
I'm trying to make a report for payslips.
Let's supose that the first item has the category "1" and the second category "2"
I use the function.
<for each="line in o.line_ids">
---Column1-----------------Column2---------Column 3--
<line.name>-------------<line.total>
<line.name>-------------<line.total>
</for>
Now i want that items from one category go to column 2 and items from another category go to column 3. The field name is "category_id"
---Column1-----------------Column2---------Column 3--
------------------------------(category 1)---(category 2)
<line.name>-------------<line.total>
<line.name>--------------------------------<line.total>
</for>
Is this possible?
Thanks in advance
Christian
I'm trying to make a report for payslips.
Let's supose that the first item has the category "1" and the second category "2"
I use the function.
<for each="line in o.line_ids">
---Column1-----------------Column2---------Column 3--
<line.name>-------------<line.total>
<line.name>-------------<line.total>
</for>
Now i want that items from one category go to column 2 and items from another category go to column 3. The field name is "category_id"
---Column1-----------------Column2---------Column 3--
------------------------------(category 1)---(category 2)
<line.name>-------------<line.total>
<line.name>--------------------------------<line.total>
</for>
Is this possible?
Thanks in advance
Christian