<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — Retrieving data from 3 query(s) for a new report]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=3954&amp;type=atom" />
	<updated>2013-03-19T09:24:40Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=3954</id>
		<entry>
			<title type="html"><![CDATA[Re: Retrieving data from 3 query(s) for a new report]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=16083#p16083" />
			<content type="html"><![CDATA[<p>i have fixed it. cheers.</p><p>this is a flexible architecture.....</p>]]></content>
			<author>
				<name><![CDATA[tee]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=17549</uri>
			</author>
			<updated>2013-03-19T09:24:40Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=16083#p16083</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Retrieving data from 3 query(s) for a new report]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=16068#p16068" />
			<content type="html"><![CDATA[<p>Hi All,</p><p>this is the only error i got</p><p>Parse error: syntax error, unexpected T_VARIABLE in C:\xampp\htdocs\fa\reporting\rep320.php on line 105_ </p><p>which was $res3= get_work_order_issue($issue_no,$i);</p><p>what am i missing? Any help will be appreciated</p>]]></content>
			<author>
				<name><![CDATA[tee]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=17549</uri>
			</author>
			<updated>2013-03-17T15:57:22Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=16068#p16068</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Retrieving data from 3 query(s) for a new report]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=16067#p16067" />
			<content type="html"><![CDATA[<p>Hi, I figured why this post hasnt received any response so i digged and came up with the following. it just didnt print anything, i cant fugure where my mistakes were even after setting my debug to 2.</p><p>&lt;?php<br />/**********************************************************************<br />&nbsp; &nbsp; Copyright (C) FrontAccounting, LLC.<br />&nbsp; &nbsp; Released under the terms of the GNU General Public License, GPL, <br />&nbsp; &nbsp; as published by the Free Software Foundation, either version 3 <br />&nbsp; &nbsp; of the License, or (at your option) any later version.<br />&nbsp; &nbsp; This program is distributed in the hope that it will be useful,<br />&nbsp; &nbsp; but WITHOUT ANY WARRANTY; without even the implied warranty of<br />&nbsp; &nbsp; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.&nbsp; <br />&nbsp; &nbsp; See the License here &lt;http://www.gnu.org/licenses/gpl-3.0.html&gt;.<br />***********************************************************************/<br />$page_security = &#039;SA_SALESANALYTIC&#039;;</p><br /><p>$path_to_root=&quot;..&quot;;</p><p>include_once($path_to_root . &quot;/includes/session.inc&quot;);<br />include_once($path_to_root . &quot;/includes/date_functions.inc&quot;);<br />include_once($path_to_root . &quot;/sales/includes/db/cust_trans_db.inc&quot;);<br />include_once($path_to_root . &quot;/inventory/includes/inventory_db.inc&quot;);<br />include_once($path_to_root . &quot;/manufacturing/includes/db/work_order_issues_db.inc&quot;);<br />include_once($path_to_root . &quot;/purchasing/includes/db/supp_trans_db.inc&quot;);<br />include_once($path_to_root . &quot;/includes/ui.inc&quot;);<br />// ----------------------------------------------------------------<br />// $ Revision:&nbsp; &nbsp; 2.0 $<br />// Creator:&nbsp; &nbsp; tee<br />// date_:&nbsp; &nbsp; 2013-01-09<br />// Title:&nbsp; &nbsp; Inventory DailyRefs Report<br />// ----------------------------------------------------------------<br />//----------------------------------------------------------------------------------------------------</p><p>print_dailyref();</p><p>//----------------------------------------------------------------------------------------------------</p><p>function print_dailyref()<br />{<br />&nbsp; &nbsp; global $path_to_root,$systypes_array;<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; //include_once($path_to_root . &quot;/reporting/includes/pdf_report.inc&quot;);<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; $from = $_POST[&#039;PARAM_0&#039;];<br />&nbsp; &nbsp; $to = $_POST[&#039;PARAM_1&#039;];<br />&nbsp; &nbsp; $comments = $_POST[&#039;PARAM_2&#039;];<br />&nbsp; &nbsp; $destination = $_POST[&#039;PARAM_3&#039;];<br />&nbsp; &nbsp; if ($destination)<br />&nbsp; &nbsp; &nbsp; &nbsp; include_once($path_to_root . &quot;/reporting/includes/excel_report.inc&quot;);<br />&nbsp; &nbsp; else<br />&nbsp; &nbsp; &nbsp; &nbsp; include_once($path_to_root . &quot;/reporting/includes/pdf_report.inc&quot;);<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; $from = date2sql($from);<br />&nbsp; &nbsp; $to = date2sql($to);<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; $cols = array(0,&nbsp; 175,&nbsp; 350,&nbsp; 515);</p><p>&nbsp; &nbsp; $headers = array(_(&#039;Type&#039;), _(&#039;Date&#039;), _(&#039;Reference #&#039;));<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; $aligns = array(&#039;left&#039;,&nbsp; &nbsp; &#039;left&#039;, &#039;right&#039;);</p><p>&nbsp; &nbsp; $params = array(&#039;comments&#039; =&gt; $comments);<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; for ($i = $from; $i &lt;= $to; $i++)<br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; $rep = new FrontReport(_(&#039;Inventory DailyRef Report&#039;), &quot;InventoryDailyRefReport&quot;, user_pagesize());<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; $rep-&gt;Font();<br />&nbsp; &nbsp; &nbsp; &nbsp; $rep-&gt;Info($params, $cols, $headers, $aligns);<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; $rep-&gt;NewPage();<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; if (!exists_customer_trans($i))<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; continue;<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; $res = get_sql_for_customer_inquiry($i);<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; while ($myrow = db_query($res))<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $rep-&gt;NewLine();<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $rep-&gt;TextCol(0, 1,$systypes_array[$myrow[&#039;type&#039;]]);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $rep-&gt;TextCol(1, 2,$myrow[&#039;date&#039;]);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $rep-&gt;TextCol(2, 3,$myrow[&#039;reference&#039;]);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $rep-&gt;NewLine();<br />&nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; if (!exists_supp_trans($i))<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; continue;<br />&nbsp; &nbsp; &nbsp; &nbsp; $res2 = get_sql_for_supplier_inquiry($i);<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; while($myrow2 = db_fetch($res2))<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $rep-&gt;NewLine();<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $rep-&gt;TextCol(0, 1,$systypes_array[$myrow2[&#039;type&#039;]]);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $rep-&gt;TextCol(1, 2,$myrow2[&#039;date&#039;]);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $rep-&gt;TextCol(2, 3,$myrow2[&#039;reference&#039;]);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $rep-&gt;NewLine();<br />&nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; if (!exists_work_order_issue($issue_no,$i)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; continue;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; $res3 = get_work_order_issue($issue_no,$i);<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; while($myrow3 = db_fetch($res3))<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $rep-&gt;NewLine();<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $rep-&gt;TextCol(0, 1,$myrow2$systypes_array[$myrow3[&#039;type&#039;]]);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $rep-&gt;TextCol(1, 2,$myrow2[&#039;date&#039;]);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $rep-&gt;TextCol(2, 3,$myrow2[&#039;reference&#039;]);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $rep-&gt;NewLine();<br />&nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; }<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; $rep-&gt;Line($rep-&gt;row&nbsp; - 4);<br />&nbsp; &nbsp; $rep-&gt;Line();<br />&nbsp; &nbsp; $rep-&gt;End();<br />}</p><p>?&gt;</p>]]></content>
			<author>
				<name><![CDATA[tee]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=17549</uri>
			</author>
			<updated>2013-03-17T15:29:08Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=16067#p16067</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Retrieving data from 3 query(s) for a new report]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=16061#p16061" />
			<content type="html"><![CDATA[<p>Great work!!! </p><p>Is there a way to use the following query(s) to generate a new report by combining them as one result set?</p><p>a)get_sql_for_supplier_inquiry()<br />b)get_sql_for_customer_inquiry() and<br />c)get_work_order_issues()?</p><p>i desire only the references in these query to be outputted in either pdf or xcel. with the print header customer, supplier and manufacturing order by date.</p><p>Any clue will be appreciated.</p>]]></content>
			<author>
				<name><![CDATA[tee]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=17549</uri>
			</author>
			<updated>2013-03-16T18:33:02Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=16061#p16061</id>
		</entry>
</feed>
