1.08 How to Get Data Field From Avaiable Pipeline?

Declarations - Variables

SQL_DR, SQL_CR: string;

Event - OnCreate

procedure GlobalOnCreate;

begin

SQL_DR := 'SELECT code,count(DR), Sum(DR) FROM Document ' +

'where DR <> 0 ' +

'and DR is not null ' +

'group by code';

SQL_CR := 'SELECT code, count(CR), Sum(CR) FROM Document ' +

'where CR <> 0 and ' +

'DR is not null ' +

'group by code';

end;

Event Handlers - ReportBeforePrint

procedure ReportBeforePrint;

begin

LocalSQL_SELECT(plSQL_DR, SQL_DR, 'Code');

LocalSQL_SELECT(plSQL_CR, SQL_CR, 'Code');

SetDataPipelineFieldLink(Main, plSQL_DR, 'Code', 'Code');

SetDataPipelineFieldLink(Main, plSQL_CR, 'Code', 'Code');

end;

Example Report can be seen :-

1. AR & AP Statement

2. SL & PH Doc Entry format 1 & 2 (i.e. Sales Invoice 1, Sales Invoice 2...)