Skip to Content
avatar image
Former Member

Dez to Hex - from Database to Report

Hello everyone,

i have to do some report regarding our call manager but there is a problem getting the values from the database.

Its this format:

Database Call Datebase Data BI Report

9,48598145191013E16 94859814519101343 94859814519101300

9,48598145191013E16 94859814519101253 94859814519101300

I want to get the Database value into my report but when i do this the field shows me the value from column BI Report. But the correct one would be the value in the middle column. As i could see for example MS Excel also did some rounding at the end.

Then i tried the following formula

Local numberVar dez := database field;Local numberVar quot:= 0;Local numberVar rest:= 0;Local stringVar hex := "";

while (dez > 0)do (quot :=dez \ 16;rest := dez mod 16;dez := quot;hex := (iif(rest > 9, ChrW(55+rest), ToText(rest,"#"))) + hex;);hex;

If i try this i get the message that it is too much and cannot be done. I tried to cut the database value with the last 2 digets and then it works all fine. But as i need the full one i wanted to ask the community if someone knows this problem or has an idea for it.

Thank you

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Apr 13, 2016 at 05:16 AM


    Could you please share what you expect in the report and what you are getting from database?

    From you post what I understood is that you are getting 9,48598145191013E16 from database and you expect it to display like 9485981451910130000000000000000

    Is that correct?



    Add comment
    10|10000 characters needed characters exceeded

    • Hi Tobias,

      What database are you reporting against?

      Most databases can store large numbers without converting them to an exp form.

      You'd first need to try and fix the number on the database side. Once that is setup, you can use a SQL expression (if youre reporting directly against tables) to convert this number to String.

      Converting it to string is the only workaround.