Hi all,
I am using CRXI with SQL. I have implemented the instructions from the Charting on Print-Time Formulas white paper and am getting the error "A subscript must be between 1 and the size of the array".
I was able to reproduce the example from the white paper and the chart worked but when converting over to my own data, I get the subscript error.
I have two tables, parent and child, where the grouping is based on a name field in the parent table and the # Red is based on fields in the multiple child records related to a record in the parent table. GROUP 1 is the name field in the parent table.
My "PerCent" formula is:
//This formula uses Crystal syntax.
WhilePrintingRecords;
Shared NumberVar curCounter;
Shared NumberVar curTotal;
curCounter := curCounter + sum({@# Red},{@GROUP 1});
curTotal := (curCounter/Sum ({@# Red}))*100;
ToNumber(curTotal);
where {@# Red} is Num1 * Num2 * Num3 from the child table.
All the other formulas and the subreports links are the same as the whitepaper. The formula causing the error is the split portion of the "SubShowValue" formula: ToNumber(split({?Pm-@ShowValue},"^")[RecordNumber]).
Any help is greatly appreciated!
I am using CRXI with SQL. I have implemented the instructions from the Charting on Print-Time Formulas white paper and am getting the error "A subscript must be between 1 and the size of the array".
I was able to reproduce the example from the white paper and the chart worked but when converting over to my own data, I get the subscript error.
I have two tables, parent and child, where the grouping is based on a name field in the parent table and the # Red is based on fields in the multiple child records related to a record in the parent table. GROUP 1 is the name field in the parent table.
My "PerCent" formula is:
//This formula uses Crystal syntax.
WhilePrintingRecords;
Shared NumberVar curCounter;
Shared NumberVar curTotal;
curCounter := curCounter + sum({@# Red},{@GROUP 1});
curTotal := (curCounter/Sum ({@# Red}))*100;
ToNumber(curTotal);
where {@# Red} is Num1 * Num2 * Num3 from the child table.
All the other formulas and the subreports links are the same as the whitepaper. The formula causing the error is the split portion of the "SubShowValue" formula: ToNumber(split({?Pm-@ShowValue},"^")[RecordNumber]).
Any help is greatly appreciated!