Question
“Is it possible to print pre-formatted checks using ReportBuilder?”
Solution
The following example uses a free Delphi library NumWords to convert numerical values into English text. This allows you to convert a dollar amount to a text string for check writing purposes. The full version of this library including other language translations is available from http://www.torry.net.
Next is a matter of designing your report to match the formatted check form you are using.
Download: CheckWriting.zip
Sample Delphi code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
procedure TForm1.ppVariable3Calc(Sender: TObject; var Value: Variant); var ldTotal: Double; begin ldTotal := ppSubReport1.Report.DataPipeline['OnOrder'] * ppSubReport1.Report.DataPipeline['Cost']; Value := ldTotal; ppVariable2.Value := ppVariable2.Value + ldTotal; ppVariable1.Value := ppVariable1.Value + ldTotal; {NumWords Library: By Andy Preston altered for the use in this demo. The full version of this library is available from Torry's Delphi, http://www.torry.net} //InWords.SelectLocale(CTRY_UNITED_STATES, LANG_ENGLISH); ppVariable4.Value := InWords.EMoney(ppVariable2.Value, False); end; |