Crystal Report Formula Error A Number Is Required Here
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies a string is required here in crystal report formula of this site About Us Learn more about Stack Overflow the company page number in crystal report formula Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users
A Boolean Is Required Here Crystal Report Error
Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a
Crystal Report Formula Editor
minute: Sign up Crystal report “a number is required here” up vote 0 down vote favorite I am writing some formulas in crystal reports. I have a field that may contain a numeric value, in which case I am doing some calulation on it, or it may contain a string value, in which case it should be returned verbatim. So I thought crystal report formula date format this should work: If Result.entry contains a number, then put that numeric value into Result, else just return Result.entry: Local NumberVar Result := 0; if NumericText({RESULT.ENTRY}) // may be N.D. or B.L.D. then ( Result:=val({RESULT.ENTRY});) else ( {RESULT.ENTRY} ); ); // something more going on here that at last returns some value But no..."A number is required here" says CR and highlights the block following else... Any clue at all to what Crazy, sorry Crystal Reports wants here and why this is not acceptable? I've even tried to set a value and report that afterwards, (as per Crystal report if then help, how to return a string or variable with formula) but I still get the same error. else ( 0 ); works - but that is definately not what I want. (the other return value from this function is also a string) crystal-reports share|improve this question edited Mar 20 '15 at 11:05 asked Mar 20 '15 at 10:58 MortenSickel 1,18511025 what is "else ({RESULT.ENTRY} )" for? –Emanuele Greco Mar 20 '15 at 11:08 add a comment| 1 Answer 1 active
sallyjenkins Newbie Joined: 24 Jun 2014 Location: United States Online Status: Offline Posts: 6 Topic: A Number is required here - error messagePosted: 07 Jul
Crystal Report Formula Field
2014 at 11:14am I am using Crystal Reports 11.5 and Crystal Reports crystal report formula field select statement syntax. I am reading from a SQL DB Here are the SQL Field types. {AckParagraphs.AckParagraphBlurb} is a crystal report formula syntax VarChar(Max) {AckParagraphs.AckParagraphNum} is a nchar(5) ParaNum is a Global NumberVar set to 999 in the group header. The purpose of this formula is to print each detail http://stackoverflow.com/questions/29164930/crystal-report-a-number-is-required-here line until a blank field is reached. When the record with the blank field is read I want the variable set to the paragraph number. This variable will be used in other formulas when printing records. This formula is throwing and error on the 2nd 'If' "A number is required here. If isNull({AckParagraphs.AckParagraphBlurb}) THEN ParaNum := ToNumber({AckParagraphs.AckParagraphNum}) http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=20867 Else If ParaNum = 999 THEN {AckParagraphs.AckParagraphBlurb}I'm at a total loss. SAJ IP Logged DBlank Senior Member Joined: 19 Dec 2008 Online Status: Offline Posts: 8522 Posted: 07 Jul 2014 at 12:04pm all possible results from a formula must return the sama data type You don't have to display your formula field to use it in another formula IP Logged sallyjenkins Newbie Joined: 24 Jun 2014 Location: United States Online Status: Offline Posts: 6 Posted: 07 Jul 2014 at 12:12pm If I understand correctly, this is blowing up because I am displaying the {AckParagraphs.AckParagraphBlurb} - correct?If that is so, then perhaps I should not set ParaNum to a Numbervar. The ParaNum is then set to {AckParagraphs.AckParagraphNum} (a string value, not changed to a number value).am I getting warm? SAJ IP Logged DBlank Senior Member Joined: 19 Dec 2008 Online Status: Offline Posts: 8522 Posted: 08 Jul 2014 at 3:52am yes. they both need to be a string or numeric and clearly the numeric won't work for the blurb. However, n
If Statement - "A number is required here" If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before http://www.vbforums.com/showthread.php?268734-RESOLVED-Crystal-Reports-If-Statement-quot-A-number-is-required-here-quot you can post: click the register link above to proceed. To start viewing https://www.experts-exchange.com/questions/24301942/Crystal-Reports-Formula-Error-'A-Number-is-Required-Here'.html messages, select the forum that you want to visit from the selection below. Results 1 to 3 of 3 Thread: [RESOLVED]Crystal Reports - If Statement - "A number is required here" Tweet Thread Tools Show Printable Version Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode Nov crystal report 19th, 2003,04:44 PM #1 Jefftopia View Profile View Forum Posts Thread Starter Addicted Member Join Date Jun 2002 Location Sunny Scottsdale Arizona Posts 254 [RESOLVED]Crystal Reports - If Statement - "A number is required here" if ({ado.LIB_Spread}/100) > 0 then ({ado.LIB_Spread}/100) else "NA" I am getting the following error message when I attempt to use this formula in my report: "A number is required here" It then crystal report formula places focus on the "else 'NA'" portion of my formula. I have tried a number of things, including converting the statement to a string and checking if the length > 0. Nothing has proved successful. If statement does not seem to want to allow both an outcome of a number and a string in the same statement. IMPORTANT NOTE: {ado.LIB_Spread} could either be a number or a null value. Anyone? Last edited by Jefftopia; Nov 20th, 2003 at 02:22 PM. Reply With Quote Nov 19th, 2003,04:54 PM #2 techgnome View Profile View Forum Posts PowerPoster Join Date May 2002 Posts 29,763 Well.... The sort of it is that your IF has to return the SAME DATA TYPE for both parts..... Which is simple enough.... Code: if ({ado.LIB_Spread}/100) > 0 then ToText({ado.LIB_Spread}/100) else "NA" Should work. BUT... The rest of your comment tells me that this may not work. Because NULL divided by a number is still NULL... it can't be compared to 0.... So.....What you need to do is first check for the NULL.... Code: if IsNull({ado.LIB_Spread}) then "N/A" else if ({ado.LIB_Spread}/100) > 0 then ToText({ado.LIB_Spread}/100) else "NA" TG * I don't respond to private (PM) requests for
for Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help Ask a Question Ask for Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help Expand Search Submit Close Search Login Join Today Products BackProducts Gigs Live Careers Vendor Services Groups Website Testing Store Headlines Experts Exchange > Questions > Crystal Reports Formula Error 'A Number is Required Here' Want to Advertise Here? Solved Crystal Reports Formula Error 'A Number is Required Here' Posted on 2009-04-07 Crystal Reports 1 Verified Solution 3 Comments 2,806 Views Last Modified: 2012-05-06 Hi, I'm trying to construct a very simple formula in Crystal Reports that will only display the value if it is greater than zero. This is the formula I have: - If {Client.Units} <> 0 then {Clients.Units} else "" I get 'A number is required here' error. Have tried this too: - If {Clients.Units} = 0 then "" else {Clients.Units} For this I get a 'String is Required Here' error! I'm sure this is very simple to resolve but I'm relatively new to Crystal and any help would be greatly appreciated. Thanks in advance. 0 Question by:bdoshuk Facebook Twitter LinkedIn Google LVL 77 Best Solution bypeter57r The outputs from an if..then..else.. must be the same datatype - all strings, all numbers, all dates or whatever. In this case you do not need a formula field at all. You right-click the Units field Go to Solution 3 Comments LVL 77 Overall: Level 77 Crystal Reports 34 Message Accepted Solution by:peter57r2009-04-07 The outputs from an if..then..else.. must be the same datatype - all strings, all numbers, all dates or whatever. In this case you do not need a formula field at all. You right-click the Units field and choose Format Field. You can then check the Suppress when zero option which you will find on the Customize button of the Number tab. 0 LVL 10 Overall: Level 10 Crystal Reports 9 Message Expert Comment by:dougvarga2009-04-07 Becuase {Clients.Units} is a number, the "else" clause must also return a number. If you are trying to suppress this field if zero, you should use a number format instead. Place the {Clients.Units} on