cancel
Showing results for 
Search instead for 
Did you mean: 

getting first record in a concatenating string

Former Member
0 Kudos

Hi

I have the formula for my string but unfortunately it does not display the first record.

Can someone suggset me what should be done::

StringVar x;

if previousIsNull({Query1.1}) or ({Query1.1} <> previous({Query1.1}) ) then

x := {Query1.2}

else

x := x + "," + {Query1.2};

x

Thanks

Robinn

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hmm, not sure, but perhaps you need to evaluate OnFirstRecord instead of/in addition to the PreviousIsNull (they probably aren't the same)?

If that's of no use, throw us some sample data and expected output and we'll see what we can do...

StringVar x;
if onFirstRecord = true or previousIsNull({Query1.1}) or ({Query1.1} previous({Query1.1}) ) then
x := {Query1.2}
else
x := x + "," + {Query1.2};
x

Edited by: Jaime Hargreaves on May 6, 2009 12:47 PM - Added a code snippet

Answers (0)