Crystal Report Error Result Selection Formula Must Boolean
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 Crystal Reports Formula Workshop boolean condition to string up vote 1 down vote favorite I'm currently trying to create a report using Crystal Reports that comes with Visual Studio 2008. I would like to include a field of type boolean on my report that shows a string rather than true or false. The string should contain either contain a € or a % sign. How would I go about doing this in the Formula Workshop? I've tried things like e.g. if {tblAankoopDetails.SoortKorting} = true then "€" else "%" However this never seems to work and results in warnings such as "The formula result must be a number". This should be fairly simple but this is my first go at using Crystal Reports. Help would be much appreciated. Jay string crystal-reports boolean share|improve this question edited May 12 '10 at 4:26 Anonymoose 2,67212137 asked Apr 14 '10 at 21:06 Jay 6114 add a comment| 2 Answers 2 active oldest votes up vote 1 down vote Make sure your SoortKorting field has always true or false. Maybe there's a null and in that case your formula will not work. Try with this: if isnull({tblAankoopDetails.SoortKorting} ) then " " else if {tblAankoopDetails.SoortKorting} =true then "€" else "%" share|improve this answer answered Apr 14 '10 at 21:19 Claudia 45327 As you suggested there currently are fields containing a null. I obviously hadn't thought about catching that exception if you hadn't mentioned it. What you suggested works like a charm, even without the code preceding 'else'. I think what I did wrong was try to format edit the actual boolean text field rather than create a formula from scratch and drag that onto the report. In short, thank you very much for your swift reply including bonus suggestion :) Much appreciat
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 > The result of selction formula must be a boolean Want to Advertise Here? Solved The result of selction formula must be a boolean Posted on 2007-10-30 Crystal Reports 2 Verified Solutions 6 Comments 4,191 Views Last Modified: 2015-12-17 Hi, I am not familiar with that: In crystal report, I http://stackoverflow.com/questions/2641044/crystal-reports-formula-workshop-boolean-condition-to-string am having this error when I type that formula : if isnull({vgPoeDetail.ItemDe
Join INTELLIGENT WORK FORUMSFOR COMPUTER PROFESSIONALS Log In Come Join Us! Are you aComputer / IT professional?Join Tek-Tips Forums! Talk With Other Members Be Notified Of ResponsesTo Your Posts http://www.tek-tips.com/viewthread.cfm?qid=687129 Keyword Search One-Click Access To YourFavorite Forums Automated SignaturesOn Your Posts Best Of All, It's Free! Join Us! *Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in http://www.vbforums.com/showthread.php?257262-Crystal-Reports-Formula-Error to receive e-mail. Posting Guidelines Promoting, selling, recruiting, coursework and thesis posting is forbidden.Tek-Tips Posting Policies Jobs Jobs from Indeed What: Where: jobs by Link To This Forum! Add Stickiness To crystal report Your Site By Linking To This Professionally Managed Technical Forum.Just copy and paste the BBCode HTML Markdown MediaWiki reStructuredText code below into your site. Business Objects: Crystal Reports 1 Formulas Forum at Tek-Tips HomeForumsProgrammersReporting SolutionsBusiness Objects: Crystal Reports 1 Formulas Forum formula error"The result of selection formula must be boolean" thread767-687129 Forum Search FAQs Links MVPs formula error"The result of selection formula crystal report error must be boolean" formula error"The result of selection formula must be boolean" dfwcharles (TechnicalUser) (OP) 22 Oct 03 10:56 I tried this formula, and got the error listed above.if Length({equipment.eqnum}) = 9thenleft ({equipment.eqnum},3)elseleft({equipment.eqnum},4)I just want to show the frist 3 characters of my field if the data length is 9. Otherwise show the frist 4 characters.Any help would be appreciated.Thanks RE: formula error"The result of selection formula must be boolean" MJRBIM (MIS) 22 Oct 03 11:08 IF Length({equipment.eqnum})= 9 THEN left({equipment.eqnum},3) ELSE left({equipment.eqnum},4)It works fine for me.... RE: formula error"The result of selection formula must be boolean" Madawc (Programmer) 22 Oct 03 11:10 Crystal thinks the formula is a boolian, one-bit, true or false.I've had this before in Crystal 8.5 and found the easiest solution was to re-do the code in a new formula field.If there's a cleverer answer, I'd be interested to hear it. Madawc WilliamsEast Anglia, Great Britain RE: formula error"The result of selection formula must be boolean" dfwcharles (TechnicalUser) (OP) 22 Oct 03 11:18 I'm sorry I should have specified this is a "record selection formula". It does work in the regular formula editor.T
is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. Results 1 to 6 of 6 Thread: Crystal Reports Formula Error Tweet Thread Tools Show Printable Version Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode Aug 11th, 2003,10:27 AM #1 adsc View Profile View Forum Posts Visit Homepage Thread Starter Lively Member Join Date Nov 2002 Location Kuwait Posts 71 Crystal Reports Formula Error Dear All, When I type this formula in the formula editor
if {AN_PaymentDtl.ServiceType} = "N" then "New" else "Old"I get this error: “The result of selection formula must be a Boolean” Thank u for the help <><><><><><><><><><><><><><><><><><> <><> REMEMBER,,,,KNOWLEDGE IS POWER <><> <><><><><><><><><><><><><><><><><><> Reply With Quote Aug 11th, 2003,10:32 AM #2 Lunatic3 View Profile View Forum Posts Frenzied Member Join Date Oct 2002 Location Gammapolis Posts 1,474 The error says it all. In some cases you should use a True/False formula, and this seems to be the case. Where are you using your formula? 'Heading for the automatic overload' Marillion, Brave, The Great Escape, 1994 'How will WE stand the FIRE TOMORROW?' Eloy, Silent Cries and Mighty Echoes, The Vision - Burning, 1979 Reply With Quote Aug 11th, 2003,10:41 AM #3 adsc View Profile View Forum Posts Visit Homepage Thread Starter Lively Member Join Date Nov 2002 Location Kuwait Posts 71 Lunatic3, thank you for your reply. I am using the formula inside the CR report in one of the feilds, I selected the filed then selected the "Select Expert", then selected "Formula". This field contain one of 2 letters only, "N" for