cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal Reports 2008 , Stored Procedure Result (String) into local Variable

Former Member
0 Kudos

Hello Everyone,

This is a Informix database, the report is working flawlesly . I need to customise it.

So I ahve here by the SQL Fields ( German : SQL-Ausdruckfelder ) Text1 which gets its text like this : cu_gettext( pool_pos.auftnr, pool_pos.pos,0,1,1,40)

I get something like GLAS-ULTIMATE . ( I need to change this to something else for specific customers)

So I thought I'll do this :

Created a Custom Form Field ( Formfelder )

CUSTOMER_PROD (this is the name )

Local StringVar Glass_Typ1 := cu_gettext( pool_pos.auftnr, pool_pos.pos,0,1,1,40);

Unfortunatelly it does not work , I dont even know if it is possible to assign the result of a procedure (that always returns a string) to a local

variable like that .

If I somehow manage to assign it to the local variable then I can do the rest of the stuff which is pretty simple .

Thank you for the help.

Greetings

Robert

Accepted Solutions (0)

Answers (1)

Answers (1)

abhilash_kumar
Active Contributor
0 Kudos

Hi Robert,

If cu_gettext() is a 'function' you've created in the database, you'd need to use a SQL Expression field to be able to execute it.

Expand Field Explorer > Right-click SQL Expression Fields > New.

Paste this code:

cu_gettext('pool_pos.auftnr', 'pool_pos.pos',0,1,1,40)


You can then create another formula to store this value in a variable like so:


Local StringVar Glass_Typ1 := {%SQL Expression FIeld Name}


-Abhilash