Introduction
From Version 849.768 & above user can Share the report to WhatsApp, Skype, Line & etc
Requirement
- Fast Report
- WhatsApp, Skype, Line & etc Login
- SQL Accounting Version 849.768 & above
Setting
Below is example using Sales Invoice
- 01. Click the Code Tab
- 02. Scroll down look for procedure SetUp
- 03. Copy below script & paste it between the begin & end; in procedure SetUp
SQL := 'SELECT B.Description As ReportName, B.Description3 As Body '+
'FROM SL_QT A ' +
'INNER JOIN SL_QTDTL B ON (A.Dockey=B.Dockey) ' +
'WHERE A.DocNo=''WHATSAPP'' ' +
'ORDER BY B.SEQ';
AddDataSet('plShareMsg', ['ReportName', 'Body'])
.GetDBData(SQL);
- 04. Click File | Save As... to save the file (eg Sales Invoice 8 (SST 2)-WhatApp)
- 05. Click File | Exit to exit the report design
- 06. Click Design again in the report designer for the file just save on Steps 5 (eg Sales Invoice 8 (SST 2)-WhatApp)
- 07. Click the Code Tab
- 08. Scroll down look for procedure function StrToFloatDef(const lFld:Variant):string
- 09. Copy below script & paste it above the function
WhatsApp Script (Last Script Update : 05 Nov 2018) |
---|
procedure GetShareMsg;
var D : TfrxDataSet;
lFN : String;
begin
lFN := Trim(Report.ReportOptions.Name);
lFN := StringReplace(lFN,'.fr3','');
D := Report.GetDataSet('plShareMsg');
D.First;
While not D.Eof do begin
if Trim(D.Value('ReportName')) = lFN then
Break;
D.Next;
end;
end;
function GetShareText: string;
begin
GetShareMsg;
Result := GetFldInfo(RichTextToPlainText(<plShareMsg."Body">))
end;
|