<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — How to find the query for a specific report?]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=7479&amp;type=atom" />
	<updated>2018-04-25T02:56:32Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=7479</id>
		<entry>
			<title type="html"><![CDATA[Re: How to find the query for a specific report?]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=31518#p31518" />
			<content type="html"><![CDATA[<p>Even queries for the Web UI Inquiry pages do not generate any records in the tables - they are merely select queries. If the show_sql and debug flags in the config.php file are enabled along with show select, then the select queries too will be shown.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2018-04-25T02:56:32Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=31518#p31518</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: How to find the query for a specific report?]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=31510#p31510" />
			<content type="html"><![CDATA[<p>In config.php find this line:-</p><div class="codebox"><pre><code>$show_sql         = 0;    // show all sql queries in page footer for debugging purposes</code></pre></div><p>Change it to this:-</p><div class="codebox"><pre><code>$show_sql         = 1;    // show all sql queries in page footer for debugging purposes</code></pre></div><p>Now the sql for each page will show at the bottom.</p><p>Will not work for reports; a possible solution is to find the same functionality in the program that matches the report you want.</p><p>The sql trail info is kept in the database in a table called &#039;yourprefix_sql_trail&#039;</p>]]></content>
			<author>
				<name><![CDATA[poncho1234]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=19944</uri>
			</author>
			<updated>2018-04-24T14:53:10Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=31510#p31510</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: How to find the query for a specific report?]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=31507#p31507" />
			<content type="html"><![CDATA[<p>Thanks, but how should I know that information refers to which rep file?</p>]]></content>
			<author>
				<name><![CDATA[nashmil.b]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=42298</uri>
			</author>
			<updated>2018-04-24T12:11:17Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=31507#p31507</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: How to find the query for a specific report?]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=31506#p31506" />
			<content type="html"><![CDATA[<p>you have to know which rep file you want to see sql code and than open the rep file within the rep file you can see some functions and query must be written there. </p><p>Just find &#039;db_query&#039; and&nbsp; there might be you see the variable like &#039;$sql&#039; before this line just use &#039;display_error($sql);&#039; it will show all the queries with error mark on the report UI page. than you can get the sql queries,</p><p>From the queries you have to replace the table pref with selected company.</p>]]></content>
			<author>
				<name><![CDATA[kvvaradha]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=19348</uri>
			</author>
			<updated>2018-04-24T12:05:51Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=31506#p31506</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: How to find the query for a specific report?]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=31503#p31503" />
			<content type="html"><![CDATA[<p>You&#039;re right, but for the &quot;Report&quot; word I meant &quot;UI Reports&quot;<br />For example, for the following one:</p><p>Reference:&nbsp; &nbsp; <br />Type:&nbsp; &nbsp; &nbsp; &nbsp; From:&nbsp; &nbsp; <br />01/24/2017<br />&nbsp; Click Here to Pick up the date&nbsp; &nbsp; To:&nbsp; &nbsp; <br />04/24/2018<br />&nbsp; Click Here to Pick up the date<br />Memo:&nbsp; &nbsp; <br />User:&nbsp; &nbsp; &nbsp; &nbsp; Show closed:&nbsp; &nbsp; &nbsp; &nbsp; Search<br />Date&nbsp; &nbsp; Type&nbsp; &nbsp; Trans #&nbsp; &nbsp; Counterparty&nbsp; &nbsp; Reference&nbsp; &nbsp; Amount&nbsp; &nbsp; Memo&nbsp; &nbsp; User&nbsp; &nbsp; View&nbsp; &nbsp; <br />01/24/2017&nbsp; &nbsp; Bank Deposit&nbsp; &nbsp; 65&nbsp; &nbsp; &nbsp; &nbsp; 01/2017&nbsp; &nbsp; 1,314,060.00&nbsp; &nbsp; EXPRESS EASY(DOC)DJIBUTY EXPRESS(N)&nbsp; &nbsp; demouser&nbsp; &nbsp; GL&nbsp; &nbsp; Edit<br />01/24/2017&nbsp; &nbsp; Bank Deposit&nbsp; &nbsp; 81&nbsp; &nbsp; Moni Haque&nbsp; &nbsp; 00002030/2017&nbsp; &nbsp; 126,406.00&nbsp; &nbsp; EXPRESS EASY(DOC)DJIBOUTI EXPRESS(N)&nbsp; &nbsp; demouser&nbsp; &nbsp; GL&nbsp; &nbsp; Edit<br />01/24/2017&nbsp; &nbsp; Bank Deposit&nbsp; &nbsp; 83&nbsp; &nbsp; 3s&nbsp; &nbsp; 000020/2017&nbsp; &nbsp; 126,406.00&nbsp; &nbsp; EXPRESS EASY(DOC)DJIBOUTI EXPRESS(N)&nbsp; &nbsp; demouser&nbsp; &nbsp; GL&nbsp; &nbsp; Edit<br />01/24/2017&nbsp; &nbsp; Bank Deposit&nbsp; &nbsp; 99&nbsp; &nbsp; &nbsp; &nbsp; 064/2017&nbsp; &nbsp; 126,406.00&nbsp; &nbsp; EXPRESS EASY(DOC)DJIBOUTI EXPRESS(N)&nbsp; &nbsp; demouser&nbsp; &nbsp; GL&nbsp; &nbsp; Edit<br />01/24/2017&nbsp; &nbsp; Sales Invoice&nbsp; &nbsp; 368&nbsp; &nbsp; Alaa&nbsp; &nbsp; 359/2017&nbsp; &nbsp; 10,053.29&nbsp; &nbsp; Sales Quotation # 181&nbsp; &nbsp; demouser&nbsp; &nbsp; GL&nbsp; &nbsp; </p><br /><p>I want to know what&#039;s the query for these data, I mean which query results to this data?</p><p>You said that I should turn the sql_trail and debug on, I did it, but now I don&#039;t know where the queries have been saved?</p><p>Thanks for helping</p>]]></content>
			<author>
				<name><![CDATA[nashmil.b]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=42298</uri>
			</author>
			<updated>2018-04-24T08:58:45Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=31503#p31503</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: How to find the query for a specific report?]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=31492#p31492" />
			<content type="html"><![CDATA[<p>Reports cannot ordinarily add records.<br />Only the Web UI forms can do it like generating a sales invoice or allocating a supplier payment to a purchase invoice.</p><p>Provide an example of a report where you get entries generated.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2018-04-23T14:37:00Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=31492#p31492</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: How to find the query for a specific report?]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=31483#p31483" />
			<content type="html"><![CDATA[<p>And what should I do to adding new records for every report?</p>]]></content>
			<author>
				<name><![CDATA[nashmil.b]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=42298</uri>
			</author>
			<updated>2018-04-23T05:55:25Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=31483#p31483</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: How to find the query for a specific report?]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=31474#p31474" />
			<content type="html"><![CDATA[<p>It is possible that several records can be added to the table for each report especially when select queries are enabled. Generally there are no update / insert SQLs captured during output of standard reports.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2018-04-22T17:07:22Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=31474#p31474</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: How to find the query for a specific report?]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=31473#p31473" />
			<content type="html"><![CDATA[<p>Thanks for your reply.<br />And&nbsp; after each report I&#039;m running on FA a new record will be added to &quot;SQL Trail&quot; table?</p>]]></content>
			<author>
				<name><![CDATA[nashmil.b]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=42298</uri>
			</author>
			<updated>2018-04-22T12:38:06Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=31473#p31473</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: How to find the query for a specific report?]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=31472#p31472" />
			<content type="html"><![CDATA[<p>Turn on the debug and sql_trail flags in the <strong>config.php</strong> file.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2018-04-22T11:33:31Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=31472#p31472</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[How to find the query for a specific report?]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=31471#p31471" />
			<content type="html"><![CDATA[<p>I want to know about the query which has run for a specified query, and using it directly in my database.<br />For example in &quot;Banking and General Ledger&quot; -&gt; Journal Inquiry&quot; what is the query?<br />I want to make some changes in the main query and give my expected result in my database.</p>]]></content>
			<author>
				<name><![CDATA[nashmil.b]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=42298</uri>
			</author>
			<updated>2018-04-22T05:54:10Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=31471#p31471</id>
		</entry>
</feed>
