Solved

subscript must be between 1 and the size of the array

Posted on 2004-09-21
3
408 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

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. …
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

734 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