Crystal v9
Oracle 8i
I have an array in a subreport that I need to share with my container report. I eventually want to loop through it and compare to see if the values in my container report match, ultimately finding a figure of the difference in value of the total amount in the array and the records that do not match. (i.e. there are 36 recs in array, 29 recs in my container match).
I've successfuly created an array and it populates correctly for the 8 times it is accessed when I declare it as a Global array and redim its size using a summary of the total for the group.
However, once I change the array declaration to Shared so that I can pass it from the Subreport to my Container, the formulas fail giving me an error saying "A subscript must be between 1 and the size of the array"...acting almost as if the redim doesn't exist. And when I try to redim with other ways of getting that same value (i.e. running total) without hard coding it or if I try to create a new Shared variable and give it the value of the Global array, I get an error complaining "The result of a formula cannot be an array". If I don't redim, I go beyond the 1000 limit, and my arrays will only range from 30's to 50's.
Obviously, without being able to delcare it as a Shared array, I can't pass it to the container.
So, my questions:
1- If I know, say, a rounded ceiling of 55 records for array, code "redim[55]", is there a function to cut off the blank empty spaces that would exist in an array that really only had 36 useful records? I assume there should be and that I just don't know it. Hopefully someone can help there.
2 - Once I can get my Subreport array delcared successfully as Shared, how do I relate to it on my container? I get the "The result of a formula cannot be an array" error when I just delcare it like any other non-Array variable:
WhilePrintingRecords;
shared stringVar array charts;
I guess that's it for now. I appreciate any help!
I'll gladly provide more info if it would help you help me, too!
Oracle 8i
I have an array in a subreport that I need to share with my container report. I eventually want to loop through it and compare to see if the values in my container report match, ultimately finding a figure of the difference in value of the total amount in the array and the records that do not match. (i.e. there are 36 recs in array, 29 recs in my container match).
I've successfuly created an array and it populates correctly for the 8 times it is accessed when I declare it as a Global array and redim its size using a summary of the total for the group.
However, once I change the array declaration to Shared so that I can pass it from the Subreport to my Container, the formulas fail giving me an error saying "A subscript must be between 1 and the size of the array"...acting almost as if the redim doesn't exist. And when I try to redim with other ways of getting that same value (i.e. running total) without hard coding it or if I try to create a new Shared variable and give it the value of the Global array, I get an error complaining "The result of a formula cannot be an array". If I don't redim, I go beyond the 1000 limit, and my arrays will only range from 30's to 50's.
Obviously, without being able to delcare it as a Shared array, I can't pass it to the container.
So, my questions:
1- If I know, say, a rounded ceiling of 55 records for array, code "redim[55]", is there a function to cut off the blank empty spaces that would exist in an array that really only had 36 useful records? I assume there should be and that I just don't know it. Hopefully someone can help there.
2 - Once I can get my Subreport array delcared successfully as Shared, how do I relate to it on my container? I get the "The result of a formula cannot be an array" error when I just delcare it like any other non-Array variable:
WhilePrintingRecords;
shared stringVar array charts;
I guess that's it for now. I appreciate any help!
I'll gladly provide more info if it would help you help me, too!