Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help splitting an array that is more than 1000 records

Status
Not open for further replies.

cfsutter

Programmer
Oct 14, 2013
7
US
I could use some help splitting an array that is more than a 1000 records. I'm using SAP's instructions to chart off print time formulas to build a trending report. After much tweaking I thought I had everything perfect only to run the report and get the Array error because of the number of records in each grouping. The problem is that I can't make the groups smaller, the data is what it is and it's only going to get larger. My experience with arrays is limited to what I've taught myself by researching online and I'm struggling. I'd really appreciate some help.

I'm reporting in Crystal off a SQL db using Remedy. I'm trying to create a rolling 13 mos trend chart that trends the number of tickets that are aging by priority and month. The requester wants the average days aging to be a running total from month to month. Through trial and error and a lot of research I discovered that you can't chart off print time formulas and found this white paper from SAP with an example of how to work around this limitation. My chart was a little different with multiple groups but I think I got it only to run into the array issue.

I have two OnChangeOf variables being passed to a subreport and one ShowValue variable being passed to the subreport, following the instructions in the white paper linked above.

My variables in the Main Report are as follows:

whileprintingrecords;
stringvar ChangeOfMonth;
ChangeOfMonth := ChangeOfMonth + {@Month} + "^";

whileprintingrecords;
stringvar ChangeOfPriority;
ChangeOfPriority := ChangeOfPriority + {@Priority}+ "^";

stringvar ShowValueAging;
ShowValueAging := ShowValueAging + totext({@AvgDaysAging}) + "^" ;

WhilePrintingRecords;
Shared NumberVar DaysAging;
Shared NumberVar AvgDaysAging;
DaysAging := DaysAging + ({@Days Aging});
if DaysAging > 0 and {@Open?} > 0 then AvgDaysAging := (DaysAging/Sum ({@Open?}, {@Priority}));
ToNumber(AvgDaysAging);

Following the instructions I am attempting to split the arrays created by the variables:

Formula for the chart: ToNumber(Split({?Pm-@ShowValueAging}, "^")[RecordNumber])

Record Select Criteria:
{@Month} in split ({?Pm-@ChangeOfMonth},"^") and
{@Priority} in split({?Pm-@ChangeOfPriority},"^")

Due to the sheer quantity of tickets opened each month I get the array error for all the splits. Can someone advise me on how to handle this?

Thank you


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top