Skip to Content
author's profile photo Former Member
Former Member

Crystal report split function using multiple if condition getting error

Hi,

My Database string field contains value like below

EZ:0,08

COTRY:0,07

POS:0,1

for the above string value should be spitted and print into report

I want output below each formula output

Line1 = EZ

Line2 =COTRY

Line3 = POS

Line1Value = 0,08

Line2Value = 0,07

Line3Value = POS



I did for Line1 formula like:

stringVar array Size := Split({Results;1.StringValue},Chr(13) + Chr(10));

if UBound(Size)>=1 then

Split(Split ({Results;1.StringValue}, Chr(13) + Chr(10))[1], ':')[1]

else "";


Line2 formula like:


stringVar array Size := Split({Results;1.StringValue},Chr(13) + Chr(10));

if UBound(Size)>=1 then

Split(Split ({Results;1.StringValue}, Chr(13) + Chr(10))[2], ':')[1]

else "";


No issue on above formula's

But,

formula line1Value :

stringVar array Size := Split({Results;1.Value},Chr(13) + Chr(10));

if UBound(Size)>=1 then

Split(Split ({Results;1.StringValue}, Chr(13) + Chr(10))[1], ':')[2]

else "";

formula line2Value :

stringVar array Size := Split({Results;1.Value},Chr(13) + Chr(10));

if UBound(Size)>=1 then

Split(Split ({Results;1.StringValue}, Chr(13) + Chr(10))[2], ':')[2]

else "";

My problem is line1value, Line2value formula' s getting error if stringvalue field having "dgjkdfg, 12333"

i tried top second split also put into another array, unfortunately i am getting error

can you please help on this....!!

This is the formula i tried got error, if stringvalue field having " "dgjkdfg, 12333"

stringVar array Size := Split({eusp_e5_eLIMS_FG50_Report_AnalyticalReport_Walmart_Test_Results;1.specificLimitStringValue},Chr(13) + Chr(10));

stringVar array Data := if UBound(Size)>=1 then Split(Size[1], ':')

else ""

if UBound(Data)>=2 then Data[2]

else "";

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Dec 15, 2014 at 03:21 PM

    Hi Sankar,

    What do you wish to display for strings like these : "dgjkdfg, 12333"?

    -Abhilash

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.