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 February 6th, 2007, 05:39 PM
Registered User
 
Join Date: Feb 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default subscript error with a formula

I keep getting this message when i try to open the report:
Error in formula <1CR>. 'shared stringvar oldCR;A subscript must be between 1 and the size of the array.

Here is the <1cr> formula, I don't see any problem with it:

shared stringvar oldCR;
shared stringvar oldCR_F;
stringvar oldCR_F1;
stringvar oldCR_F2;
stringvar oldCR_F3;
stringvar oldCR_F4;
stringvar oldCR_F5;
shared stringvar CR_F1 ;
shared stringvar CR_F2 ;
shared stringvar CR_F3 ;
shared stringvar CR_F4 ;
shared stringvar CR_F5 ;
numbervar cut1;
numbervar cut2;
numbervar cut3;
numbervar cut4;
numbervar cut5;
stringvar array A :=Split (oldCR_F) ;
A[1];
CR_F1:=A[1] ;
CR_F1:=CR_F1;

cut1:=Length (oldCR_F)-Length (CR_F1);
oldCR_F2:=trimleft(right(oldCR_F,cut1)) ;
stringvar array b :=Split (oldCR_F2) ;
CR_F2:=b[1] ;
CR_F2:=CR_F2;

cut2:=Length (oldCR_F2)-Length (CR_F2);
oldCR_F3:=trimleft(right(oldCR_F2,cut2)) ;
stringvar array c :=Split (oldCR_F3) ;
CR_F3:=c[1] ;
CR_F3:=CR_F3;


cut3:=Length (oldCR_F3)-Length (CR_F3);
oldCR_F4:=trimleft(right(oldCR_F3,cut3)) ;
stringvar array d :=Split (oldCR_F4) ;
CR_F4:=d[1] ;
CR_F4:=CR_F4;

cut4:=Length (oldCR_F4)-Length (CR_F4);
oldCR_F5:=trimleft(right(oldCR_F4,cut4)) ;
stringvar array e :=Split (oldCR_F5) ;
CR_F5:=e[1] ;
CR_F5:=CR_F5;

stringvar array x :=Split (oldCR) ;
x[1]

Has anyone seen this type of problem. I am pulling this report from an older version of crystal, it also has a subreport and parameters being passed. I'm using VS 2005 & SQL Express 2005





Similar Threads
Thread Thread Starter Forum Replies Last Post
Error in formula in Crystal Report Prakash001 Crystal Reports 10 December 5th, 2007 04:12 AM
question on subscript out of range error? kwik10z Excel VBA 1 November 30th, 2007 10:14 PM
Subscript error...but only on my PC kalebson Excel VBA 2 March 1st, 2006 03:00 PM
error in formula field (passing multiline String) Milan VB Components 0 September 29th, 2004 07:01 AM
Error in formula: A string is required here JMak15 Crystal Reports 0 March 11th, 2004 09:51 AM





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