Crystal Report Viewer Error The String Is Non Numeric
Contents |
Tips/Tricks Top Articles Beginner Articles Technical Blogs Posting/Update Guidelines Article Help Forum Article Competition Submit an article or tip Post your Blog quick
The String Is Non Numeric Details Errorkind Crystal Report
answersQ&A Ask a Question View Unanswered Questions View All Questions... C# a string is required here in crystal report questions Linux questions ASP.NET questions SQL questions VB.NET questions discussionsforums All Message Boards... Application Lifecycle> Running a
Crystal Reports Convert String To Number
Business Sales / Marketing Collaboration / Beta Testing Work Issues Design and Architecture ASP.NET JavaScript C / C++ / MFC> ATL / WTL / STL Managed C++/CLI C# Free Tools Objective-C and Swift Database Hardware & Devices> System Admin Hosting and Servers Java .NET Framework Android iOS Mobile SharePoint Silverlight / WPF Visual Basic Web Development Site Bugs / Suggestions Spam and Abuse Watch features Competitions News The Insider Newsletter The Daily Build Newsletter Newsletter archive Surveys Product Showcase Research Library CodeProject Stuff communitylounge Who's Who Most Valuable Professionals The Lounge The Insider News The Weird & The Wonderful The Soapbox Press Releases Non-English Language > General Indian Topics General Chinese Topics help What is 'CodeProject'? General FAQ Ask a Question Bugs and Suggestions Article Help Forum Site Map Advertise with us About our Advertising Employment Opportunities About Us Ask a Question All Questions All Unanswered FAQ How to fix the error "The string is non -numeric" in crystal report? Rate this: Please Sign up or sign in to vote. See more: VB VB.NET CrystalReports Hi, While running the crystal report, for some values there is a "String is non-numeric"exception. I have tried the code - If IsNull({GL_PayableStatement.RemainingBalance}) OR {GL_PayableStatement.RemainingBalance}="" OR {GL_PayableStatement.RemainingBalance}="0" then 0 ELse ToNumber( {GL_PayableStatement.RemainingBalance}) But still the error is there! Please help me. Posted 7-May-14 20:24pm Chaithannya417 Add a Solution Comments Maciej Los 8-May-14 2:52am Use: IsNullOrWhiteSpace[^] and also IsNumeric[^] 1 solution Rate this: Please Sign up or sign in to vote. Solution 1 A
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users 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 minute: Sign up 'The string is non-numeric' error in a crystal reports Formula up vote 0 down vote favorite I http://www.codeproject.com/Questions/770447/How-to-fix-the-error-The-string-is-non-numeric-in have put a formula to display the value of a field after masking it in crystal reports. but it shows me an error 'The string is non-numeric' in cardno variable. Following is code of my formula: StringVar cardno; NumberVar current_len; NumberVar card_len; NumberVar start; NumberVar last; StringVar ca; card_len := ToNumber (Mid ({@lens},1,2)); start := ToNumber (Mid ({@lens},3,2)); last := ToNumber (Mid ({@lens},5,2)); current_len := Length (Trim (ToText({CA.CA}, 0 ,''))); ca := http://stackoverflow.com/questions/11016125/the-string-is-non-numeric-error-in-a-crystal-reports-formula ReplicateString("0",card_len-current_len) + Totext({CA.CA},0,''); If card_len > current_len Then If start = 0 Then If last <= 1 Then cardno := Mid(ca, last, card_len) Else cardno := ReplicateString("X",last-start-1) + Mid(ca, last, card_len) Else cardno := Mid (ca,1,start) + ReplicateString("X",last-start-1) + Mid(ca, last, card_len); Please provide a solution to avoid this error. Thanks in advance. crystal-reports share|improve this question asked Jun 13 '12 at 13:41 maddy2012 631314 Will you post an example of what the number resembles and the desired mask? –craig Jun 13 '12 at 18:32 I need cardno like " cardno= XXXXXX1234 ". –maddy2012 Jun 14 '12 at 5:22 Is the string's length constant? Or what are the valid lengths? –craig Jun 14 '12 at 16:03 Also, what is the @len formula based on? Is it possible that the formula can be null or not start with at least 6 numeric characters? I've only seen the error you're getting from a ToNumber() function call. –Ryan Jun 15 '12 at 15:16 So, you want to mask all but the last 4 digits of a string representation of number (presumably a credit-card number)? My answer will do just that. –craig Jun 15 '12 at 19:41 add a comment| 1 Answer 1 active oldest votes up vote
chudok Groupie Joined: 18 May 2010 Online Status: Offline Posts: 58 Topic: the string is non-numericPosted: 27 Jun 2011 at 9:13am I have the following formula. I am having to upgrade our MRP system and one http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=13610 of my custom reports has the following error in this code (the red highlighted section: the string is non-numeric - how do I put in a if null then 0 statement to this?NumberVar CAT4;IF {SY0_CompanyParameters.ARAgeByDayOrMonth} = "D" Then NumberVar CAT4:=ToNumber({SY0_CompanyParameters.ARAgingCategory4})Else NumberVar CAT4:=120 ;IF {@agedate}-{@InvOrDueDate} >= NumberVar CAT4 THEN {AR_OpenInvoice.Balance}ELSE 0.00I've tried NumberVar CAT4:=if (isnull({SY0_CompanyParameters.ARAgingCategory4}))then 0 else(ToNumber({SY0_CompanyParameters.ARAgingCategory4}))Else NumberVar CAT4:=120 ;still get the same error Edited by crystal report chudok - 27 Jun 2011 at 9:15am IP Logged DBlank Senior Member Joined: 19 Dec 2008 Online Status: Offline Posts: 8522 Posted: 27 Jun 2011 at 9:24am more likely you have a value that is not numeric rather than null try a select statement to find which row it is choking on IP Logged chudok Groupie Joined: 18 May 2010 Online Status: Offline Posts: 58 Posted: the string is 27 Jun 2011 at 9:26am I am not sure how to do that.... can you help direct me in the right direction? It's been a while since I've used Crystal and I am a little rusty...... IP Logged DBlank Senior Member Joined: 19 Dec 2008 Online Status: Offline Posts: 8522 Posted: 27 Jun 2011 at 9:29am in the select expert try NOT(isnumeric({SY0_CompanyParameters.ARAgingCategory4})) IP Logged chudok Groupie Joined: 18 May 2010 Online Status: Offline Posts: 58 Posted: 27 Jun 2011 at 9:51am All I get back are blanks(null?). When Ibrowse the field data it comes back as String Type Length: 3 Not sure where to go from here..... IP Logged DBlank Senior Member Joined: 19 Dec 2008 Online Status: Offline Posts: 8522 Posted: 27 Jun 2011 at 9:54am in that case, in the formula editor do you have a pick list option in the expression editor to re: NULLS? Set it to "Default values for Nulls'. IP Logged chudok Groupie Joined: 18 May 2010 Online Status: Offline Posts: 58 Posted: 27 Jun 2011 at 10:01am Did that - same problem still"The string is non-numeric"Leave it at Crystal Syntax too? IP Logged DBlank Senior Member Joined: 19 Dec 2008 Online Status: Off