2017-04-14 4 views

답변

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; 
    
관련 문제