?
Solved

Script Error Message

Posted on 2014-04-08
2
Medium Priority
?
178 Views
Last Modified: 2014-04-09
Hi there,

I have the following formula to group records in my report;

if {GfApls_1ApApP_1.GfApls_1ApApP_1_Description} in ["Bank 13-14", "Food Bank 12-13",
"Bank2 13-14"]
then {GfApls_1ApApP_1.GfApls_1ApApP_1_Package}
else
Split({GfApls_1Ap.GfApls_1Ap_Description},"_")[2]

This worked before but now that I have added the first criteria I receive the error message, "A Script must be between 1 and the size of the array" -

Does anyone have an idea of what is happening here?  Please let me know if anything is unclear.
Thanks very much!
CS
0
Comment
Question by:rporter45
[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
2 Comments
 
LVL 101

Accepted Solution

by:
mlmcc earned 1000 total points
ID: 39987804
Apparently some values don't have a _ in the string.

Try

if {GfApls_1ApApP_1.GfApls_1ApApP_1_Description} in ["Bank 13-14", "Food Bank 12-13", "Bank2 13-14"]
then {GfApls_1ApApP_1.GfApls_1ApApP_1_Package}
else if Instr({GfApls_1Ap.GfApls_1Ap_Description},"_") > 1 then
     Split({GfApls_1Ap.GfApls_1Ap_Description},"_")[2]
Else
    {GfApls_1Ap.GfApls_1Ap_Description}

Open in new window


mlmcc
0
 

Author Closing Comment

by:rporter45
ID: 39988565
That worked perfectly! Thank you very much, I never considered that would have been the issue.

Have a great day,

CS
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

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 …
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…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

765 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