Upgrade to 721 TaxRate Show A - Fast Report: Difference between revisions

From eStream Software
Line 9: Line 9:


==Solution==
==Solution==
*
[[File:Error-721-FR-TaxRate-02.jpg|750px|center]]
:01. Click Code Tab
:02. Scroll down & look for '''procedure SetUp;'''
:03. Replace this script with below script
<syntaxhighlight lang="delphi">
  SQL := 'SELECT Dockey, Tax, TaxRate, Sum(CAST(LocalTaxAmt AS REAL)) LocalTaxAmt, Sum(CAST(LocalAmount AS REAL)) LocalAmount '+
        'FROM Document_Detail ' +
        'WHERE Tax <> '''' ' +
        'GROUP BY Dockey, Tax, TaxRate';
  AddDataSet('GSTAmt', ['Tax', 'TaxRate', 'LocalTaxAmt', 'LocalAmount'])
</syntaxhighlight>
<br />
[[File:Error-721-FR-TaxRate-03.jpg|750px|center]]
:04. Click on Subreport1 tab
:05. Double the Tax Rate memo
[[File:Error-721-FR-TaxRate-04.jpg|750px|center]]
:06. Replace this script with below script
<syntaxhighlight lang="delphi">
[IIF(Trim(<GSTAmt."TaxRate">)='',<GSTAmt."Tax">,<GSTAmt."Tax"> +' @ ' + <GSTAmt."TaxRate">)]
</syntaxhighlight>
:07. Click OK button
:08. Save the report

Revision as of 08:37, 13 November 2015

Introduction

This happen if you had write script to get the TaxRate from Maintain Tax in the report

This due to changing SQLAccounting Coding Structure to cater future Changes in Tax Rate

Problem

You will get below error when you preview the report

Error-721-FR-TaxRate-01.jpg

Solution

Error-721-FR-TaxRate-02.jpg
01. Click Code Tab
02. Scroll down & look for procedure SetUp;
03. Replace this script with below script
  SQL := 'SELECT Dockey, Tax, TaxRate, Sum(CAST(LocalTaxAmt AS REAL)) LocalTaxAmt, Sum(CAST(LocalAmount AS REAL)) LocalAmount '+
         'FROM Document_Detail ' +
         'WHERE Tax <> '''' ' +
         'GROUP BY Dockey, Tax, TaxRate';
  AddDataSet('GSTAmt', ['Tax', 'TaxRate', 'LocalTaxAmt', 'LocalAmount'])


Error-721-FR-TaxRate-03.jpg
04. Click on Subreport1 tab
05. Double the Tax Rate memo
Error-721-FR-TaxRate-04.jpg
06. Replace this script with below script
[IIF(Trim(<GSTAmt."TaxRate">)='',<GSTAmt."Tax">,<GSTAmt."Tax"> +' @ ' + <GSTAmt."TaxRate">)]
07. Click OK button
08. Save the report