<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — Line wrapping for long fields]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=329&amp;type=atom" />
	<updated>2008-09-08T07:07:07Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=329</id>
		<entry>
			<title type="html"><![CDATA[Re: Line wrapping for long fields]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=1096#p1096" />
			<content type="html"><![CDATA[<p>Instead of using the class-member TextCol, you can use TextColLines. This will wrap the column. But you must keep track of the row counter yourself to get a nice layout. Ex.<br /></p><div class="codebox"><pre><code>Before:
$rep-&gt;TextCol(0, 1,    $myrow2[&#039;stock_id&#039;], -2);
$rep-&gt;TextCol(1, 2,    $myrow2[&#039;StockDescription&#039;], -2);
$rep-&gt;TextCol(2, 3,    $DisplayQty, -2);
$rep-&gt;TextCol(3, 4,    $myrow2[&#039;units&#039;], -2);
$rep-&gt;TextCol(4, 5,    $DisplayPrice, -2);
$rep-&gt;TextCol(5, 6,    $DisplayDiscount, -2);
$rep-&gt;TextCol(6, 7,    $DisplayNet, -2);
$rep-&gt;NewLine(1);
After:
$rep-&gt;TextCol(0, 1,    $myrow2[&#039;stock_id&#039;], -2);
$row = $rep-&gt;row;
$rep-&gt;TextColLines(1, 2,    $myrow2[&#039;StockDescription&#039;], -2);
$next_row = $rep-&gt;row;
$rep-&gt;row = $row;
$rep-&gt;TextCol(2, 3,    $DisplayQty, -2);
$rep-&gt;TextCol(3, 4,    $myrow2[&#039;units&#039;], -2);
$rep-&gt;TextCol(4, 5,    $DisplayPrice, -2);
$rep-&gt;TextCol(5, 6,    $DisplayDiscount, -2);
$rep-&gt;TextCol(6, 7,    $DisplayNet, -2);
$rep-&gt;row = $next_row;
$rep-&gt;NewLine(1);</code></pre></div><p>This will wrap the description nicely.<br />If you want to use the long description from the stock_master, you have to change the function get_customer_trans_details in the file /sales/includes/db/cust_trans_details_db.inc, line 5. You have to add the field long_description from stock_master table.</p><p>/Joe</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2008-09-08T07:07:07Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=1096#p1096</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Line wrapping for long fields]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=1095#p1095" />
			<content type="html"><![CDATA[<p>How do I add lien wrapping when printing a long field?</p><p>In particular I would like to show the Item description in its full length on Sales orders, invoices, purchase orders, etc., even if the description exceeds the single line space provided.</p><p>Ideally I would eve like to have the option to print these documents with the long descritpion.</p><p>Any help (or even better updated reports) would be much appreciated.</p>]]></content>
			<author>
				<name><![CDATA[roger]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=207</uri>
			</author>
			<updated>2008-09-08T02:44:27Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=1095#p1095</id>
		</entry>
</feed>
