Fast Report - Get Data from Available Pipeline: Difference between revisions

From eStream Software
Line 7: Line 7:
* Group the data by Tax code
* Group the data by Tax code


[[File:FR-GetAvailDB-01.jpg|center]]
[[File:FR-GetAvailDB-01.jpg|700px|center]]
:01. Click '''Code''' tab & scroll down look for '''procedure SetUp'''
:01. Click '''Code''' tab & scroll down look for '''procedure SetUp'''
:02. Copy below script & paste between the '''begin''' & '''end;''' in '''procedure SetUp'''
:02. Copy below script & paste it between the '''begin''' & '''end;''' in '''procedure SetUp'''
<syntaxhighlight lang="delphi">
<syntaxhighlight lang="delphi">
   SQL := 'SELECT Dockey, Tax, TaxRate, Sum(CAST(LocalTaxAmt AS REAL)) LocalTaxAmt, ' +
   SQL := 'SELECT Dockey, Tax, TaxRate, Sum(CAST(LocalTaxAmt AS REAL)) LocalTaxAmt, ' +
Line 21: Line 21:
   .LinkTo('Main', 'Dockey', 'Dockey'); // Link the New Pipeline (eg here is to link with Main Pipeline)
   .LinkTo('Main', 'Dockey', 'Dockey'); // Link the New Pipeline (eg here is to link with Main Pipeline)
</syntaxhighlight>
</syntaxhighlight>
:03. Click File | Save As... to save the file (eg Sales Invoice 7 (GST 2)-New)
:04. Exit File | Exit to exit the report design
:05. Click Design again in the report designer
[[File:FR-GetAvailDB-02.jpg|700px|center]]


==See also==
==See also==
* [[Report Designer]]
* [[Report Designer]]
* Others [[Customisation]]
* Others [[Customisation]]

Revision as of 03:12, 18 November 2015

Introduction

Sometime in the report you might wanted some extra information or further analysis from the report itself but you not able to select in the report design. So you had to self query to get the extra information or further analysis.

Steps

Below is Example doing following actions

  • Get data information (Tax, Tax rate, LocalAmount, LocalTaxAmt)
  • Group the data by Tax code
FR-GetAvailDB-01.jpg
01. Click Code tab & scroll down look for procedure SetUp
02. Copy below script & paste it between the begin & end; in procedure SetUp
  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']) // Create New Pipeline (eg here is GSTAmt)
  .GetLocalData(SQL) // Execute the Query
  .SetDisplayFormat(['LocalTaxAmt', 'LocalAmount'],<Option."AccountingValueDisplayFormat">) // Set Display Format
  .LinkTo('Main', 'Dockey', 'Dockey'); // Link the New Pipeline (eg here is to link with Main Pipeline)
03. Click File | Save As... to save the file (eg Sales Invoice 7 (GST 2)-New)
04. Exit File | Exit to exit the report design
05. Click Design again in the report designer
FR-GetAvailDB-02.jpg

See also