Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > Crystal Reports
|
Crystal Reports General discussion about Crystal Reports. For discussions specific to the book Professional Crystal Reports for VS.NET, please see the book discussion forum for that book.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Crystal Reports section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 20th, 2006, 02:49 PM
Authorized User
 
Join Date: Sep 2006
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default If statement with TOTEXT and Subscript

Greetings,

I have the fololowing code:

If totext (({OELIN.UNITPRICE}),7)(6)) = 0 then 3 else 7

Basically I want to see if the value in position 6 of unitprice is zero; if so I assign a value of 3, otherwise I assign a value of 7, what I assign these values to is unimportant. My error message is that when checking syntax I get "The keyword THEN is missing" and it points between the right parenthesis near the 7 and the left parenthesis of the 6.

All help is appreciated.

Paul

Paul
__________________
Paul
 
Old February 28th, 2007, 03:44 PM
Authorized User
 
Join Date: Dec 2004
Posts: 80
Thanks: 0
Thanked 0 Times in 0 Posts
Default

If mid(totext({OELIN.UNITPRICE}),7,6) = 0 then '3' else '7'
this is the right formula





Similar Threads
Thread Thread Starter Forum Replies Last Post
"Subscript out of range" in acFormPivotChart jilly Access VBA 0 April 23rd, 2008 08:52 PM
Subscript out of range rfrancisco Classic ASP Components 1 February 13th, 2006 08:25 PM
How do wirte a subscript Jayahar .NET Web Services 0 September 13th, 2005 08:17 AM
Subscript out of range crmpicco Classic ASP Basics 4 March 22nd, 2005 06:55 PM
A subscript must be between 1 and size of array raj03 Crystal Reports 1 July 8th, 2004 02:12 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.