cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

UFL 'u2lbcode.dll' that implements this function is missing

Former Member
0 Likes
2,986

Hi,

I'm trying to develop an application with SAP Crystal Reports, developer version for Eclipse ver 2.0.24.

When I try to run a report with barcode I've got the error:"

UFL 'u2lbcode.dll' that implements this function is missing".

I've developed my application starting from CRJavaHelper class.The others kind of report work well. In the path

C:\eclipse\plugins\com.businessobjects.crystalreports.crsdk.libs_12.2.225.r3524\lib I can find the library

com.azalea.ufl.barcode.1.0.jar, and I can see that in the package explorer in Eclipse. Other information:

I'm runnig my project on Windows 7 64bit.

Someone can help me? Because I don't know how to solve it.

Thanks in advance


Accepted Solutions (0)

Answers (4)

Answers (4)

0 Likes

Hi,

I am facing similar issue in my application. I am reading existing *.rpt file in java application using crystal report java plugin. The back-end code of these *.rpt files are written in ".net" where it try to call IDAutomationQRCodeEncoderQRSet() and this function not present in crystal report library. I have pasted .net code segment here for reference.

Dim Segments As Number

Segments = IDAutomationQRCodeEncoderQRSet(DataToEncode, ProcTilde, EncMode, Version, ErrorCorrectionLevel)

For i = 0 to Segments

CompleteBarcodeString = CompleteBarcodeString & IDAutomationQRCodeEncoderQRGet(i)

Next i

Formula = CompleteBarcodeString

Because of above issue portal showing below error:

ErrorException in formula '{@qarcode2}' at 'IDAutomationQRCodeEncoderQRSet': UFL 'u212com.dll' that implements this function is missing.

I need your guidance to fix this crystal report issue. Please advice

Regards,

Amit Jha

Former Member
0 Likes

thanks for the document.

I tried it, but I haven't been able to make the UFL file jar. Because I never made before, please could you help me?

I did these steps:

1) Add external JAr (CrystalReportsRuntime.jar, CrystalCommon2.jar) in my new project;

2) I wrote the code;

3)I made a jar file from Eclipse;

4)In the previuos step I saved my jar file as com.azalea.ufl.barcode.1.0.jar, exactly the same the original file, and put it in the same path.

5)I ran my project wth the report but didn't work.

this is the code that I wrote:

// FUNCTION LIBRARY

package com.azalea.ufl;

import com.crystaldecisions.reports.formulas.FormulaFunction;
import com.crystaldecisions.reports.formulas.FormulaFunctionLibrary;

public class BarcodeLibrary
implements FormulaFunctionLibrary
{
private final FormulaFunction[] functionArray = { new Code39(), new Code39Ascii() };

public FormulaFunction getFunction(int functionNumber)
{
return this.functionArray[functionNumber];
}

public int size()
{
return this.functionArray.length;
}
}

//MY FUNCTION

package com.azalea.ufl;

import com.crystaldecisions.reports.common.CrystalResourcesFactory;
import com.crystaldecisions.reports.common.value.FormulaValue;
import com.crystaldecisions.reports.common.value.FormulaValueType;
import com.crystaldecisions.reports.common.value.StringValue;
import com.crystaldecisions.reports.formulas.FormulaFunction;
import com.crystaldecisions.reports.formulas.FormulaFunctionArgumentDefinition;
import com.crystaldecisions.reports.formulas.FormulaFunctionCallException;
import com.crystaldecisions.reports.formulas.FormulaValueReference;
import com.crystaldecisions.reports.formulas.SimpleFormulaFunctionArgumentDefinition;

public abstract class Code39Base
implements FormulaFunction
{
FormulaFunctionArgumentDefinition[] myArguments = { SimpleFormulaFunctionArgumentDefinition.string };
protected CrystalResourcesFactory resCrystal;

public Code39Base()
{
this.resCrystal = new CrystalResourcesFactory("Messages");
}

protected final String doTranslation(String inputData)
{
String returnVal = "";
char[] dataChar = inputData.toCharArray();
for (int i = 0; i < dataChar.length; i++) {
returnVal = returnVal + translateCharWrapper(dataChar[i]);
}
returnVal = "*" + returnVal + "*";

return returnVal;
}

public final FormulaValue evaluate(FormulaValueReference[] arguments)
throws FormulaFunctionCallException
{
StringValue dataStringArg = (StringValue)arguments[0].getFormulaValue();

String dataString = dataStringArg.getString();
String returnVal = doTranslation(dataString);

return StringValue.fromString(returnVal);
}

public final FormulaFunctionArgumentDefinition[] getArguments()
{
return this.myArguments;
}

public final FormulaValueType getReturnType()
{
return FormulaValueType.string;
}

protected abstract String translateChar(char paramChar)
throws InvalidBarcodeDataException;

private String translateCharWrapper(char theChar)
{
String returnString;
try
{
returnString = translateChar(theChar);
}
catch (InvalidBarcodeDataException e)
{
returnString = "";
}
return returnString;
}

public void validateArgumentValues(FormulaValueReference[] arguments)
throws FormulaFunctionCallException
{}
}

