Skip to Content
0

How to use shared array created through formula in another formula

Jul 13, 2017 at 01:09 PM

23

avatar image

I have created a shared array using formula in subreport. now i want to use that array in my main report. Can any one please tell me how to do it.

In Main Report it have one formula Name ClEq_Array as below

WhilePrintingRecords;

Shared NumberVar Array ClEq;

Shared NumberVar ArraySize := 0

In subreport another formula Name ClEq_Array assigns values to this array as below

WhilePrintingRecords;

Shared NumberVar ArraySize;

Shared NumberVar Array ClEq;

ArraySize := ArraySize + 1;

ReDim Preserve ClEq[ArraySize];

ClEq[ArraySize] := -{CR_Clnt_Invt_Return_Report_Summ;1.ClientEquity};

Now i want to know in main report where i want to use this array how can i do this. whether i have to give Formula Name of the Array Name


Pls it is little urgent

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Ian Waterman Jul 13, 2017 at 01:57 PM
0

You can use the shared array in Main report in any section which is below the section holding the subreport.

Formula can have any name just declare it before using

@MainArray

WhilePrintingRecords;

Shared NumberVar Array ClEq;

Ian

Show 2 Share
10 |10000 characters needed characters left characters exceeded

In Group Header I have formula {@ClEq_Array} for Declaring Array as Below

WhilePrintingRecords;

Shared NumberVar Array ClEq;

Shared NumberVar ArraySize := 0

In Group Footer I am using this formula in Another Formula which has XIRR Formula as Below

XIRR ({@ClEq_Array},{@TrdDt_Array})

Here it Gives me error for {@ClEq_Array} as 'A Number Array or the Currency Array is required here'

Why this error is shown as the as {@ClEq_Array} is formula consisting Number Array

Can you pls help me out

0

This formula {@ClEq_Array} is effectively a reset of array.

To use the array after the subreport you must create a new formula which starts as I have advised

WhilePrintingRecords;

Shared NumberVar Array ClEq;

Ian

0