Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 600
  • Last Modified:

argument #2 of 'GridValueAt' is out of range

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
TomBalla
Asked:
TomBalla
  • 5
  • 3
1 Solution
 
mlmccCommented:
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
 
mlmccCommented:
Where do you use the formula?

What formula are you using?

mlmcc
0
 
TomBallaAuthor Commented:
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
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
mlmccCommented:
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
 
TomBallaAuthor Commented:
Yes, this is in a crosstab.
0
 
mlmccCommented:
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
 
TomBallaAuthor Commented:
Alright, that looks like it works.  Had to add quote marks around 2014 and 2013 but it looks to work.  
Thanks.
0
 
mlmccCommented:
In my report they years were numbers so no " ".  If yours are strings then the " " are needed.

mlmcc
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 5
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now