[Solved] Convert Numbers to Text

Getting your data onto paper - or the web - Discussing the reports features of Base
Post Reply
amitmahajan74
Posts: 44
Joined: Mon Aug 27, 2012 12:23 pm

[Solved] Convert Numbers to Text

Post 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
Last edited by Hagar Delest on Fri May 13, 2016 10:04 pm, edited 1 time in total.
Reason: tagged [Solved].
Open Office 4.1.2
Win 10 Proff
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Convert Numbers to Text

Post by Villeroy »

Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
amitmahajan74
Posts: 44
Joined: Mon Aug 27, 2012 12:23 pm

Re: Convert Numbers to Text

Post 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
Open Office 4.1.2
Win 10 Proff
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Convert Numbers to Text

Post 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.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
amitmahajan74
Posts: 44
Joined: Mon Aug 27, 2012 12:23 pm

Re: Convert Numbers to Text

Post by amitmahajan74 »

How do I attach the db here, you can look at it and advise
Open Office 4.1.2
Win 10 Proff
User avatar
RoryOF
Moderator
Posts: 34586
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Convert Numbers to Text

Post by RoryOF »

The Upload file tab is below the Submit button on FullEditor or PostReply screens.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
amitmahajan74
Posts: 44
Joined: Mon Aug 27, 2012 12:23 pm

Re: Convert Numbers to Text

Post by amitmahajan74 »

it only allows file upto 128 kb, the db is 216 kb
Open Office 4.1.2
Win 10 Proff
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Convert Numbers to Text

Post by Villeroy »

menu:Tools>SQL...
SHUTDOWN COMPACT
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
amitmahajan74
Posts: 44
Joined: Mon Aug 27, 2012 12:23 pm

Re: Convert Numbers to Text

Post by amitmahajan74 »

Thanks Villeroy.

Have attached the db after compacting and zipped the db.
Attachments
Bank Statement.zip
(77.09 KiB) Downloaded 320 times
Open Office 4.1.2
Win 10 Proff
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Convert Numbers to Text

Post by Villeroy »

Have attached the db after compacting and zipped the db.
Office documents are compressed already. They are zip archives.
Attachments
ChequePrinter.ods
(22.97 KiB) Downloaded 400 times
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
amitmahajan74
Posts: 44
Joined: Mon Aug 27, 2012 12:23 pm

Re: Convert Numbers to Text

Post 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
Open Office 4.1.2
Win 10 Proff
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Convert Numbers to Text

Post 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

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.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Convert Numbers to Text

Post by Villeroy »

Bank Statement.odb
Modified database with filter table and query "ChqPrint_Filter"
(102.75 KiB) Downloaded 344 times
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
amitmahajan74
Posts: 44
Joined: Mon Aug 27, 2012 12:23 pm

Re: Convert Numbers to Text

Post by amitmahajan74 »

Thanks, it's working, will setup the page as per the Bank Cheque.

Thanks
Open Office 4.1.2
Win 10 Proff
Post Reply