2017-04-14 276 views
0

Crystal ReportsにVB.NETからQRコードを生成する方法はありますか?VB.NETを使用してCrystal ReportでQRコードを生成

私はこのチュートリアルを試してみました: http://www.keepautomation.com/vbnet_barcode/qrcode.html

が、常にエラーが発生します:「必要な特権がクライアントによって保有されていません」

VB.NETからCystal ReportsにQRコードを生成するプラグインがありますか?

答えて

1

クリスタルレポートやVBでQRコードを生成するネイティブな方法が見つかりませんでしたが、QRコードを生成するGoogle APIに画像をリンクする方法を見つけました。

使用するに

  1. レポートにグラフィックを挿入します。
  2. イメージを右クリックし、[グラフィックの書式設定]をクリックします。
  3. [画像タブ]をクリックします。
  4. グラフィックロケーションの隣にある数式編集ボタンをクリックします。
  5. このコードを追加するか、このコードを含む数式を参照してください。
  6. 必要に応じて変数を編集します。

    //-------------------------- 
    // 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; 
    
関連する問題