Solved

subscript must be between 1 and the size of the array

Posted on 2004-09-21
3
403 Views
Last Modified: 2012-06-21
This is my record selection formula
  or
    (
      If {?a}[1]= "test" then
      (
        ({table.field}=0)
      )
    )  
    or
    (
     
      If {?a}[2]= "test1" then
      (
        ({table.field}=1)
      )
    )  
    or
    (
      If {?a}[3]= "test2" then
      (
        ({table.field}=2)
      )
    )  

This parameter field {?a} is a multiple selection criteria.

if i add only "test" as a parameter value I get an error subscript must be between 1 and the size of the array at this line If {?a}[2]= "test1" then

0
Comment
Question by:PradeepYadhav
3 Comments
 
LVL 28

Accepted Solution

by:
bdreed35 earned 500 total points
ID: 12114168
The problem is that you are trying to check for an element of the range parameter that doesn't exist.

You would be better off taking a different approach.
Start off by editing your parameter.
I assume you have default values for the user to pick from.
Since the textual description doesn't match the value stored, you can set up description and values paris for the default values.
The description will be displayed for the user to choose from, and the value will be used in the selection criteria.
Add 0 to your default list, then highlight it, and click the Define Descirpiton button.
Add the description "test" in the description box.
Repeat these last 2 steps for each value you need.
There is a drop down list underneath the default values called Display.  Change this to Description.
Save and Close the parameter dialog box.

Now, all you need for your record selection is:

 {table.field} = {?a}
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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. …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

759 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

19 Experts available now in Live!

Get 1:1 Help Now