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


 
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
kpereira973
Forum Member
Forum Member



Joined: 29 Oct 2008

Posts: 3



PostPosted: Wed Oct 29, 2008 9:47 am 
Post subject: This Array Must Be Subscripted

Hello Sr Members,

I am new to Crystal XI and I am adjusting a present report in parameters to allow multiple supervisors if you will be selected and report run.

When I go into the Parameters field, select my supervisor (string, I believe) and allow multiple values to say true, I get the Array must be subscripted error message when attempting to run the report.

Bringing me to this statement below:

"mailto:Federal Acct Reporting?Subject=Team Productivity Report for " + totext({?Supervisor})

icon_confused.gif

Can you please advise of what could possibly be the issue at hand?

Thanks,
kpereira973
Back to top
JBray
Principal Member
Principal Member



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


flag
PostPosted: Wed Oct 29, 2008 11:11 am 
Post subject: Re: This Array Must Be Subscripted

When you allow multiple values in a parameter field, it is treated as an array. In other words, it creates a list such as ["Bob", "Sanjay", "Yuki"]. Once it is an array, you can no longer just show its value as in {?Supervisor}. You must tell it which one as in the first (1), second (2) or third (3), etc.. You accomplish this by using a subscript which is just the swaure brackets as in {?Supervisor}[1].

I would hope that from your example you are grouping on the supervisor. If this is the case, I would just use the groupname or the database field associated with the supervisor.

_________________
Senior Technical Consultant
InfoSol, Inc.
http://www.infosol.com
Back to top
Sanjay Kodidine
Senior Member
Senior Member



Joined: 19 Mar 2008

Posts: 54
Location: Anchorage, AK


flag
PostPosted: Wed Oct 29, 2008 11:20 am 
Post subject: Re: This Array Must Be Subscripted

Since you are allowing multiple values, it becomes an array. Try this and see if it will work:

"mailto:Federal Acct Reporting?Subject=Team Productivity Report for " + join({?Supervisor},',')

The join, strings all the values chosen for the parameter.
Back to top
kpereira973
Forum Member
Forum Member



Joined: 29 Oct 2008

Posts: 3



PostPosted: Wed Oct 29, 2008 11:21 am 
Post subject: Re: This Array Must Be Subscripted

Thank you for your prompt reply. That makes sense, logically. I am grouping by supervisors and the only issue with grouping by groupname is that there is several different groups joined together.

However, as for the subscript..... should it look as such:
+ totext({?Supervisor}[1], {?Supervisor}[2], {?Supervisor}[3])

If so, I received a A string is required here error message on the last Supv.[3].

Please forgive me as I am a self taught learning path.

___________________________________________

As for the "mailto:Federal Acct Reporting?Subject=Team Productivity Report for " + join({?Supervisor},','), it says a String Array is required here.


Thanks,
kpereira973
Back to top
JBray
Principal Member
Principal Member



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


flag
PostPosted: Wed Oct 29, 2008 11:24 am 
Post subject: Re: This Array Must Be Subscripted

I am assuming the formula that you are building is located in the group header or footer. If this is the case, do not use the {?Supervisor} parameter in your formula. Instead, use the database field that represents the supervisor as in {table.supervisor}.
_________________
Senior Technical Consultant
InfoSol, Inc.
http://www.infosol.com
Back to top
kpereira973
Forum Member
Forum Member



Joined: 29 Oct 2008

Posts: 3



PostPosted: Wed Oct 29, 2008 11:33 am 
Post subject: Re: This Array Must Be Subscripted

Great. Using the {table.supervisor} method is what I needed and has worked.

Thank you for your assistance.

kpereira973
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.0450 seconds using 17 queries. (SQL 0.0026 Parse 0.0346 Other 0.0078)
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