Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > Crystal Reports
|
Crystal Reports General discussion about Crystal Reports. For discussions specific to the book Professional Crystal Reports for VS.NET, please see the book discussion forum for that book.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Crystal Reports section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 14th, 2003, 05:08 PM
Registered User
 
Join Date: Aug 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default A subscript must be between 1 and size of array

i get this error when i try to to get the value out of an array.

for example:

numbervar array x;
x :=(1,2,3,4,5,6);
when i try to get the 2 value in the array
x[2];
i get the following error msg ----"A subscript must be between 1 and size of array "

it works fine when i retrieve the first value

x[1];
 
Old July 8th, 2004, 02:12 PM
Registered User
 
Join Date: Jul 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to jshell Send a message via MSN to jshell
Default

Is your array created from retrieved data or are you reporting on a stored array? I ask because I received this error while trying to report on a custom note format in a Timberline Database: "A subscript must be between 1 and size of array"

The custom note is stored as one long string with each value delimited by "" and I split it into it's informative sections using:

stringVar array ErNote:= Split ({NOTES.TEXT},"");
stringVar C1:=ErNote[2];
C1

My error resulted from the fact that I had changed the note format after data had already been committed to the database and my array structure (the total number of array members/values) changed. Once I deleted the notes/Arrays that were stored in the old format, everything worked fine.








Similar Threads
Thread Thread Starter Forum Replies Last Post
Label Array With Dynamic Size nevincm C# 1 April 13th, 2007 11:24 AM
Array, Subscript out of range. koss77 VB How-To 4 August 21st, 2006 09:35 AM
size of the array mafia boy Java Basics 6 April 24th, 2006 07:41 PM
creating an array of size 2^16 bits scoobie C++ Programming 2 November 9th, 2005 08:59 PM
increase the size of the array Beulah ASP.NET 1.0 and 1.1 Basics 1 September 12th, 2003 08:54 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.