<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Doens.be &#187; RunBaseReport</title>
	<atom:link href="http://www.doens.be/tag/runbasereport/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.doens.be</link>
	<description></description>
	<lastBuildDate>Sat, 07 Jan 2012 04:20:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Class RunBaseReport</title>
		<link>http://www.doens.be/2009/04/class-runbasereport/</link>
		<comments>http://www.doens.be/2009/04/class-runbasereport/#comments</comments>
		<pubDate>Mon, 13 Apr 2009 19:45:51 +0000</pubDate>
		<dc:creator>Jeroen Doens</dc:creator>
				<category><![CDATA[Dynamics AX]]></category>
		<category><![CDATA[Ax 5.0 (2009)]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[RunBaseReport]]></category>
		<category><![CDATA[X++]]></category>

		<guid isPermaLink="false">http://www.doens.be/?p=31</guid>
		<description><![CDATA[When you create a class that extends from RunBaseReport and you try to modify the printer preferences it won&#8217;t have any effect. This small bug can be fixed very easy. Edit the class RunBaseReportDialog, method main and check lines 14 and 15: 1 2 3 4 5 6 7 8 9 10 11 12 13 [...]]]></description>
			<content:encoded><![CDATA[<p>When you create a class that extends from RunBaseReport and you try to modify the printer preferences it won&#8217;t have any effect. This small bug can be fixed very easy.</p>
<p>Edit the class RunBaseReportDialog, method main and check lines 14 and 15:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
</pre></td><td class="code"><pre class="xpp" style="font-family:monospace;"><span style="color: #0000ff;">static</span> <span style="color: #0000ff;">void</span> main<span style="color: #000000;">&#40;</span>Args args<span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
    RunBaseReportDialog reportDialog <span style="color: #00007f;">=</span> <span style="color: #0000ff;">new</span> RunBaseReportDialog<span style="color: #000000;">&#40;</span>args.<span style="color: #000000;">caller</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;
    RunBaseReport runBaseReport <span style="color: #00007f;">=</span> args.<span style="color: #000000;">caller</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>.<span style="color: #000000;">runbase</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
    ReportRun reportRun <span style="color: #00007f;">=</span> runBaseReport.<span style="color: #000000;">reportRun</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
    Report report <span style="color: #00007f;">=</span> reportRun.<span style="color: #000000;">report</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
    <span style="color: #0000ff;">boolean</span> oldInteractive;
    <span style="color: #0000ff;">boolean</span> res;
    Dialog dialog;
    ;
    <span style="color: #007f00;">// We must invoke the SysPrintForm via the report object so that we honor an prompt overrides.</span>
    oldInteractive <span style="color: #00007f;">=</span> report.<span style="color: #000000;">interactive</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
    report.<span style="color: #000000;">interactive</span><span style="color: #000000;">&#40;</span><span style="color: #0000ff;">true</span><span style="color: #000000;">&#41;</span>;
    <span style="color: #007f00;">//res = reportRun.prompt(); // COMMENTED</span>
    res <span style="color: #00007f;">=</span> reportDialog.<span style="color: #000000;">prompt</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>; <span style="color: #007f00;">// CHANGE OF CODE</span>
    report.<span style="color: #000000;">interactive</span><span style="color: #000000;">&#40;</span>oldInteractive<span style="color: #000000;">&#41;</span>;
    <span style="color: #0000ff;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #00007f;">!</span>res<span style="color: #000000;">&#41;</span>
        <span style="color: #0000ff;">return</span>;
    dialog <span style="color: #00007f;">=</span> Dialog<span style="color: #00007f;">::</span><span style="color: #000000;">getDialogFromCaller</span><span style="color: #000000;">&#40;</span>args.<span style="color: #000000;">caller</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;
    <span style="color: #0000ff;">if</span> <span style="color: #000000;">&#40;</span>dialog<span style="color: #000000;">&#41;</span>
    <span style="color: #000000;">&#123;</span>
        dialog.<span style="color: #000000;">updateServer</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
    <span style="color: #000000;">&#125;</span>
    runBaseReport.<span style="color: #000000;">dialogUpdatePrinterSettings</span><span style="color: #000000;">&#40;</span>dialog<span style="color: #000000;">&#41;</span>;
    reportDialog.<span style="color: #000000;">run</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.doens.be/2009/04/class-runbasereport/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

