R – Number to words in Rave Report

delphinumbersrave-reports

I have managed to design a report the way I want, but I am not able to get Rave Report to print/convert Grand total to Words.

For example, if the grand total is 1,200.00 it should only print One Thousand and Two Hundred.

Is something like this possible in Rave Report?

Best Answer

I do not think Rave Reports has any inbuilt function which converts numbers to works. However, I have found a article, which explains How to Convert Numbers (Currency) to Words, on About.com.

Have a look at the ConvertToWords function in the NumberToWords unit.

You could convert the number and pass the words to the report at runtime.

Edit:

You can pass parameters to your reports like this.

  RvProject.Open;
  RvProject.SelectReport('ParametrizedReport',False);
  RvProject.SetParam('Name','Leonel');
  RvProject.Execute;
  RvProject.Close;

Have a look at the Introduction to Rave Reports article.