Options

Store a report image in a BLOB field

rsaritzkyrsaritzky Member Posts: 469
Hi all,

When we ship orders, we generate some paperwork for export and some other documents. These documents are generated through standard NAV reports.

I'd like to store these reports in some BLOB fields for archival purposes (rather than regenerating the reports at a later time).

I've read a number of posts on storing files in BLOBS, but I'm looking for any shortcuts, considering most of them include the step of transferring the files to the server and converting to Base64 first. Since I am thinking about generating the report as a PDF using the REPORT.SAVEASPDF command, the file will already be on the server, i.e.

REPORT.SAVEASPDF(ReportIDToRun,ServerAttachmentFilePath,CustRec);

So "ServerAttachmentFilePath" is the full path and filename of my temp PDF file. What are the statements needed to load this file it into a BLOB field in one of my tables?

Thanks

Ron




Ron

Best Answer

Answers

  • Options
    sashokcbesashokcbe Member Posts: 8
    Could you schedule a report, and this gets stored on Report Inbox table (477). This can be viewed from the role center page. This report attachment stores as blob field, and has the code to read as well.

    Ashok
    ArcherPoint Inc.,
  • Options
    rsaritzkyrsaritzky Member Posts: 469
    Hi Kishorm - this is for NAV2016, so the ThreeTierMgt codeunit (CU419) does not exist. However, with this as a hint, I found a similar function in the new version of CU419 "File Management" - there is a corresponding function "BlobImport", which I will test. Thanks for the hint!

    Ron
    Ron
Sign In or Register to comment.