deploy: 9e06f72056
This commit is contained in:
parent
de09820554
commit
e4f08bf9a7
187 changed files with 6620 additions and 6342 deletions
|
|
@ -5,16 +5,16 @@
|
|||
<meta name=generator content="Hugo 0.92.1">
|
||||
<meta name=description content>
|
||||
<title>Report Selection :: AL Guidelines</title>
|
||||
<link href=/css/nucleus.css?1644506468 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644506468 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644506468 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644506468 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644506468 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644506468 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644506468 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644506468 rel=stylesheet>
|
||||
<link href=/css/print.css?1644506468 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644506468></script>
|
||||
<link href=/css/nucleus.css?1644600599 rel=stylesheet>
|
||||
<link href=/css/fontawesome-all.min.css?1644600599 rel=stylesheet>
|
||||
<link href=/css/featherlight.min.css?1644600599 rel=stylesheet>
|
||||
<link href=/css/perfect-scrollbar.min.css?1644600599 rel=stylesheet>
|
||||
<link href=/css/auto-complete.css?1644600599 rel=stylesheet>
|
||||
<link href=/css/theme.css?1644600599 rel=stylesheet>
|
||||
<link href=/css/theme-blue.css?1644600599 rel=stylesheet>
|
||||
<link href=/css/variant.css?1644600599 rel=stylesheet>
|
||||
<link href=/css/print.css?1644600599 rel=stylesheet media=print>
|
||||
<script src=/js/jquery.min.js?1644600599></script>
|
||||
<style>:root #header+#content>#left>#rlblock_left{display:none!important}</style>
|
||||
</head>
|
||||
<body data-url=/navpatterns/1-patterns/report-selection/>
|
||||
|
|
@ -32,9 +32,9 @@ ALGuidelines.Dev
|
|||
<input data-search-input id=search-by type=search placeholder=Search...>
|
||||
<span data-search-clear><i class="fas fa-times"></i></span>
|
||||
</div>
|
||||
<script src=/js/lunr.min.js?1644506468></script>
|
||||
<script src=/js/auto-complete.js?1644506468></script>
|
||||
<script src=/js/search.js?1644506468></script>
|
||||
<script src=/js/lunr.min.js?1644600599></script>
|
||||
<script src=/js/auto-complete.js?1644600599></script>
|
||||
<script src=/js/search.js?1644600599></script>
|
||||
</div>
|
||||
<div class=highlightable>
|
||||
<ul class=topics>
|
||||
|
|
@ -248,13 +248,13 @@ ALGuidelines.Dev
|
|||
<div class=wrapper>
|
||||
<nav id=TableOfContents>
|
||||
<ul>
|
||||
<li><a href=#meet-the-pattern><strong>Meet the Pattern</strong></a></li>
|
||||
<li><a href=#know-the-pattern><strong>Know the Pattern</strong></a></li>
|
||||
<li><a href=#use-the-pattern><strong>Use the Pattern</strong></a></li>
|
||||
<li><a href=#example><strong>Example</strong></a></li>
|
||||
<li><a href=#nav-usages><strong>NAV Usages</strong></a></li>
|
||||
<li><a href=#ideas-for-improvement><strong>Ideas for improvement</strong></a></li>
|
||||
<li><a href=#related-patterns><strong>Related Patterns</strong></a></li>
|
||||
<li><a href=#meet-the-pattern>Meet the Pattern</a></li>
|
||||
<li><a href=#know-the-pattern>Know the Pattern</a></li>
|
||||
<li><a href=#use-the-pattern>Use the Pattern</a></li>
|
||||
<li><a href=#example>Example</a></li>
|
||||
<li><a href=#nav-usages>NAV Usages</a></li>
|
||||
<li><a href=#ideas-for-improvement>Ideas for improvement</a></li>
|
||||
<li><a href=#related-patterns>Related Patterns</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
|
|
@ -268,15 +268,15 @@ ALGuidelines.Dev
|
|||
<p>Group 1: Dale Gauci & Kimberly Congleton</p>
|
||||
<p>Group 2: Jens Winberg, Tim Grant, Alen Tot</p>
|
||||
<p>Thanks to Tim Grant who had merged the two patterns, corrected, sent for review and finalized them.</p>
|
||||
<h2 id=meet-the-pattern><strong>Meet the Pattern</strong></h2>
|
||||
<h2 id=meet-the-pattern>Meet the Pattern</h2>
|
||||
<p>It should be possible to change which document report object should be used when printing. This configuration can be stored in one place (Report Selection) and available at configuration time. In this situation, the code for printing records can remain the same.</p>
|
||||
<p>The purpose of this pattern is to describe the process to implement a reports selection by retrieving the specific <strong>Document Header</strong>, determining which type of document is related to it in the <strong>Report Selection Screen</strong>, and call the report which needs to be printed by passing the specific document header. This specifies the reports that you can print when you work with the various documents for sales and purchases, such as orders, quotes, invoices, and credit memos.</p>
|
||||
<h2 id=know-the-pattern><strong>Know the Pattern</strong></h2>
|
||||
<h2 id=know-the-pattern>Know the Pattern</h2>
|
||||
<p>The program can preselect which report will be printed when you print from various types of purchase and sales headers. For example, on an order, the <strong>Order Confirmation</strong> report is automatically printed.</p>
|
||||
<p>The <strong>Report Selection</strong> table contains the specification of which report will be printed in different situations. The <strong>Report Selection</strong> table also contains the report ID and report name for the report that will be printed when the user works with a given document type.</p>
|
||||
<p>The user can, of course, choose to have the program print a different report than the preselected one. You can also add reports to the <strong>Report Selection</strong> table to have the program print more than one report per document type.</p>
|
||||
<p>This pattern should be used when the user needs to print a new type of document which can have different report layouts, or when the user needs to print several different reports in sequence. This can also be used during a new post and print routine, a test report for journal posting or for re-printing a posted document. Using this pattern will minimize code by allowing a flexible means of specifying different reports to print, instead of hard-coding a report id when printing a document.</p>
|
||||
<h2 id=use-the-pattern><strong>Use the Pattern</strong></h2>
|
||||
<h2 id=use-the-pattern>Use the Pattern</h2>
|
||||
<p>The Report Selection Pattern involves the <strong>Report Selection</strong> table as the central configuration element also with the <strong>Report Selection</strong> Page. The table is used in 4 generic functional workflows:</p>
|
||||
<ol>
|
||||
<li>Test Print un-posted</li>
|
||||
|
|
@ -305,7 +305,7 @@ ALGuidelines.Dev
|
|||
<ul>
|
||||
<li>The specific document related posted header table is used along with a typical function: <strong>PrintRecords</strong> within the respective table.</li>
|
||||
</ul>
|
||||
<h2 id=example><strong>Example</strong></h2>
|
||||
<h2 id=example>Example</h2>
|
||||
<p>Sales Document (Invoice)</p>
|
||||
<p>Pre-conditions</p>
|
||||
<ul>
|
||||
|
|
@ -315,51 +315,46 @@ ALGuidelines.Dev
|
|||
</ul>
|
||||
<p>Implementation:</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p>Add a new <strong>Option String</strong> to the <strong>Report Selection</strong> table, <strong>Usage</strong> field (including any ML Captions).</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Calling of <strong>GetReport</strong> function, passing the document header.</p>
|
||||
<p>SalesSetup.GET;
|
||||
IF SalesSetup.“Post & Print with ob Queue” THEN
|
||||
SalesPostViaobQueue.EnqueueSalesDoc(SalesHeader)
|
||||
ELSE BEGIN
|
||||
CODEUNIT.RUN(CODEUNIT::“Sales-Post”,SalesHeader);
|
||||
GetReport(SalesHeader);
|
||||
END;
|
||||
COMMIT;</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Implementing the new document type within the <strong>GetReport</strong> Function, and calling <strong>PrintReport</strong> with the New OptionString</p>
|
||||
<p>“Document Type”::Invoice:
|
||||
BEGIN
|
||||
IF “Last Posting No.” = '' THEN
|
||||
SalesInvHeader.“No.":= “No.”
|
||||
ELSE
|
||||
SalesInvHeader.“No.” := “Last Posting No.";
|
||||
SalesInvHeader.SETRECFILTER;
|
||||
PrintReport(ReportSelection.Usage::“S.Invoice”);
|
||||
END;</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Implement the new Document Type and calling the associated report ID, passing the document header</p>
|
||||
</li>
|
||||
<li>Add a new <strong>Option String</strong> to the <strong>Report Selection</strong> table, <strong>Usage</strong> field (including any ML Captions).</li>
|
||||
<li>Calling of <strong>GetReport</strong> function, passing the document header.</li>
|
||||
</ul>
|
||||
<h2 id=nav-usages><strong>NAV Usages</strong></h2>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al>SalesSetup<span style=color:#f92672>.</span>GET;
|
||||
<span style=color:#66d9ef>IF</span> SalesSetup<span style=color:#f92672>.</span>"Post & Print with ob Queue" <span style=color:#66d9ef>THEN</span>
|
||||
SalesPostViaobQueue<span style=color:#f92672>.</span>EnqueueSalesDoc<span style=color:#f92672>(</span>SalesHeader<span style=color:#f92672>)
|
||||
</span><span style=color:#f92672></span><span style=color:#66d9ef>ELSE</span> <span style=color:#66d9ef>BEGIN</span>
|
||||
<span style=color:#66d9ef>CODEUNIT</span><span style=color:#f92672>.</span>RUN<span style=color:#f92672>(</span><span style=color:#66d9ef>CODEUNIT</span>::"Sales-Post",SalesHeader<span style=color:#f92672>)</span>;
|
||||
GetReport<span style=color:#f92672>(</span>SalesHeader<span style=color:#f92672>)</span>;
|
||||
<span style=color:#66d9ef>END</span>;
|
||||
COMMIT;
|
||||
</code></pre></div><ul>
|
||||
<li>Implementing the new document type within the <strong>GetReport</strong> Function, and calling <strong>PrintReport</strong> with the New OptionString</li>
|
||||
</ul>
|
||||
<div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-al data-lang=al>"Document Type"::Invoice:
|
||||
<span style=color:#66d9ef>BEGIN</span>
|
||||
<span style=color:#66d9ef>IF</span> "Last Posting No." = <span style=color:#e6db74>''</span> <span style=color:#66d9ef>THEN</span>
|
||||
SalesInvHeader<span style=color:#f92672>.</span>"No."<span style=color:#f92672>:=</span> "No."
|
||||
<span style=color:#66d9ef>ELSE</span>
|
||||
SalesInvHeader<span style=color:#f92672>.</span>"No." <span style=color:#f92672>:=</span> "Last Posting No.";
|
||||
SalesInvHeader<span style=color:#f92672>.</span>SETRECFILTER;
|
||||
PrintReport<span style=color:#f92672>(</span>ReportSelection<span style=color:#f92672>.</span>Usage::"S.Invoice"<span style=color:#f92672>)</span>;
|
||||
<span style=color:#66d9ef>END</span>;
|
||||
</code></pre></div><ul>
|
||||
<li>Implement the new Document Type and calling the associated report ID, passing the document header</li>
|
||||
</ul>
|
||||
<h2 id=nav-usages>NAV Usages</h2>
|
||||
<ul>
|
||||
<li>Codeunits 82, 92, for post and printing purchase and sales documents</li>
|
||||
<li>Codeunit 229 for Document printing</li>
|
||||
<li>Header Tables 110, 112, 114, 120, 122, 124, 295, 297, 302, 304. 5744, 5746, 6650, 6660</li>
|
||||
</ul>
|
||||
<p>This pattern is already used for printing documents like sales invoices, proforma, waybills, Finance Charge Memos, Receipt Documents.</p>
|
||||
<hr>
|
||||
<h2 id=ideas-for-improvement><strong>Ideas for improvement</strong></h2>
|
||||
<h2 id=ideas-for-improvement>Ideas for improvement</h2>
|
||||
<p>The “Usage” Field could be more dynamic through a setup field linked to a document type table mapped to the document header Table ID.</p>
|
||||
<p>Report Selection table is currently based on the Usage of the report to be defined. A more generic way could be to only select what record id the printing selection is based on could also be implemented. (I think this means Recordref and Table Number could be used to identify the posted tables)</p>
|
||||
<p>The Report Selection matrix could be evolved to accommodate the Journal post & print configuration. This setup currently resides in the Gen. Journal Template table.</p>
|
||||
<p>Merge the <strong>PrintReport</strong> functions in the purchase and sales post printing functions (82, 92) into a more atomic print selection component.</p>
|
||||
<p>Merge the <strong>PrintRecords</strong> functions in the separate posted header tables into a more atomic print selection component.</p>
|
||||
<h2 id=related-patterns><strong>Related Patterns</strong></h2>
|
||||
<h2 id=related-patterns>Related Patterns</h2>
|
||||
<ul>
|
||||
<li>Posting Routine Pattern (Journal/Document)</li>
|
||||
<li>Post Batch Routine Pattern</li>
|
||||
|
|
@ -376,12 +371,12 @@ END;</p>
|
|||
<div style=left:-1000px;overflow:scroll;position:absolute;top:-1000px;border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px>
|
||||
<div style=border:none;box-sizing:content-box;height:200px;margin:0;padding:0;width:200px></div>
|
||||
</div>
|
||||
<script src=/js/clipboard.min.js?1644506469></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644506469></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644506469></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644506469></script>
|
||||
<script src=/js/featherlight.min.js?1644506469></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644506469></script>
|
||||
<script src=/js/relearn.js?1644506469></script>
|
||||
<script src=/js/clipboard.min.js?1644600599></script>
|
||||
<script src=/js/perfect-scrollbar.min.js?1644600599></script>
|
||||
<script src=/js/perfect-scrollbar.jquery.min.js?1644600599></script>
|
||||
<script src=/js/jquery.svg.pan.zoom.js?1644600599></script>
|
||||
<script src=/js/featherlight.min.js?1644600599></script>
|
||||
<script src=/js/modernizr.custom-3.6.0.js?1644600599></script>
|
||||
<script src=/js/relearn.js?1644600599></script>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue