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 9th, 2004, 12:10 PM
Authorized User
 
Join Date: Jul 2004
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default Assigning string to a number field

Hi,

I have to assign string "NO" to a number field 'OfficialIndex' if the value is >= 32767 else I have to divide 'official index' by 10. when I code
If not ({dbplayers.officialindex} = 32767) then {dbplayers.officialindex}/10 else "NO"

it gives a syntax error saying a number is required in place of "NO". How can I assign this string to the field?

Thanks
 
Old December 9th, 2004, 12:49 PM
Authorized User
 
Join Date: Dec 2004
Posts: 80
Thanks: 0
Thanked 0 Times in 0 Posts
Default

try this
If not ({dbplayers.officialindex} = 32767) then
totext({dbplayers.officialindex}/10)
else "NO"
 
Old December 9th, 2004, 01:13 PM
Authorized User
 
Join Date: Jul 2004
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default

It worked!
Thanks Kondapally.
 
Old December 10th, 2004, 10:43 AM
Authorized User
 
Join Date: Dec 2004
Posts: 80
Thanks: 0
Thanked 0 Times in 0 Posts
Default

no prob.Any time.
Kavitha.





Similar Threads
Thread Thread Starter Forum Replies Last Post
getting the first non-zero number in a field elygp SQL Language 3 March 27th, 2008 03:57 AM
Separating parts of a string and assigning them to anubandh ASP.NET 1.0 and 1.1 Basics 1 May 12th, 2006 12:47 PM
how to replace a string with another string/number crmpicco Javascript How-To 4 March 14th, 2005 12:59 PM
Assigning value to string shabboleth Beginning PHP 4 December 29th, 2003 05:24 PM





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