web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

How to add QR code to Table field?

(0) ShareShare
ReportReport
Posted on by 972

Hi 

          I followed the link https://dynamicsuser.net/nav/b/ara3n/posts/creating-qr-code-in-nav-2016 to generate a QR Code. 

          If I do not save QR code to local, is it possible I add QR code to table's field?

Best Regards,

JustZM

5086.png

2626.png

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    I Gusti Made Ari Profile Picture
    3,608 on at

    You can use Outstream to save the image to BLOB field.

    FixedQRLine.QRCode.CREATEOUTSTREAM(PictureStream);

    bitmap.Save(PictureStream,ImageFormat.Jpeg);

    FixedQRLine.MODIFY;

  • JustZM Profile Picture
    972 on at

    Hi I Gusti Made Ari Permadi

             Thanks for your reply. I followed your way, to add PictureStream as Outstream.

             But I got one error when save the QRCode. Do you know how I can fix it?

    Best Regards,

    JustZM

    0160.png

  • Suggested answer
    Suresh Kulla Profile Picture
    50,278 Super User 2026 Season 1 on at

    Try this

    DummyTempBlob@1012 : Record 99008535;

     InStr@1010 : InStream;

    DummyTempBlob.INIT;
    DummyTempBlob.Blob.CREATEINSTREAM(InStr);
    Bitmap.Save(InStr,ImageFormat.Jpeg);

    FixedQRLine.QRCode.IMPORTSTREAM(InStr,'');
    Bitmap.Dispose;

  • I Gusti Made Ari Profile Picture
    3,608 on at

    Check your .net variable properties, set RunOnClient property to Yes

  • JustZM Profile Picture
    972 on at

    Hi I Gusti Made Ari Permadi

             I checked all net variable, they are all yes. But I found the error is Dynamics.NAV.Ncl. This one is not any variable in my code.

    Hi Suresh Kulla

             I followed your way, but I got an error about "IMPORTSTREAM"

             It is a variable or function? If it is a variable, how I should define it?

             However, even after delete code about "IMPORTSTREAM", I have same error when it is saving bitmap.

    Best Regards,

    JustZM

    3678.png

    1586.png

  • Suggested answer
    Suresh Kulla Profile Picture
    50,278 Super User 2026 Season 1 on at

    What is your NAV Version? You need to define QRCode as MediaSet.  If  not you can try this with blob field.

    I don't think you have added the code as I have described, create instream for a tempblob not on your field, create outstream for QRCode field and use COPYSTREAM function to copy instream to outstream.

  • JustZM Profile Picture
    972 on at

    Hi Suresh

             My version is NAV2015.

             How can i define QRCode as MediaSet. Yes, now, it is a blob field.

             However, I guess right now, the main problem is still in bitmap.save(). I cannot save QR image to the InStream and OutStream because when I debug it, the code stop at bitmap.save()

    But all DotNets' RunOnClient are yes.

    Best Regards,

    JustZM

    0842.png

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

#1
TAHER_El_Mehdi Profile Picture

TAHER_El_Mehdi 2

#1
sliderxb Profile Picture

sliderxb 2

#1
broberts Profile Picture

broberts 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans