on 03-04-2009 8:56 PM
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.