Solved

argument #2 of 'GridValueAt' is out of range

Posted on 2014-12-21
8
356 Views
Last Modified: 2014-12-22
I am getting this error in my crosstab.

argument #2 of 'GridValueAt' is out of range

The crosstab is comparing pounds sold for an item in the years 2014 and 2013.  looks like this


STORE #1     2013            2014
800JJ                3                  4
801qq             5                  6


STORE #2     2013
800FF               4

I guess the problem lies in there are no sales in 2014 for item 800FF, so no header for 2014, how would I fix that?
0
Comment
Question by:TomBalla
  • 5
  • 3
8 Comments
 
LVL 100

Expert Comment

by:mlmcc
ID: 40512280
That would cause the error.

Not sure how to solve that.  Will have experiment with the crosstab and some data like you have.

mlmcc
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 40512291
Where do you use the formula?

What formula are you using?

mlmcc
0
 

Author Comment

by:TomBalla
ID: 40512331
i have a formula called dates that gets the date range.
I have a formula called Year which separates the dates into their respective years.

I am using the calculated member to get the difference between 2014 and 2013, and that is when I am getting the error.
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 40512371
The formula is used in the crosstab?

I don't have CR2008 on my machines at home.  I will check it out at work

mlmcc
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:TomBalla
ID: 40512951
Yes, this is in a crosstab.
0
 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
ID: 40513186
Try a formula like

If GetColumnPathIndexOf(2014) <> -1 AND  GetColumnPathIndexOf(2013) <> -1 then
    GridValueAt (CurrentRowIndex, GetColumnPathIndexOf(2014), CurrentSummaryIndex ) - GridValueAt (CurrentRowIndex, GetColumnPathIndexOf(2013), CurrentSummaryIndex ) 
Else if  GetColumnPathIndexOf(2013) <> -1 then
     GridValueAt (CurrentRowIndex, GetColumnPathIndexOf(2013), CurrentSummaryIndex )
Else
     GridValueAt (CurrentRowIndex, GetColumnPathIndexOf(2014), CurrentSummaryIndex )

Open in new window


mlmcc
0
 

Author Comment

by:TomBalla
ID: 40513243
Alright, that looks like it works.  Had to add quote marks around 2014 and 2013 but it looks to work.  
Thanks.
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 40514409
In my report they years were numbers so no " ".  If yours are strings then the " " are needed.

mlmcc
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Crystal report running 3 42
Change start of Week from Sunday to Friday 8 47
"A string is required here" error in Formula 7 45
Crystal Reports total formula with groups? 4 37
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 …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

910 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now