cancel
Showing results for 
Search instead for 
Did you mean: 

Can I have a SQL statement in a Custom Function in Crystal Reports 2008

Former Member
0 Kudos

I'd like to create a custom Crystal Reports function which does a database lookup. Is this possible? In the pseudo code below "v_le_afe_xref" is a dataource in the report. A syntax check fails on the select.

Function legal_entity_co (old_co AS number) AS number

SELECT v_le_afe_xref.NEW_BURKS FROM v_le_afe_xref WHERE old_co = v_le_afe_xref.OLD_BURKS

END FUNCTION

Thanks.

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

Hi David,

Not sure where you are trying to use the function but CR doesn't support Functions directly, this changes so try Service PAck 3 to see if it's been added. Try using a SQLExpression, and do not include a SELECT in the SQL or using a Command Object.

You may be able to define it on the server and then call it from CR using a Command also.

Thank you

DOn