Page 1 of 1

[Solved] Convert Numbers to Text

PostPosted: Fri May 06, 2016 10:36 am
by amitmahajan74
Hi,

I have created a database for making Bank Statements. I am trying to make a report for cheque printing with that too. I have created the report all fields have been placed in the desired places. I am facing the issue of converting the cheque amount to Words to be printed on the cheque.

I have the Add-On Number Text installed and is being used in calc, but how to use it in Base Report.

Thanks,

Amit

Re: Convert Numbers to Text

PostPosted: Sat May 07, 2016 11:28 am
by Villeroy

Re: Convert Numbers to Text

PostPosted: Mon May 09, 2016 6:59 am
by amitmahajan74
Thanks Villeroy,

I have checked out the link provided by you. I can use the data in Calc and convert the number into words, but I need to convert it in words in report generated by Base. In reports I've created the output print as required on the cheque for 2 banks. Now I need to print the amount in words too, below the Name Field.

Amit

Re: Convert Numbers to Text

PostPosted: Mon May 09, 2016 9:26 am
by Villeroy
And my answer was that you could use a Calc report instead of an embedded Writer report. I don't know any practicable solution other than that.

Re: Convert Numbers to Text

PostPosted: Mon May 09, 2016 9:47 am
by amitmahajan74
How do I attach the db here, you can look at it and advise

Re: Convert Numbers to Text

PostPosted: Mon May 09, 2016 9:50 am
by RoryOF
The Upload file tab is below the Submit button on FullEditor or PostReply screens.

Re: Convert Numbers to Text

PostPosted: Mon May 09, 2016 10:05 am
by amitmahajan74
it only allows file upto 128 kb, the db is 216 kb

Re: Convert Numbers to Text

PostPosted: Mon May 09, 2016 10:33 am
by Villeroy
menu:Tools>SQL...
SHUTDOWN COMPACT

Re: Convert Numbers to Text

PostPosted: Mon May 09, 2016 10:50 am
by amitmahajan74
Thanks Villeroy.

Have attached the db after compacting and zipped the db.

Re: Convert Numbers to Text

PostPosted: Mon May 09, 2016 1:55 pm
by Villeroy
Have attached the db after compacting and zipped the db.

Office documents are compressed already. They are zip archives.

Re: Convert Numbers to Text

PostPosted: Wed May 11, 2016 10:54 am
by amitmahajan74
Hi Villeroy,
Downloaded the file provided by you. I placed it the same folder as odb. On opening the ChequePrinter.ods, I'm getting the following error
"The data content could not be loaded.
Table not found in statement [SELECT * FROM "Filter" WHERE "FID" = 0]"

Do I need to create something in odb. I am not familiar with macros and programming.

Please advise.
Amit

Re: Convert Numbers to Text

PostPosted: Wed May 11, 2016 8:38 pm
by Villeroy
amitmahajan74 wrote:Do I need to create something in odb. I am not familiar with macros and programming.

Why do you have a macro in your document then? A basic knowledge of SQL is the bare minimum if you want to do anything with databases.
In the spreadsheet I listed all steps for the database and for the spreadsheet. You need a database table named "Filter" with 2 fields and one row.

Tools>SQL...
Code: Select all   Expand viewCollapse view
CREATE TABLE "Filter"(FID INTEGER PRIMARY KEY, INT1 INTEGER);
INSERT INTO "Filter" VALUES(0,Null);

View>Refresh Tables

should create the missing table.

Then reload the spreadsheet, activate the first sheet, pick a cheque number from the list box and push the button.
We can't assign a button to some action (save, reload, navigate,...) plus running a macro at the same time. This is why I put the button on another logical form. It takes the focus, pulling the focus away from the first form which will be saved. Then the macro refreshes "Import1" and shows the print preview of the print area on sheet #2.

Re: Convert Numbers to Text

PostPosted: Thu May 12, 2016 2:05 am
by Villeroy
Bank Statement.odb
Modified database with filter table and query "ChqPrint_Filter"
(102.75 KiB) Downloaded 187 times

Re: Convert Numbers to Text

PostPosted: Thu May 12, 2016 7:10 am
by amitmahajan74
Thanks, it's working, will setup the page as per the Bank Cheque.

Thanks