SAP Business One SDK Support

Add QR Code in Crystal Report - Method 2 - SAP B1 Patch

There is an Option other than SAP Patch - Method 1(Click Here)

Or the Below SAP 10 PL02 Patch method

QR codes became popular also outside the automotive industry, and used in applications to include product tracking, item identification, time tracking, document management, and general marketing.

You just have to scan it. But, before you scan it, you have to generate it… for that, SAP Business One introduces new functionality allowing you to assign QR Codes to marketing documents. Enter all relevant values in the General Settings > QR Codes tab:

No alt text provided for this image

In the marketing documents, a new field is added in the Accounting tab, where you can either enter text or use formatted search for generating the required value:

No alt text provided for this image

Now, just add the QR code field into your Crystal print layout, and it will appear on the print out. 

 

A tab labeled QR Codes is available on the General Settings window (follow path Administration → SystemInitialization → General Settings → QR Codes tab). You can vary the technical details of QR codes at the point of generation by using the settings on QR Codes. After changes are made in QR Codes of General Settings,the changes are only effective for QR codes after documents are updated.


To determine the size of QR codes, enter numbers between 1 and 40 in the fields
Version - Min. Size and Max. Size. To produce consistently sized QR codes, you can enter the same number in both fields. Placing an upper limit on the size of QR codes restricts the amount of information that can be taken from Create QR Code From to create QR codes.
Enter a number between 1 and 20 in
Scale (pixels per module) to determine how many pixels are in a square of a bitmap in the PNG file.


Select the checkbox QR Code Expiration to automatically remove QR codes from the database in a specified number of days, entered in Expiration Days. Expiration dates are calculated and potentially recalculated from the latest update of a document. Redundant correction bytes are included and vary by the chosen Correction Level of created QR codes.
Choosing a setting of
High means that less information can be included in the QR code but that the QR code can be read and printed more easily with less potential for error. Choosing a setting of Low means that more information can be included in the QR code but that the QR code can be read and printed less easily with more potential for error. Example Queries, Code, and Crystal Reports

To get a QR code in a PNG file format (OQRC.FileContnt) for a quotation with "DocEntry = 1":

Query

select OQUT.DocEntry, OQUT.DocNum, OQUT.QRCodeSrc, OQRC.FileContnt
from OQUT
left join OQRC
on OQUT.DocEntry = OQRC.SrcObjAbs and OQRC.SrcObjType = 23
where OQUT.DocEntry = 1
 

Advertisement



Steps required to add a QR code image to a Crystal Report layout for marketing documents:


"Add Command" in "Database Expert" window with the following query:
select "FileContnt", cast("SrcObjType" as varchar(20)) as ObjType, cast("SrcObjAbs" as integer) as ObjAbs from OQRC where FieldName = 'QRCodeSrc'
 

Name the command, for example "Cmd_QRCode"
 

Go to the "Links" tab and link from the respective ODOC table with the following links:
ODOC.DocEntry --> Cmd_QRCode.ObjAbs
ODOC.ObjType --> Cmd_QRCode.ObjType

Drag the field "FileContnt:Picture" from "Database Fields" / "Cmd_QRCode" into the report designer.

 

 SAP Note : https://launchpad.support.sap.com/#/notes/2889899

No comments: