Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: use of split Post Reply Post New Topic
Author Message
spalmer
Newbie
Newbie


Joined: 10 Apr 2014
Location: United States
Online Status: Offline
Posts: 1
Quote spalmer Replybullet Topic: use of split
    Posted: 10 Apr 2014 at 5:58am
I have a failing function that worked in Crystal 11
but is failing in Crystal 2008. I am trying to return the "User" to my report.
The formula is:
whileprintingrecords;
stringvar name:= split ({Command.host},"=")[2];
name:=split(name,",")[1];
name

The string data is "User=ann,ProcID=13368,Host=APP-MNI"
The string is defined as text 128 characters long.

The error I can't get beyond reads:
A subscript must be between 1 and the size of the array
The line highlighted is
stringvar name:= split ({Command.host},"=")[2];
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 10 Apr 2014 at 7:44am
I believe this has to do with your data source.
Some values in your Host field do not have a "=" character in it.
You have to decide how you want to handle that.


Edited by DBlank - 10 Apr 2014 at 7:45am
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.030 seconds.