简体   繁体   中英

Generate QR Code in Crystal Report using VB.NET

is there any way to generate QR Code from VB.NET into Crystal Reports ?

I have tried this tutorial : http://www.keepautomation.com/vbnet_barcode/qrcode.html

but always get error : "A required privilege is not held by the client."

Is there another plugin or whatever it is to generate QR Code from VB.NET into Cystal Reports ?

I wasn't able to find a native way to generate QR codes in crystal reports or VB, but I did find a way to link an image to a google API that generates QR Codes.

To use:

  1. Insert a graphic to the report.
  2. Right click on the image and click "Format graphic".
  3. Click on the "Picture Tab".
  4. Click on the formula edit button next to graphic location.
  5. Add this code or reference a formula with this code in it.
  6. Edit the variables as needed.

     //-------------------------- // QR Code Gererator // // Uses Google's Chart API. // // To Use: // Insert a graphic to the // report. Right click // on it and click "Format // graphic". Click on the // "Picture Tab". Click // on the formula edit // button next to graphic // location. Add this code // or reference a formula // with this code in it. // // You can update the width // height and encoding below. // // For more info see // https://developers.google.com/chart/infographics/docs/qr_codes?csw=1 // // Feel free to redistribute. // // @Author Daniel Havens // @Created 2018-02-01 stringVar QRFormat; stringVar QRwidth; stringVar QRheight; stringVar QRText; stringVar QRURI; // Encoding format see google's api QRFormat := 'UTF-8'; // Width in Pixels QRwidth := '325'; // Height in Pixels QRheight := '325'; // Text for the QR Code. // // QRText := 'http://stackoverflow.com/'; // To Do: // StringReplace for URI // Combine the result // // Base URI must be http:// // or Crystal cannot fetch // the image QRURI := 'http://chart.googleapis.com/chart?cht=qr&choe='+QRFormat+'&chs='+QRWidth+'x'+QRHeight+'&chl='+QRText; QRURI; 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM