A subscript must be between 1 and the size of the array - Crsytal Reports 11

Posted on 2007-07-31
Last Modified: 2011-10-03

I am getting the following error when I try to run a report, never this this before when I have run the report in the past, any ideas on what would be causing  it:

Errror = A subscript must be between 1 and the size of the array

And its happening on the formula: Split({MV_G_Staff_Payroll.title}, " ")[2]

Thanks in advance
Question by:patelajk
    LVL 77

    Expert Comment

    It means you have records where the title field does not contain a space. So index 2 does not exist.

    Author Comment

    do u know how i can find records with no space . as in have u got the sql.
    LVL 77

    Accepted Solution

    Create a formul field:
    Ubound(Split({MV_G_Staff_Payroll.title}, " "))

    Select records where this formula field is 1.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    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. …
    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 …
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    This video discusses moving either the default database or any database to a new volume.

    729 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

    18 Experts available now in Live!

    Get 1:1 Help Now