<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[FrontAccounting forum — Retrieving data from 3 query(s) for a new report]]></title>
		<link>https://frontaccounting.com/punbb/viewtopic.php?id=3954</link>
		<atom:link href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=3954&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Retrieving data from 3 query(s) for a new report.]]></description>
		<lastBuildDate>Tue, 19 Mar 2013 09:24:40 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Retrieving data from 3 query(s) for a new report]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=16083#p16083</link>
			<description><![CDATA[<p>i have fixed it. cheers.</p><p>this is a flexible architecture.....</p>]]></description>
			<author><![CDATA[null@example.com (tee)]]></author>
			<pubDate>Tue, 19 Mar 2013 09:24:40 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=16083#p16083</guid>
		</item>
		<item>
			<title><![CDATA[Re: Retrieving data from 3 query(s) for a new report]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=16068#p16068</link>
			<description><![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>]]></description>
			<author><![CDATA[null@example.com (tee)]]></author>
			<pubDate>Sun, 17 Mar 2013 15:57:22 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=16068#p16068</guid>
		</item>
		<item>
			<title><![CDATA[Re: Retrieving data from 3 query(s) for a new report]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=16067#p16067</link>
			<description><![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>]]></description>
			<author><![CDATA[null@example.com (tee)]]></author>
			<pubDate>Sun, 17 Mar 2013 15:29:08 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=16067#p16067</guid>
		</item>
		<item>
			<title><![CDATA[Retrieving data from 3 query(s) for a new report]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=16061#p16061</link>
			<description><![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>]]></description>
			<author><![CDATA[null@example.com (tee)]]></author>
			<pubDate>Sat, 16 Mar 2013 18:33:02 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=16061#p16061</guid>
		</item>
	</channel>
</rss>
