Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Need help with formula to get data from an array Post Reply Post New Topic
Author Message
jennifer_falcon
Newbie
Newbie
Avatar

Joined: 15 Jan 2009
Online Status: Offline
Posts: 35
Quote jennifer_falcon Replybullet Topic: Need help with formula to get data from an array
    Posted: 10 Nov 2010 at 4:30am
Good Day,

I have a DB2 database I am trying to retrieve data from. The database field I
need to get data from is an array called num.changes.array. When the field is displayed on the report, it looks like this:
{"1","2","26","34"}

The field can contain no info (so it is displayed like this: {}) or it can contain quite a few numbers.

I need to be able to get the numbers out to be able to add them in another formula.

I have the formula I need to add the information from the field, but I can't get the num.changes.array information out.

I have been trying formulas like this:

numberVar i := 0;
numberVar j := 0;
stringVar out := "";
stringVar array test := split({Tasks_.Num Changes Array},""", """);
i := ubound(test);
if i > 0 then
   for j := 1 to i step 1 do
        out := out + test[j] ;
Left ((TrimLeft (out)),20);

but all I get is the same data that is already stored in the field.

Can someone help me tweak my formula?
Thanks!






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.031 seconds.