Generate QR Code® barcodes in an SSRS report with the QRCoder library

  • Comments posted to this topic are about the item Generate QR Code® barcodes in an SSRS report with the QRCoder library

  • Thanks for posting this!

    My favorite resource for QR Codes is: 

    https://www.nayuki.io/page/qr-code-generator-library

  • Great article about inserting QR Codes in SSRS reports. One problem with that approach is the need to install the dll into the system GAC. You can avoid that by registering the dll in the Visual Studio RSPreviewPolicy.config file with an entry similar to this one:

    <CodeGroup class="UnionCodeGroup" version="1" PermissionSetName="FullTrust" Name="MyQRCode" Description="This code group grants FullTrust to MyQRCode assembly.">  <IMembershipCondition class="StrongNameMembershipCondition" version="1" PublicKeyBlob="000000............0000000" /></CodeGroup>

    The PublicKeyBlob for your dll assembly can be obtained in this way 

    Then that same entry must be added to the SSRS rssrvpolicy.config file
    These settings should rid off the need of registering the dll into the GAC.
    For more advanced barcode options as well as another 2D types like DataMatrix, DotCode, PDF417, etc and for a visual barcode CRI you might try other alternatives like BP for SSRS

    HTH

    Tools for SSRS, ASP.NET & PHP
    Barcode CRI for SSRS[/url]

  • Robert Sterbal-482516 - Monday, October 22, 2018 4:51 AM

    Thanks for posting this!

    My favorite resource for QR Codes is: 

    https://www.nayuki.io/page/qr-code-generator-library

    Unfortunately it doesn't appear that they have a C# version.

  • hi
    Thanks for posting this,
    But Be careful friends dlls in "StronglyNamedPartiallyTrustedCallersDLLs" Folder deploy on ssrs>2014
    "Error while loading code module: ‘QRCoderImageToByteArray, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3016ec4525f0585e’. Details: Could not load file or assembly 'QRCoderImageToByteArray, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3016ec4525f0585e' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded
    "
    in ssrs<=2014 .NET Framework <=3.5 is supported for Reporting Services assemblies

  • smohammadmir - Friday, February 8, 2019 4:01 PM

    hi
    Thanks for posting this,
    But Be careful friends dlls in "StronglyNamedPartiallyTrustedCallersDLLs" Folder deploy on ssrs>2014
    "Error while loading code module: ‘QRCoderImageToByteArray, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3016ec4525f0585e’. Details: Could not load file or assembly 'QRCoderImageToByteArray, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3016ec4525f0585e' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded
    "
    in ssrs<=2014 .NET Framework <=3.5 is supported for Reporting Services assemblies

    That means that you will have to compile the source code yourself. I supplied the source code I used to compile it in the attached resource file.

  • I'm sure I'm doing something wrong, but I cannot get the QRCoderImageToByteArray.dll file.

    I am unable to find the QRCoderResources.zip file, (along with the StronglyNamedPartiallyTrustedCallersDLLs folder). I've tried using the Compile.bat batch file, which did create the QRCoder.dll file, but not QRCoderImageToByteArray.dll.

    Any ideas on how I can resolve this?

  • Any luck srechner ? i am in the same boat. i couldnt find QRCoderResources.zip

     

  • Not with this solution. I ended up generating QR codes via https://api.qrserver.com.

  • SQL Server Central hasn't restored the resource files after the conversion yet.

    I scoured my hard drive and found copies of QRCoder.dll and QRCoderImageToByteArray.dll that I think are the ones I included with the article. I uploaded them to my google drive. Here is the link:

    https://drive.google.com/drive/folders/1T8hJVFhuY61bZbokC7l4SwHx3cJCoL6s?usp=sharing

  • Stan Kulp-439977, Thank you very much for your help. i will give it a try

  • Looks like they just restored the resource file to the article.

    https://www.sqlservercentral.com/wp-content/uploads/2019/04/QRCoderResources.zip

  • Brilliant . Thanks for letting us know

  • We are getting the same error...

    Error while loading code module: ‘QRCoderImageToByteArray, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3016ec4525f0585e’. Details: Could not load file or assembly 'QRCoderImageToByteArray, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3016ec4525f0585e' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.

    How do we correctly compile the source code?

    Thanks for your help!

    • This reply was modified 4 years, 10 months ago by  ArturoBandini.
  • This was removed by the editor as SPAM

Viewing 15 posts - 1 through 15 (of 17 total)

You must be logged in to reply to this topic. Login to reply