Convert byte[] to string

Stimulsoft Reports.NET discussion
Post Reply
luczan
Posts: 32
Joined: Wed Jan 19, 2011 3:50 am
Location: Slovakia

Convert byte[] to string

Post by luczan »

Hi,
I have a column with data type byte[].
I need to display value of this column like a string. Is it possible to do it?

Thank you
M.

Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Convert byte[] to string

Post by Alex K. »

Hello,

You can use the following code:

Code: Select all

System.Text.Encoding.UTF8.GetString(Field);
Thank you.
luczan
Posts: 32
Joined: Wed Jan 19, 2011 3:50 am
Location: Slovakia

Convert byte[] to string

Post by luczan »

Thank you,
but i need to use this conversion in Designer, no in my code. Can I add my own function to Designer?
Andrew
Posts: 4109
Joined: Fri Jun 09, 2006 3:58 am

Convert byte[] to string

Post by Andrew »

Hello,

You can use this code in the designer either as an expression of the Text component or in its function.

Thank you.
Post Reply