Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Hex issues [Resolved] Post Reply Post New Topic
Author Message
Crysjen
Newbie
Newbie


Joined: 31 Mar 2010
Online Status: Offline
Posts: 4
Quote Crysjen Replybullet Topic: Hex issues [Resolved]
     Posted: 31 Mar 2010 at 11:56pm
Hi,
 
We are using Crystal reports 11 and linking it direct to a system database with iSeries ODBC.
 
I really need to convert Hex in to text but can't seem to find a fornula anywhere. I've put 2 examples below
 
E2C4D6D3D7C8C9D54040 - Should display as SDOLPHIN
D6C5F1F0F0C340404040 - Should display as OE100C
 
Any help will be greatly appreciated!!!!!!!!!!!!
 
Thanks


Edited by Crysjen - 06 Apr 2010 at 3:51am
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 01 Apr 2010 at 3:36am
OK, here is the quick answer.  Your code is not hex, it is an older mainframe code called EBCDIC, but the conversion is the same.
 
Each character in the output is 2 characters in the string, so the first letter in the top string is E2.  E=14, but since it is the first number, it is multiplied by 16, then add the 2 to get 226. 
has a translation table.
 
Hopefully you can find a simple code/algorithm to convert from EBCDIC to ASCII with this hint.
 
HTH
IP IP Logged
Crysjen
Newbie
Newbie


Joined: 31 Mar 2010
Online Status: Offline
Posts: 4
Quote Crysjen Replybullet Posted: 06 Apr 2010 at 3:51am
Thanks for you help.
 
Turns out there was a setting I could change in the ODBC connection which would put this right. (wouldn't have found it without your help though)
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum