Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: problem with matrix Post Reply Post New Topic
Author Message
rozpalacz
Newbie
Newbie


Joined: 15 Jul 2010
Online Status: Offline
Posts: 5
Quote rozpalacz Replybullet Topic: problem with matrix
     Posted: 15 Jul 2010 at 10:22pm
I am using a matrix report. Column type is string. I have a different values: sometimes '123' sometimes 'textabc'.

but when I try to do sht like this:

if NumericText({db.value})
    then
       "number"
else
    "string"

it always check only the first record (i think) and if there is 'textabc' everything in that column is string. and in reverse, if there is '123' everything is 'number'.

How can I get 'string' value where is 'textabc', and number where is '123' ?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 16 Jul 2010 at 3:06am
You cannot mix data types in the same result field
You would have to split these into 2 different formulas
Number;
if NumericText({db.value}) then tonumber({db.value}) else 0
 
Text:
if NumericText({db.value}) then "" else {db.value}



Edited by DBlank - 16 Jul 2010 at 3:07am
IP IP Logged
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