Topic: Rowspan in table

Hello,

I can create a colspan cell in Front Accounting report, but how can I create a rowspan cell with it? Thank you

Re: Rowspan in table

Use the function rep->NewLine to add extra lines.

Joe

3 (edited by barbarian 05/28/2014 05:29:03 am)

Re: Rowspan in table

Please see my code below "

$rep->TextCol($x, 1+$x++, _($no++),0,0,1);
$rep->TextCol($x, 1+$x++, $row['so_number'],0,0,1);
$rep->TextCol($x, 1+$x++, $row['branch'],0,0,1);
$rep->TextCol($x, 1+$x++, $row['cust_ref'],0,0,1);
$rep->TextCol($x, 1+$x++, $row['curr_code'],0,0,1);
$rep->AmountCol($x, 1+$x++, $row['totval'],0,0,0,1);
$rep->TextCol($x, 1+$x++, sql2date($row['ord_date']),0,0,1);
$rep->NewLine();

I try to list sales order in a table. The newline work to create new row. But I want to create 2 cell that merge vertically. For example in the column of customer. For all the same customer, I want to rowspan the name of the customer. If I use newline, it's like creating some new row. I can merge cell horizontally using number in text col like above. The $x control the from an to cell. In above, each cell just have 1 width cell. Is there any function work like this for rowspan?

Re: Rowspan in table

Look into the class FrontReporting in file /reporting/includes/pdf_report.inc. About line 216, lineHeight = 12.
You can temporarely increase this value to a greater value. Ex.

$rep->lineHeight += 10;
Yoyr code inside the new rowspan...
$rep->lineHeight -= 10;

Maybe you can be inspired to do other things by studying this class.

Joe