package com.azalea.ufl;

public class Code39Ascii
extends Code39Base
{
private String[] c39Chars = { "%U", "$A", "$B", "$C", "$D", "$E", "$F", "$G", "$H", "$I", "$J", "$K", "$L", "$M", "$N", "$O", "$P", "$Q", "$R", "$S", "$T", "$U", "$V", "$W", "$X", "$Y", "$Z", "%A", "%B", "%C", "%D", "%E", "_", "/A", "/B", "/C", "/D", "/E", "/F", "/G", "/H", "/I", "/J", "/K", "/L", "-", ".", "/O", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "/Z", "%F", "%G", "%H", "%I", "%J", "%V", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "%K", "%L", "%M", "%N", "%O", "%W", "+A", "+B", "+C", "+D", "+E", "+F", "+G", "+H", "+I", "+J", "+K", "+L", "+M", "+N", "+O", "+P", "+Q", "+R", "+S", "+T", "+U", "+V", "+W", "+X", "+Y", "+Z", "%P", "%Q", "%R", "%S", "%T" };

public String getIdentifier()
{
return "barcodec39ascii";
}

protected String translateChar(char theChar)
throws InvalidBarcodeDataException
{
if (theChar >= this.c39Chars.length) {
throw new InvalidBarcodeDataException(theChar, this.c39Chars.toString());
}
return this.c39Chars[theChar];
}
}

//EXCEPTION

package com.azalea.ufl;

public class InvalidBarcodeDataException extends Exception{

private static final long serialVersionUID = 1L;
private char barcodeData;
private String allowedCharacters;


public InvalidBarcodeDataException(char theBadChar, String theAllowedCharacters)
{
this.barcodeData = theBadChar;
this.allowedCharacters = theAllowedCharacters;
}

public String getMessage()
{
return "Invalid Barcode Data (" + this.barcodeData + ") Allowed Characters are: " + this.allowedCharacters;
}
}

Former Member
0 Likes

Thanks for reply.

Please can you show or tell me how to do?

I suppose that I have to write the classpath here:

(crconfing.xml file in Crystal Report installation, not in sdk Eclipse for developer!?)

<ExternalFunctionLibraryClassNames>
<classname>

C:\eclipse\plugins\com.businessobjects.crystalreports.crsdk.libs_12.2.225.r3524\lib\com.azalea.ufl.barcode.1.0.jar</classname>
<classname> </classname>
</ExternalFunctionLibraryClassNames>

but I don't know how to change u2lbcode.dll version.

Please another question. Do you know if this library solve formulas for these kinds of barcode?

the list:

Code 39, Extended Code 39, Code 128, Code 128 auto, AI detection for GS1-128, Interleaved 2 of 5, Codabar, UPC-A, UPC-E, MSI, EAN-8, EAN-13, Code 11, Code 93, Industrial 2 of 5, USPS Intelligent Mail IMb, Postnet & Planet.

In particolar:

- Code 39, Extended Code 39;

-Code 128, Code 128 auto;

-Interleaved 2 of 5;

-Industrial 2 of 5.

Thanks a lot in advance for your help.

daniel_paulsen
Product and Topic Expert
Product and Topic Expert
0 Likes

It appears your report was designed using the C ufl (u2lbcode.dll). You will need to change the report to use the java UFL.

you can set the classpath for the java UFL in the crconfig.xml file and then change the barcode from the one in the u2lbcode.dll to the one in the JAR using the CR designer.

Dan

Former Member
0 Likes

Thanks for reply.

Please can you show or tell me how to do?

I suppose that I have to write the classpath here:

(crconfing.xml file in Crystal Report installation, not in sdk Eclipse for developer!?)

<ExternalFunctionLibraryClassNames>
<classname>

C:\eclipse\plugins\com.businessobjects.crystalreports.crsdk.libs_12.2.225.r3524\lib\com.azalea.ufl.barcode.1.0.jar</classname>
<classname> </classname>
</ExternalFunctionLibraryClassNames>

but I don't know how to change u2lbcode.dll version.

Please another question. Do you know if this library solve formulas for these kinds of barcode?

the list:

Code 39, Extended Code 39, Code 128, Code 128 auto, AI detection for GS1-128, Interleaved 2 of 5, Codabar, UPC-A, UPC-E, MSI, EAN-8, EAN-13, Code 11, Code 93, Industrial 2 of 5, USPS Intelligent Mail IMb, Postnet & Planet.

In particolar:

- Code 39, Extended Code 39;

-Code 128, Code 128 auto;

-Interleaved 2 of 5;

-Industrial 2 of 5.

Thanks a lot in advance for your help.

daniel_paulsen
Product and Topic Expert
Product and Topic Expert
0 Likes

Try the instructions in the following PDF. It is a bit old, but the instructions should still be the same.

https://archive.sap.com/kmuuid2/400bcc18-6864-2b10-2c9c-88d352315eb0/Crystal%20Reports%20XI%20-%20Ja...

I'm not sure on the full list of barcodes. Someone with a deeper knowledge of CR design would have to answer that.

Dan