Solved

argument #2 of 'GridValueAt' is out of range

Posted on 2014-12-21
8
343 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
Comment Utility
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
Comment Utility
Where do you use the formula?

What formula are you using?

mlmcc
0
 

Author Comment

by:TomBalla
Comment Utility
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
Comment Utility
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
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:TomBalla
Comment Utility
Yes, this is in a crosstab.
0
 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
Comment Utility
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
Comment Utility
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
Comment Utility
In my report they years were numbers so no " ".  If yours are strings then the " " are needed.

mlmcc
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

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. …
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

763 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

7 Experts available now in Live!

Get 1:1 Help Now