SAP Knowledge Base Article - Public

1603381 - How to create a C++ UFL using the new Unicode UFL interface in Crystal Reports 2008 & later

Symptom

  • User Function Libraries (UFL) extend the Crystal Reports formula language
  • This KBase links to a sample C++ UFL
  • The attached sample C++ UFL uses an external XML file to enable the report designer to set localized string values

Resolution

  • This UFL is compatible with Crystal Reports 2008 SP1 and BusinessObjects XI 3.1 and newer
  • For more information see the readme.txt and Lookup UFL.pdf files in the attached zip file
  • Note:

This is an unsupported component. No warranties are extended in any way.

To see this new UFL in Crystal report Designer do the following:

Crystal Report Designer 2011/2013 is a 32 bit app so the UFL MUST be compiled in x86 mode. If you plan to use the UFL in a 64 bit application then you need a separate 64 bit version:

Copy the file and for CR 2008 place it in this folder:

C:\Program Files (x86)\Business Objects\BusinessObjects Enterprise 12.0\win32_x86

For CR 2011/2013 in this folder:

C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86

CR for VS is the only 64 bit runtime we have except for BI 4.x also may require it. Depending on the CR Processing Server it may need the 64 bit UFL and 32 bit UFL.

For 32 bit App:

    • C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86
    • C:\Program Files (x86)\SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0\win32_x86

64 bit App:

    • C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win64_x64
    • C:\Program Files (x86)\SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0\win32_x64

To be able to set Crystal Report Designer to use the same Framework you created the UFL in you must tell CR Designer whcih one to use by doing the following:

Create a file called:

crw32.exe.config

And paste this into it:

<?xml version ="1.0"?>

<configuration>

  <startup useLegacyV2RuntimeActivationPolicy="true" >

    <supportedRuntime version="v4.0" />

  </startup>

</configuration>

Change the "supportedRuntime version" to what ever framework you are compiling your UFL in.

Save this file into the same location as crw32.exe:

For CR 2011/2013:

C:\Program Files (x86)\SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0\win32_x86

And for CR 2008:

C:\Program Files (x86)\Business Objects\BusinessObjects Enterprise 12.0\win32_x86

Now you should see your functions in the list in CR Designer.

 

 

Keywords

function UFL user function library formula , KBA , BI-DEV-NET-SDK , .NET SDK / COM SDK , How To

Product

Crystal Reports 2008 V1 ; SAP Crystal Reports 2011, feature pack 03 ; SAP Crystal Reports, developer version for Microsoft Visual Studio

Attachments

u212samp2008_with_Lookup_xplat.zip