BOB: Business Objects Board
Not endorsed by or affiliated with SAP

Register | Login 

Want to sponsor BOB? 
Want to sponsor BOB? (Opens a new window)  

General Notice: No events within the next 45 days.

Help with Report Formula


 
Search this topic... | Search Crystal Reports... | Search Box
Register or Login to Post    Forum Index -> Building Reports -> Crystal Reports  Previous TopicPrint TopicNext Topic
Author Message
CindiPratt
Forum Member
Forum Member



Joined: 13 Dec 2018

Posts: 1



PostPosted: Thu Dec 13, 2018 11:57 am 
Post subject: Help with Report Formula

Hello -

I have the formula listed below and there are 3 sections to it. Each section reports the correct number when individually on its own, but when all 3 sections are combined nothing works after the first section. I can move the sections around and still only the first section works. It's like it doesn't read the remainder of the lines.

How can I make these all work in 1 field? I put dashed lines in to represent each section, these are not in my code.


if {FullDW.F2626} = "Banked - Retail" and {FullDW.F1401} = "Renovation Con" then ((({FullDW.F2218}-100)/100*{FullDW.F2})+(({FullDW.NEWHUD_X794}+{FullDW.NEWHUD_X686})-{FullDW.CD2_XSTLC})+({FullDW.NEWHUD_X1151}+{FullDW.NEWHUD_X1152})-1975)-{FullDW.F454} else
if {FullDW.F2626} = "Banked - Retail" and {FullDW.F1401} = "Construction L" or {FullDW.F1401} = "Construction C" or {FullDW.F1401} = "Construction F"then ((({FullDW.F2218}-100)/100*{FullDW.F2})+(({FullDW.NEWHUD_X794}+{FullDW.NEWHUD_X686})-{FullDW.CD2_XSTLC})+({FullDW.NEWHUD_X1151}+{FullDW.NEWHUD_X1152})-2275)-{FullDW.F454} else
If {FullDW.F2626} = "Banked - Retail" and {FullDW.F1401} <> "Construction L" or {FullDW.F1401} <>"Construction C" or {FullDW.F1401} <> "Construction F" or {FullDW.F1401} <> "Renovation Con" then((({FullDW.F2218}-100)/100*{FullDW.F2})+(({FullDW.NEWHUD_X794}+{FullDW.NEWHUD_X686})-{FullDW.CD2_XSTLC})+({FullDW.NEWHUD_X1151}+{FullDW.NEWHUD_X1152})-1125)

-------------------------------------------------------------------------------------

if ({FullDW.F2626} = "Correspondent" and {FullDW.F1401} = "Renovation Con") then (((({FullDW.F3714}-100)*{FullDW.F2})/100)+({FullDW.NEWHUD_X686}+{FullDW.NEWHUD_X794}-790)-((({FullDW.F2203}-100)*{FullDW.F2})/100)-{FullDW.NEWHUD_X1151}-{FullDW.NEWHUD_X1152}-850)- {FullDW.F454} else
if ({FullDW.F2626} = "Correspondent" and {FullDW.F1401} = "Construction C") then (((({FullDW.F3714}-100)*{FullDW.F2})/100)+({FullDW.NEWHUD_X686}+{FullDW.NEWHUD_X794}-790)-((({FullDW.F2203}-100)*{FullDW.F2})/100)-{FullDW.NEWHUD_X1151}-{FullDW.NEWHUD_X1152}-1150) - {FullDW.F454} else
if ({FullDW.F2626} = "Correspondent" and {FullDW.F1401} <> "Construction C" or {FullDW.F1401} <> "Renovation Con") then ((({FullDW.F3714}-100)*{FullDW.F2})/100)+({FullDW.NEWHUD_X686}+{FullDW.NEWHUD_X794}-790)-((({FullDW.F2203}-100)*{FullDW.F2})/100)-{FullDW.NEWHUD_X1151}-{FullDW.NEWHUD_X1152}

-------------------------------------------------------------------------------------

if {FullDW.F2626} = "Banked - Wholesale" and {FullDW.F1401} = "Renovation Con" then (((({FullDW.F3714}-100)*{FullDW.F2})/100)-((({FullDW.F2203}-100)*{FullDW.F2})/100)-{FullDW.CD2_XSTLC}-{FullDW.NEWHUD_X1151}-{FullDW.NEWHUD_X1152}-850) - {FullDW.F454} else
if {FullDW.F2626} = "Banked - Wholesale" and {FullDW.F1401} = "Construction F" then (((({FullDW.F3714}-100)*{FullDW.F2})/100)-((({FullDW.F2203}-100)*{FullDW.F2})/100)-{FullDW.CD2_XSTLC}-{FullDW.NEWHUD_X1151}-{FullDW.NEWHUD_X1152}-1150) - {FullDW.F454} else
if {FullDW.F2626} = "Banked - Wholesale" and {FullDW.F1401} <> "Construction F" or {FullDW.F1401} <> "Renovation Con" then ((({FullDW.F3714}-100)*{FullDW.F2})/100)-((({FullDW.F2203}-100)*{FullDW.F2})/100)-{FullDW.CD2_XSTLC}-{FullDW.NEWHUD_X1151}-{FullDW.NEWHUD_X1152}

Any help would be greatly appreciated!
Back to top
kevlray
Forum Associate
Forum Associate



Joined: 23 Jun 2010

Posts: 962
Location: California


flag
PostPosted: Thu Dec 13, 2018 5:58 pm 
Post subject: Re: Help with Report Formula

I do not not what results you are expecting. But once you get a true in the if statement, the rest of the statement will not be processed.
Back to top
MikeVT
Forum Member
Forum Member



Joined: 07 Feb 2019

Posts: 1



PostPosted: Thu Feb 07, 2019 2:40 pm 
Post subject: Re: Help with Report Formula

Try adding "else" to the end of the first 2 sections and see if that helps with your formula. That should allow it to continue to calculate all the different sections you have.
Back to top
Display posts from previous:   
Register or Login to Post    Forum Index -> Building Reports -> Crystal Reports  Previous TopicPrint TopicNext Topic
Page 1 of 1 All times are GMT - 5 Hours
 
Jump to:  

Index | About | FAQ | RAG | Privacy | Search |  Register |  Login 

Get community updates via Twitter:

Not endorsed by or affiliated with SAP
Powered by phpBB © phpBB Group
Generated in 0.0275 seconds using 17 queries. (SQL 0.0027 Parse 0.0008 Other 0.0239)
CCBot/2.0 (https://commoncrawl.org/faq/)
Hosted by ForumTopics.com | Terms of Service
phpBB Customizations by the phpBBDoctor.com
Shameless plug for MomentsOfLight.com Moments of Light Logo