COGNOiSe.com - The IBM Cognos Community

IBM Cognos Analytics Platform => Cognos Analytics => Reporting => Topic started by: kevind0718 on 31 Mar 2022 02:13:44 PM

Title: hex value - integer convert to hex
Post by: kevind0718 on 31 Mar 2022 02:13:44 PM
Hello:

I have a simple requirement.  I want to create a key that will be used after my data has been exported from Cognos.
But I do not want to use easily recognizable data.  I want to camouflage the data. 
So I have account numbers that are integers my thought is to multiple by a constant say 7, convert to hex ,
then use a string of the hex as my key. 

My Cogon sits on top of SQL server.

If I run   select convert (varbinary(8), 52506790789  ) on SQL server I get 0x0B000001850BA639.

If a create a data item defined as follows:  CONVERT(VARBINARY(8), [MyId]  )  the attribute does not return data  no error & no data
I have tried format(  [my Key] ,  'X')   , no luck   the rest of the report works just this attrib never returns data.

Thanks for your attention to this issue.


Best Regards

KD
Title: Re: hex value - integer convert to hex
Post by: kevind0718 on 17 May 2022 07:15:28 PM
anybody have a clue on this?


KD
Title: Re: hex value - integer convert to hex
Post by: dougp on 18 May 2022 05:04:59 PM
Unless your data really does wear shades, you may want to edit the question to put the code in code blocks.