Solved

subscript must be between 1 and the size of the array

Posted on 2004-09-21
3
407 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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 …
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

735 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