shaboo
15th July 2004, 23:37
I have a situation where I have a multi-dimensional array in my program script.


extern double cycle.count.values (3,3)
....


In my script, I store values for different item types in each dimension. Later I need to print this information in a report. But ironically when I try to use the same array variable in my report script, I can't seem to get the stored value. My report script looks like


declaration:
double cycle.count.values(3,3)

before.program:
import("cycle.count.values(3,3)", cycle.count.values(3,3))
....


I have tried importing the variable with and without defining its array size in the import statement and it didn't work in both cases. When I run the report in debug mode and see if the values are getting imported or not, I observed that even in the before.program function after the import call, the array variable does not contain any values rather it becomes single dimensional.

Any ideas what is happening and what is the correct way to import a multi-dimensional array in your report script from the program script?

Thanks in advance for the help.


Based on the values, in this

Hitesh Shah
16th July 2004, 05:56
First check the return value of import statement to see if the import statement is successful (think 1 is successful and 0 is failure) .

Reading further u get the single dimensional values. Maybe u have defined this as input variable with 1 dimension . This is not needed.

vahdani
16th July 2004, 22:11
Hi Shaboo,

take a look at get.indexed.var() (http://www.baanboard.com/programmers_manual_baanerp_help_functions_variables_interprocess_transfer_get_indexed_var) :rolleyes:

Baan OpenWorld
16th July 2004, 23:02
You need to declare cycle.count.values as extern in your report script like you did for your program script.

extern double cycle.count.values (3,3)

regards
Marco