seekingandomeda
Technical User
QR Code and If Null Then Else
New to Crystal Reports and formulas. Added ID Automation in to the mix to generate QR code within a Crystal Report. QR code works and was able to preview in Crystal Reports with the basic formula in line 1 of the QR code:
stringVar DataToEncode:= {Field 1} & {Field 2} & {field 3} & "Vendor ID 11111111";
I need some help with altering line 1 of the formula to say: if there is no data in (field 1) then leave blank.
My attempt below shows no errors within Crystal Reports, but it also shows no QR code when previewed. Any help greatly appreciated.
stringVar DataToEncode:= {Field 1} & if {Field 2}= "a,b,c" then "a,b,c" else "no" & {Field 3} & "Vendor ID 11111111";
stringVar CompleteBarcodeString:="";
numberVar i:=0;
numberVar Segments:= IDAutomationQRCodeEncoderQRSet(DataToEncode,0 ,0 ,0 ,0 );
For i:=0 to Segments Do
(
CompleteBarcodeString := CompleteBarcodeString + IDAutomationQRCodeEncoderQRGet(i);
);
CompleteBarcodeString
New to Crystal Reports and formulas. Added ID Automation in to the mix to generate QR code within a Crystal Report. QR code works and was able to preview in Crystal Reports with the basic formula in line 1 of the QR code:
stringVar DataToEncode:= {Field 1} & {Field 2} & {field 3} & "Vendor ID 11111111";
I need some help with altering line 1 of the formula to say: if there is no data in (field 1) then leave blank.
My attempt below shows no errors within Crystal Reports, but it also shows no QR code when previewed. Any help greatly appreciated.
stringVar DataToEncode:= {Field 1} & if {Field 2}= "a,b,c" then "a,b,c" else "no" & {Field 3} & "Vendor ID 11111111";
stringVar CompleteBarcodeString:="";
numberVar i:=0;
numberVar Segments:= IDAutomationQRCodeEncoderQRSet(DataToEncode,0 ,0 ,0 ,0 );
For i:=0 to Segments Do
(
CompleteBarcodeString := CompleteBarcodeString + IDAutomationQRCodeEncoderQRGet(i);
);
CompleteBarcodeString