Hi,
I defined 3 Shared variables in Main Report.
They are numbervar, String Var Array and String Var Array.
A sub report is added to a Page header and the shared variables are updated.
Now, I created a variable where I am trying to use the shared variables. But the values are not being updated in main report.
Am I missing anything here?
The variables definitions are as follows.
Sub Report -
Variable: Array Load
Defintion:
Shared Stringvar array Lbl_Array;
Shared Stringvar array Lbl_Desc_Array;
Shared Numbervar i:=1;
whilePrintingrecords;
Redim Preserve Lbl_Array[recordnumber];
Redim Preserve Lbl_Desc_Array[recordnumber];
Lbl_Desc_Array [recordnumber]:={Command.'XXXCHINESE'};
Lbl_Array [recordnumber]:={Command.LABLE};
This variable is placed in Detail section of sub report.
Variable: Total Records
Defintion:
Shared NumberVar Total_Recs;
Whileprintingrecords;
Total_Recs:=Total_Recs+1;
This variable is placed in Detail section of sub report.
The two above variables are working fine.
Main Report -
Varaible : All_Vars
Defintion:
Shared StringVar array Lbl_Array;
Shared StringVar array Lbl_Desc_Array;
Shared NumberVar i:=1;
Shared NumberVar Total_Recs:=0;
I placed this variable in Report Header.
Variable: Array Display
Defintion:
Shared StringVar array Lbl_Array;
Whileprintingrecords;
Lbl_Array[recordnumber];
This is placed id detail section of main report. The values are being displayed correctly.
Variable: Test_fn
Definition:
Local NumberVar j;
Shared NumberVar Total_Recs;
Shared StringVar Array Lbl_Array;
Shared StringVar Array Lbl_Desc_Array;
Redim Preserve Lbl_Array[Total_recs];
Redim Preserve Lbl_Desc_Array[Total_recs];
Match_Lbl_Desc ("Plant",Total_Recs, Lbl_Array, Lbl_Desc_Array)
Here this variable is showing an error. The variable Total_Recs is coming as 0. And the formula is throughing an error.
Am I missing any thing here?
Please help me.
Thank you,
Regards
Gowtham