Search code examples
blobrdlcdynamics-nav

Display BLOB Field (Containing Text) in RDLC Report Dynamics NAV


I have the field Note from table Record Link that i want to display in an rdlc report. How can i include it in the dataset to loop into the BLOB field to extract the text value ? Using NAV90

Thanks


Solution

  • Notes are stored as Binary Text. You need to use .NET to read out the value into a string.

    From the .NET side of things you'll need:

    • BinaryReader from 'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.System.IO.BinaryReader
    • Encoding from 'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.System.Text.Encoding

    As for reading the actual BLOB into a string:

    RecordLink.Note.CREATEINSTREAM(InStream);
    BinaryReader := BinaryReader.BinaryReader(InStream,Encoding.UTF8,FALSE);
    MESSAGE('Your note text is %1',BinaryReader.ReadString);