Printing systemparts (Notes) in a report? RTC

dlerouxdleroux Member Posts: 87
edited 2010-07-26 in NAV Three Tier
I have sales orders with notes (the systempart) and would like to print those notes on the sales order document. I have found the record link table, but that will only give me a URL that opens the Sales Order Page. Can anyone tell me where I find the actual text entered in the note - or how to get it into the printed document?

Alternatively, is this just something that these notes were never intended for - even though it seems they mimic the function of the classic comments table?

Thanks

Comments

  • kinekine Member Posts: 12,562
    Have you looked into the blob field which is in the table? ;-)
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • dlerouxdleroux Member Posts: 87
    That did the trick.

    Thanks, I've not done much with blobs so it did not occur to me to look in there.
  • hiddentexthiddentext Member Posts: 45
    Hi guys,

    How do you print the Note field in Record Link, which is a blob on a RTC? Do you have to convert it to text?

    Thanks
  • dlerouxdleroux Member Posts: 87
    Well this is what I used when i was playig with it, but the client turned out not to need it after all - they wanted the comments not the notes...
    RecIDString := 'Sales Header: ' + FORMAT("Document Type") +',' +FORMAT("No.");
    EVALUATE(RecID, RecIDString);
    RecLink.SETFILTER("Record ID", RecIDString);
    RecLink.SETFILTER(Company, Company.Name);
    RecLink.SETRANGE(Type, RecLink.Type::Note);
    IF RecLink.FIND('+') THEN
       Notefield := '';
    
    RecLink.CALCFIELDS(Note);
    RecLink.Note.CREATEINSTREAM(ReadBlob);  // ReadBlob is an Instream variable and remember a blob can overflow a text variable
    ReadBlob.READTEXT(TempNote);
    Notefield := COPYSTR(TempNote, 2);
    

    Hope you find that helpful - it is probably pretty messy but I was only making sure I could extract the information.
Sign In or Register to comment.