morechocolate
Technical User
Rosemary pointed me to the Crystal Decisions document: Advanced Reporting Techniques using Arrays, however it is not working correctly for me.
I have the following:
GH1 Tier
GH2 Loan #
Details are sorted on policy coverage type, then by policy number. I want to do the dynamic array on the property type.
Loan# Policy Type Policy# PropertyType Array
Details 12453 All 800 Office
12453 All 800 Office Office
12453 All 200 Hotel
12453 All 200 Hotel Hotel
12453 Terr 800 Office
12453 Terr 800 Office Office
12453 Terr 200 Hotel
12453 Terr 200 Hotel Hotel
Notice from the example that Office starts on the second line for the array. Office also appears above under other loan# groupings.
Here is my code:
WhilePrintingRecords;
stringVar array PropertyTypeArray;
local numberVar counter;
//stringVar strPropertyType;
//only new values are added to the array
if not({INSR_RISK;1.PR_PRTY_TYP} in PropertyTypeArray) then
(
counter := counter + 1;
//the size of an array cannot exceed 1000 CR version 8
if counter <=1000 then
(
//keep the values that are currently in the array
Redim Preserve PropertyTypeArray [counter];
PropertyTypeArray[counter] := {INSR_RISK;1.PR_PRTY_TYP};
)
);
I do not understand what is happening.
I have the following:
GH1 Tier
GH2 Loan #
Details are sorted on policy coverage type, then by policy number. I want to do the dynamic array on the property type.
Loan# Policy Type Policy# PropertyType Array
Details 12453 All 800 Office
12453 All 800 Office Office
12453 All 200 Hotel
12453 All 200 Hotel Hotel
12453 Terr 800 Office
12453 Terr 800 Office Office
12453 Terr 200 Hotel
12453 Terr 200 Hotel Hotel
Notice from the example that Office starts on the second line for the array. Office also appears above under other loan# groupings.
Here is my code:
WhilePrintingRecords;
stringVar array PropertyTypeArray;
local numberVar counter;
//stringVar strPropertyType;
//only new values are added to the array
if not({INSR_RISK;1.PR_PRTY_TYP} in PropertyTypeArray) then
(
counter := counter + 1;
//the size of an array cannot exceed 1000 CR version 8
if counter <=1000 then
(
//keep the values that are currently in the array
Redim Preserve PropertyTypeArray [counter];
PropertyTypeArray[counter] := {INSR_RISK;1.PR_PRTY_TYP};
)
);
I do not understand what is happening.