cancel
Showing results for 
Search instead for 
Did you mean: 

UFL parameter

Former Member
0 Kudos

Hello Everyone,

I'm trying to develop a UFL for Crystal Reports in VC++.

However, the numeric parameter I defined as LONG is always 0

NO MATTER what constant I pass in.

For example, my function has two parameters

MyFunc([in] BSTR strInput, [in] LONG nNum)

And I created a formula field in Crystal Reports

MyFunc('ABC', 1)

The first string parameter works well.

But the second parameter is always zero.

Could someone help me out?

Thanks in advance.

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

Hello,

What version of CR are you using? If it's version 9 or above you have to define the string in MBCS format. CR 9 and above is now UNICODE compliant and therefore all string values are double byte ( or more ). There was no bridge to convert string values to be fully compatable in UFL's so we thunk the value on the way out to MBCS format and then thunk it back again on it's return to CR.

It's possible there is a byte over run which is why the numeric value is always zero.

Thank you

Don

Former Member
0 Kudos

I've solved the problem.

Thank you for your info.