PDA

View Full Version : Mid function



Rafael M Heise
19-May-2010, 02:18 PM
Does anyone using the MID function?

I was trying to use that, I first I think my FIELD was empty.

But I was testing, and my FIELD is not empty.

When I define a function like



return(mid({GE093.ASC_15}, 30))


It's returns "30", and if I change to




return(mid({GE093.ASC_15}, 15))


it's returns "15".

I want to get the value between 31 and 51 position. Or, the next 20 characteres begining at pos 31.

Can someone help me?

Jim Albright
19-May-2010, 03:36 PM
You need 3 arguments for the mid function

return (mid("my very short string",5,9)) ==> result is "short"

target string, # of characters, start position

Rafael M Heise
19-May-2010, 03:46 PM
Actually, I don't.

If you see the definition of MID, you can see "Mid(string,number[,number])", and it means you can suppress the start position.

However I have tried to use MID with all parameters (string, number of characteres and start position), but it doesn't work too.

I just attached a simple report, using the vendor.dat file from Order Entry, if you want to check what I'm trying to do. So simply.

3408

Vincent Oorsprong
20-May-2010, 12:13 AM
Rafael, others,

As you can see in the Visual Report Writer Users Guide the documentation of all VB like functions still needs to be done. We will work on that and reveal also what is allowed, possible etc.

Rafael M Heise
20-May-2010, 08:54 AM
Where I can get this Users Guide? I can't find it.

Well, I really understand this is a RC, and there are things not working yet. So I have reported what I think is important to report here. :D

And this is an important thing, because MID function must work, I guess.

Rafael M Heise
20-May-2010, 09:27 AM
I'm sorry.

I found it!