Print Page | Close Window

Convert number to ascii text

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=23012
Printed Date: 01 May 2024 at 6:34am


Topic: Convert number to ascii text
Posted By: jlindquist23
Subject: Convert number to ascii text
Date Posted: 10 Aug 2022 at 3:22am
How can I convert to ascii text?
This is what I tried, but the command of BinaryCharConversion is not accurate.

BinaryCharConversion(totext({JT_WorkTicketWrk.ParentQtyOrdered},0,""),'binary')

Any idea how to convert the ParentQtyOrdered field to ascii?

Thanks@

-------------
Thanks,
Jennifer



Replies:
Posted By: kevlray
Date Posted: 10 Aug 2022 at 4:01am
Ascii text?  I have never heard of that term.  Thus I am not sure what you are trying to achieve.  Converting individual characters to the ascii value can be done.  Crystal Reports has a function called AscW which will return the unicode of character.


Posted By: hilfy
Date Posted: 23 Aug 2022 at 7:28am
If you want to display the ParentQtyOrdered number as a string, you would use the ToText() formula like this:

ToText({ParentQtyOrdered}, 0)

If you want to display the number as words, you would use a formula like this:

ToWords({ParentQtyOrdered})

If you want the ASCII value of the number (which doesn't make sense here...) you would write the formula like this:

Chr({ParentQtyOrdered})

-Dell

-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics


Posted By: jlindquist23
Date Posted: 23 Aug 2022 at 9:06am
I got it to work! Thanks friends!


-------------
Thanks,
Jennifer



Print Page | Close Window