?
Solved

Crystal Reports - Subreport array

Posted on 2014-12-11
5
Medium Priority
?
189 Views
Last Modified: 2014-12-22
I have a Subreport that pulls accounts canceled grouped monthly by Status Date.  It has two arrays - one for the number of accounts canceled and one for the amount canceled.  Here are the formulas:

shared NumberVar Array mthAmtCan;
shared NumberVar Array mthNumCan;

numberVar monthCount:=DateDiff("m",{?Start Date},{Status Date})+1;
mthAmtCan[monthCount]:= Sum ({Balance}, {Status Date}, "monthly");
mthNumCan[monthCount]:= DistinctCount ({Account ID}, {Status Date}, "monthly");
..................................................................................
In my Main Report (grouped monthly by Tran Effective Date) I declare the shared arrays:

shared NumberVar Array mthAmtCan;
shared NumberVar Array mthNumCan;
numberVar ArrayDeclare:=DateDiff("m",{?Start Date},{?End Date})+1;
Redim mthAmtCan[ArrayDeclare];
Redim mthNumCan[ArrayDeclare];

"";
...........................................................
Then display the monthly value on the Group Footer of the Tran Effective Date :

shared NumberVar Array mthNumCan;
numberVar monthCount:=DateDiff("m",{?Start Date},{Tran Effective Date})+1;
mthNumCan[monthCount]



It displays fine unless I have more than 2 years of data, then anything more than 2 years displays as zeros.  I can't be past the 1000 limit on the array data because I'm grouping by month.  Any idea on why it can't display more than 2 years of data?  My Subreport is linked to my main report by the parameters {?Start Date} and {?End Date} and both parameters are used as the criteria for both reports.
0
Comment
Question by:altosax
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 101

Expert Comment

by:mlmcc
ID: 40495374
WHat error do you get?

WHere do the 0's start?
Early months or last months?

Can you upload the report file?

mlmcc
0
 
LVL 101

Accepted Solution

by:
mlmcc earned 2000 total points
ID: 40495386
I assume the main report declaration is in the report header.

mlmcc
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 40495388
If you are grouping by month and displaying in the group footer, why the need for the array?

mlmcc
0
 
LVL 35

Expert Comment

by:James0628
ID: 40495884
It would be best if you could u/l the report file, so that we could see everything for ourselves.  In the mean time:

 Can you post your actual formulas?  {Status Date}, for example, isn't valid in CR, so I know that those aren't your real formulas.  We have no way of knowing what might have been "lost in translation".

 Exactly where are all of the items that you mentioned (the subreport and the formulas)?

 Where is the subreport located in the main report?

 I'm guessing that the first formula is in the subreport.  Where in the subreport?

 Where are the other two formulas located?

 In the first formula, you use {Status Date} to set the array index.  In the last formula, you use {Tran Effective Date}.  Without knowing anything about your data, I can only ask if that really makes sense.  Are those two fields related in some way?

 James
0
 

Author Closing Comment

by:altosax
ID: 40513366
I had the main report declaration in the Page Header.  When I moved it to the Report Header, it now gives me data for all of the years.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question