Hi, i am developing software in asp.net using vb coding and MS ACCESS database.
I created a crystal report for printing sales bill.
Now i need to convert currency into words and need to print. ex: 3,250 as "Three Thousand Two Hundred and Fifty only".
How can i write codings and make to print using crystal report.
Thanks in advance.
13 12530
Hi, i am developing software in asp.net using vb coding and MS ACCESS database.
I created a crystal report for printing sales bill.
Now i need to convert currency into words and need to print. ex: 3,250 as "Three Thousand Two Hundred and Fifty only".
How can i write codings and make to print using crystal report.
Thanks in advance.
crystal report has nothing to do your conversion..... you have to convert Currency in Words through code in your application.... Then pass the string(e.g--"Three Thousand Two Hundred and Fifty only".) to crystal report as a parameter....
to convert your currency to word search google...many vb.net classes are available on NET for this conversion.....
Hi Perumal,
I used a formula field for this conversion. type the following code in it and try.
All the best. -
if Split (cstr(Sum ({ExportView.Amount})),".")[2]="00" then
-
-
{ExportView.CurrencyName} + " " + ToWords (Sum ({ExportView.Amount}),0) + " Only "
-
-
else
-
{ExportView.CurrencyName} + " " + ToWords (Sum ({ExportView.Amount}),0) + " and "
-
+ ToWords ((Round(Sum ({ExportView.Amount}),2)
-
- Int(Sum ({ExportView.Amount}))) * 100, 0) + " " + {ExportView.DecimalPart} + " only "
sudha
Hi Perumal,
i used a decimal number rounded to two decimal places and so used the above code which is perplexing. if you dont want to check the paise part ur code is like this. - "Rupees " + ToWords (Sum ({ExportView.Amount}),0) + " Only "
or else you find in the below url
"http://www.eggheadcafe .com/community/aspnet/14/10016490/convert-number-to-words.aspx"
with regards,
sudha
Hi Sudha,
Thanks for your reply.
I implemented your coding in my crystal report. but i am getting error in part + " " + before ToWords
And also i am not aware of Exportiew.Amoun t and ExportView.Curr ency.
could you please tell me the details of those fields.
Thanks.
Its working fine.
TRY THIS CODE -
if split(cstr({tablename.fieldname)),".")[2]="00" then
-
replace(ToWords({tablename.fieldname},0)+ " only","-"," ")
-
else
-
replace(ToWords(cdbl((tablename.fieldname})-cdbl(split(cstr({tablename.fieldname}),"."[2]/100),0) + " and " + ToWords(cdblsplit(cstr({tablename.fieldname}),"."[2]),0) + " paise only","-"," ")
Hi
I tried ur code and got error message as "The ) is missing". So, can u please tell me wat could be wrong.
Regards,
Pavithra.C
Hi pavithra,
Now try the following code -
if split(cstr({tablename.fieldname}),".")[2]="00" then
-
replace(ToWords({tablename.fieldname},0)+ " only","-"," ")
-
else
-
replace(ToWords(cdbl({tablename.fieldname})-cdbl(split(cstr({tablename.fieldname}),"."[2]/100),0)) + " and " + ToWords(cdblsplit(cstr({tablename.fieldname}),"."[2]),0) + " paise only","-"," ")
- if split(cstr({tablename.fieldname}),".")[2]="00" then
-
replace(ToWords({tablename.fieldname},0)+ " only","-"," ")
-
else
-
replace(ToWords(cdbl({tablename.fieldname})-cdbl(split(cstr({tablename.fieldname}),"."[2]/100),0)) + " and " + ToWords(cdblsplit(cstr({tablename.fieldname}),"."[2]),0) + " paise only","-"," ")
I have try your code but still there is error showing ) is missing out please sort out it's urgent
Hi
You try this code now -
if split(cstr({tablename.fieldname}),".")[2]="00" then replace(ToWords({tablename.fieldname},0)+" only","-"," ")
-
else
-
replace(Towords((cdbl({tablename.fieldname})-cdbl(split(cstr({tablename.fieldname}),".")[2])/100),0)+" and " +ToWords(cdbl(split(cstr({tablename.fieldname}),".")[2]),0)+" paise only","-"," ")
Hope it will work.
If not you just mail me to perumalvps@gmai l.com Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Ave |
last post by:
Hi
I am hoping someone can help me or even point me in the
right direction, this problem has been doing my head in,
I have a report which has 3 groups say currency, payment
method and bankable, i have totals in the footers of these
groups, when any of the fields specifed on the groups
change the footer is displayed which is how crystal does
it, but what i want is if any of the fields used for the
groups change i only want one group...
|
by: oscar |
last post by:
is there a way of integrating mysql databases into the .net crystal reports?
in the report wizard i have options for sql databases, but nothing for
mysql. is there a plugin i'm missing for it?
i've tried creating a dataset and filling it with the data from a mysql
query, but it still does not show up in the wizard. i have also tried to
create fields and import data to them, but there seems to be no way of
accessing the crystal report...
|
by: John H. |
last post by:
Hi,
Why if set a DataTable in Crystal Report Net Table with method
SetDataSource, 'ReportDocument.SetDataSource(oDataTable)', lost the Number
and Currency format with the decimal digits and Currency symbol?
|
by: Zoury |
last post by:
Hi there ! :O)
I'm having a two strange behaviors with Crystal Report which seems to have
the same cause..
All the fields used in the reports comes from some SQL Server views.
*** 1st Problem :
|
by: blackdevil1979 |
last post by:
Hello,
Is there a way to format the data when it is passed into the Crystal
Report(CR).. for example.. In the original table, a number may be
left aligned, how to change it to right alignment?.. in other words I
want to change it's Format: Horizontal Alignment
from Left To Right if the
data passed in is an Integer, Currency, or
DateTime.
| |
by: Agnes |
last post by:
I got this error when I preview report in Vb.net "Unknown query Engine
Error"
Is that my crystal report got something wrong ???
or my SQL server is too slow to response ??
Thanks a lot
From agnes
|
by: jmar |
last post by:
I posted a week ago and received one response. I'm looking for the
opinion of several experienced .NET people before I proceed so I'm
posting again. Sorry for the repost...
I am updating a VB4.0 quote generation program to VB.net. The old
program takes user inputs, performs calculations, saves the data to
Access databases and uses Crystal Reports 5.0 to generate a quote. A
while back users obviously wanted to be able to edit/e-mail ...
|
by: LataChavan |
last post by:
I have tried to look for a solution to the problem of sending parameters to stored procedures through crystal report.
Following is the code:
Now what happens is that if i do not apply the logon information the crystal reports works fine by accepting the parameter values and giving the Database Logon prompt when we run the report.
But I would like to give the logon information at runtime. If I give the info at runtime the "stored procedure"...
|
by: amiga500 |
last post by:
Hello,
I am developing a crystal report called Expense Report (I am not an
expert Crystal Report designer) if someone could help me in this
problem I would be greatly appreciate it. The report would be as
follows:
Description Sun Mon
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |