BOB: Business Objects Board
Not endorsed by or affiliated with SAP

Register | Login 

Launch Works 
Launch Works (Opens a new window)  

General Notice: No events within the next 45 days.

This array must be subscripted. For example, Array[i].


 
Search this topic... | Search Crystal Reports... | Search Box
Register or Login to Post    Forum Index -> Building Reports -> Crystal Reports  Previous TopicPrint TopicNext Topic
Author Message
Araarso_2010
Forum Member
Forum Member



Joined: 24 Jun 2008

Posts: 8
Location: Saint Paul, Minnesota


flag
PostPosted: Wed Oct 15, 2008 2:26 pm 
Post subject: This array must be subscripted. For example, Array[i].

I want to sort based on a parameter "Status"; so if the status is Funded, Funded-as Asked, or Funded - New Designation, then I want sort by date funded field. Otherwise, I want to sort Date asked field.

Here is formula and I receive this error message: This array must be subscripted. For example, Array[i].

if ({?Status}) in ["Funded","Funded - As Asked","Funded - New Designation" ] then
{CnPrProp_1.CnPrProp_1_Date_Funded}
else
{CnPrProp_1.CnPrProp_1_Date_Asked}
Back to top
JBray
Principal Member
Principal Member



Joined: 15 Jul 2008
ASUG Icon
Posts: 364
Location: Phoenix


flag
PostPosted: Wed Oct 15, 2008 4:53 pm 
Post subject: Re: This array must be subscripted. For example, Array[i].

Do you have the Status parameter set up to allow multiple values? If so, it is treated as an array.
_________________
Senior Technical Consultant
InfoSol, Inc.
http://www.infosol.com
Back to top
Araarso_2010
Forum Member
Forum Member



Joined: 24 Jun 2008

Posts: 8
Location: Saint Paul, Minnesota


flag
PostPosted: Fri Oct 17, 2008 4:46 pm 
Post subject: Re: This array must be subscripted. For example, Array[i].

Yes, it is. But How would you loop through. I am new to Crystal & I could not figure out how to setup the Array & then loop through.

Thanks,
A. J.
Back to top
JBray
Principal Member
Principal Member



Joined: 15 Jul 2008
ASUG Icon
Posts: 364
Location: Phoenix


flag
PostPosted: Fri Oct 17, 2008 6:51 pm 
Post subject: Re: This array must be subscripted. For example, Array[i].

Why worry about looping through it. Turn it around and use a large IF statement like:

if ("Funded" in {?Status} or "Funded - As Asked" in {?Status} or "Funded - New Designation" in {?Status})
Then {CnPrProp_1.CnPrProp_1_Date_Funded}
Else {CnPrProp_1.CnPrProp_1_Date_Asked};

_________________
Senior Technical Consultant
InfoSol, Inc.
http://www.infosol.com
Back to top
Display posts from previous:   
Register or Login to Post    Forum Index -> Building Reports -> Crystal Reports  Previous TopicPrint TopicNext Topic
Page 1 of 1 All times are GMT - 5 Hours
 
Jump to:  

Index | About | FAQ | RAG | Privacy | Search |  Register |  Login 

Get community updates via Twitter:

Not endorsed by or affiliated with SAP
Powered by phpBB © phpBB Group
Generated in 0.0709 seconds using 17 queries. (SQL 0.0298 Parse 0.0338 Other 0.0073)
CCBot/2.0 (http://commoncrawl.org/faq/)
Hosted by ForumTopics.com | Terms of Service
phpBB Customizations by the phpBBDoctor.com
Shameless plug for MomentsOfLight.com Moments of Light Logo