<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[My Visual Database — How to pass Datetimepicker value to report??]]></title>
		<link>https://myvisualdatabase.com/forum/viewtopic.php?id=5528</link>
		<atom:link href="https://myvisualdatabase.com/forum/extern.php?action=feed&amp;tid=5528&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in How to pass Datetimepicker value to report??.]]></description>
		<lastBuildDate>Tue, 13 Aug 2019 11:18:18 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: How to pass Datetimepicker value to report??]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=32313#p32313</link>
			<description><![CDATA[<p>Thanks @ehwagner<br />For me, this is the DO MORE...<br />Wow, an amazing method for scripting in FAST REPORT.</p>]]></description>
			<author><![CDATA[null@example.com (Asifmute)]]></author>
			<pubDate>Tue, 13 Aug 2019 11:18:18 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=32313#p32313</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to pass Datetimepicker value to report??]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=32303#p32303</link>
			<description><![CDATA[<p>As in most cases with MVD there are multiple ways to do things. In this case there is another option for the report date without formatting in the Report SQL or using calculated field. You can create a memo field (label field) in the report and then on the AfterData event place the following script:</p><div class="codebox"><pre><code>procedure Memo1OnAfterData(Sender: TfrxComponent);
begin
    Memo1.Text := FormatDateTime(&#039;d&#039;,SqlDateTimeToDateTime(&lt;Report.&quot;Date&quot;&gt;)) + &#039; &#039; 
      + FormatDateTime(&#039;mmmm&#039;,SqlDateTimeToDateTime(&lt;Report.&quot;Date&quot;&gt;)) + &#039; &#039;
      + FormatDateTime(&#039;yyyy&#039;,SqlDateTimeToDateTime(&lt;Report.&quot;Date&quot;&gt;));  
end;</code></pre></div><br /><p>Using Derek&#039;s example see attached for another option. I&#039;m not in no way trying to say that my way is the best. Just trying to show another possiblity.</p>]]></description>
			<author><![CDATA[null@example.com (ehwagner)]]></author>
			<pubDate>Mon, 12 Aug 2019 17:11:54 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=32303#p32303</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to pass Datetimepicker value to report??]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=32283#p32283</link>
			<description><![CDATA[<p>@DBK<br />Thanks for your extremely best suggestion, as my knowledge in scripting, is very low, but your support makes me expert.</p>]]></description>
			<author><![CDATA[null@example.com (Asifmute)]]></author>
			<pubDate>Sun, 11 Aug 2019 19:53:35 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=32283#p32283</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to pass Datetimepicker value to report??]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=32280#p32280</link>
			<description><![CDATA[<p>Excellent solution Derek (as always!) I wanted to try calculated fields at first but i wouldn&#039;t know how to begin, how do you come up with those syntaxes!? <img src="https://myvisualdatabase.com/forum/img/smilies/yikes.png" width="15" height="15" alt="yikes" /> <img src="https://myvisualdatabase.com/forum/img/smilies/big_smile.png" width="15" height="15" alt="big_smile" /></p><br /><p>@Asifmute: i would advise to follow Derek&#039;s solution, using a calculated field is (<em>in my opinion</em>) much easier to maintain, oversee, and plan in your application. Debugging is much faster, and doesn&#039;t (really) break any other code if you would make small adjustments here and there, if it does then a calculated field is quickly adjusted.</p><br /><p>I also tried to make a solution based on a report sql query by <span class="bbu">concatenating</span> (which i learned from Derek) using &#039;||&#039; between the fields, have a look as attached.</p><br /><div class="codebox"><pre><code>SELECT  
STRFTIME(&#039;%d&#039;, date)    
||
case strftime(&#039;%m&#039;, date) when &#039;01&#039; then &#039; January &#039; when &#039;02&#039; then &#039; February &#039; when &#039;03&#039; then &#039; March &#039; when &#039;04&#039; then &#039; April &#039; when &#039;05&#039; then &#039; May &#039; when &#039;06&#039; then &#039; June &#039; when &#039;07&#039; then &#039; July &#039; when &#039;08&#039; then &#039; August &#039; when &#039;09&#039; then &#039; September &#039; when &#039;10&#039; then &#039; October &#039; when &#039;11&#039; then &#039; November &#039; when &#039;12&#039; then &#039; December &#039; else &#039;&#039; end
||
STRFTIME(&#039;%Y&#039;, date)
FROM dates
WHERE dates.id = $id;  </code></pre></div>]]></description>
			<author><![CDATA[null@example.com (dbk)]]></author>
			<pubDate>Sun, 11 Aug 2019 16:59:57 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=32280#p32280</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to pass Datetimepicker value to report??]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=32275#p32275</link>
			<description><![CDATA[<p>Hi,<br />Perhaps the easiest way is to reformat the date using a calculated field and then just pass it through to the report and not use ReportSQL at all (see attached).<br />Thanks to DBK for the example.<br />Derek.</p>]]></description>
			<author><![CDATA[null@example.com (derek)]]></author>
			<pubDate>Sun, 11 Aug 2019 15:28:01 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=32275#p32275</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to pass Datetimepicker value to report??]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=32268#p32268</link>
			<description><![CDATA[<p>THANKS &quot;DBK&quot;, AS I WAS WAITING FOR YOUR REPLY.<br />Is this possible to call the date like this format,&nbsp; 11 August 2019.</p>]]></description>
			<author><![CDATA[null@example.com (Asifmute)]]></author>
			<pubDate>Sat, 10 Aug 2019 20:32:12 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=32268#p32268</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to pass Datetimepicker value to report??]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=32267#p32267</link>
			<description><![CDATA[<p>Hello Asifmute,</p><br /><p>Attached is a quick sample.</p>]]></description>
			<author><![CDATA[null@example.com (dbk)]]></author>
			<pubDate>Sat, 10 Aug 2019 20:24:28 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=32267#p32267</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to pass Datetimepicker value to report??]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=32253#p32253</link>
			<description><![CDATA[<p>Please provide us a sample.<br />Thanks in advance.</p>]]></description>
			<author><![CDATA[null@example.com (Asifmute)]]></author>
			<pubDate>Fri, 09 Aug 2019 23:19:44 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=32253#p32253</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to pass Datetimepicker value to report??]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=32251#p32251</link>
			<description><![CDATA[<p>hello,</p><p>so you want to show the name of the month?</p><br /><p>try in your report SQL:</p><div class="codebox"><pre><code>SELECT
 case strftime(&#039;%m&#039;, DateTimerPickerField) when &#039;01&#039; then &#039;January&#039; when &#039;02&#039; then &#039;Febuary&#039; when &#039;03&#039; then &#039;March&#039; when &#039;04&#039; then &#039;April&#039; when &#039;05&#039; then &#039;May&#039; when &#039;06&#039; then &#039;June&#039; when &#039;07&#039; then &#039;July&#039; when &#039;08&#039; then &#039;August&#039; when &#039;09&#039; then &#039;September&#039; when &#039;10&#039; then &#039;October&#039; when &#039;11&#039; then &#039;November&#039; when &#039;12&#039; then &#039;December&#039; else &#039;&#039; end
as month 
  FROM table;</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (dbk)]]></author>
			<pubDate>Fri, 09 Aug 2019 18:50:50 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=32251#p32251</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to pass Datetimepicker value to report??]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=32248#p32248</link>
			<description><![CDATA[<p>it is a totally wrong date in the report...</p><p>to make it a bit clearer:</p><p>I am creating a report by report sql - Button.</p><p>I need the Datetimepicker Date formatted as MMMM to be passed to the Report.</p><p>Any Idea ??</p>]]></description>
			<author><![CDATA[null@example.com (lupo1st)]]></author>
			<pubDate>Fri, 09 Aug 2019 17:25:22 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=32248#p32248</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to pass Datetimepicker value to report??]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=32246#p32246</link>
			<description><![CDATA[<p>hello,</p><p>is it a wrong date or is it incorrectly formatted? do you have a screenshot?</p>]]></description>
			<author><![CDATA[null@example.com (dbk)]]></author>
			<pubDate>Fri, 09 Aug 2019 17:15:24 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=32246#p32246</guid>
		</item>
		<item>
			<title><![CDATA[How to pass Datetimepicker value to report??]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=32245#p32245</link>
			<description><![CDATA[<p>Hi there,</p><p>i&#039;m stuck on how to pass the datetimepicker value to the report. Using the Variables Datetimepicker in the report gives me a totally wrong date!</p><p>Could someone please help me out ...</p><br /><p>Thank you</p><br /><p>Lupo</p>]]></description>
			<author><![CDATA[null@example.com (lupo1st)]]></author>
			<pubDate>Fri, 09 Aug 2019 17:03:04 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=32245#p32245</guid>
		</item>
	</channel>
</rss>
