Fast Report - Get Data from Available Pipeline

From eStream Software
Revision as of 03:38, 18 November 2015 by Twfaung (talk | contribs) (→‎Steps)

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. Click File | Exit to exit the report design
05. Click Design again in the report designer for the file just save on Steps 3 (eg Sales Invoice 7 (GST 2)-New)
FR-GetAvailDB-02.jpg
06. Click Subreport Icon
07. Click the place to print
FR-GetAvailDB-03.jpg
08. Click Insert Band icon
09. Select Master Data
FR-GetAvailDB-04.jpg
10. In the Dataset select the New Pipeline created at Step 2 (eg GSTAmt) & Click Ok
11. Repeat Steps 8 to add the Header & Footer
FR-GetAvailDB-05.jpg
12. Click on Red A icon & click the place to print
13. Select the option for following setting
  • Dataset : GSTAmt
  • DataField : LocalAmount
14. Repeat Step 13 for other but DataField change to LocalTaxAmt
15.

See also