?
Solved

Crystal Reports 2008

Posted on 2011-10-03
9
Medium Priority
?
267 Views
Last Modified: 2012-05-12
I am trying to create a report using Crystal Reports 2008.
For my end result, I want the loans grouped by:
1.Lien Position
a.1st
b.2nd
then by:
2.@Adjustable
a.Fixed Rate
b.Balloon/Hybrid
c.Adjustable Rate (<= 1yr)
d.Adjustable Rate(> 1yr)
Then by:
3.@Type
a.> 15yrs
b.<= 15yrs
c.> 5yrs
d.<= 5yrs
Part of the report should look like this:
                                                    # of loans             Amount
First Mortgages
      Fixed Rate
                               >15yrs                  500            50,000,000
                               15 yrs or less      1,000        60,000,000
      Balloon/Hybrid
                                 >5yrs                  10               500,000
                                  5 yrs or less     50              1,000,000
      Adjustable Rate
                              1yr or less            20              2,000,000
                             >1 yr                       100            10,000,000
Other Real Estate (2nd liens)
      Closed End Fixed                      400            10,000,000
TOTAL                                                 2,080      133,500,000

Here is the code that I have for @Adjustable:
if {stored procedure;1.LienPosition}="1"  then
    if isnull({stored procedure;1.BalloonPayDt}) then
        if  {stored procedure;1.LoanPayType}="F"  then
           "Fixed Rate"
        Else IF {@DaystoRateChange}=0  then
           "Other"
        Else If {@DaystoRateChange}<=12 then
           "Adjustable Rate 1 yr or less"
        Else
           "Adjustable Rate > 1 yr"
    Else
        "Balloon/Hybrid"
Else If isnull({stored procedure;1.FirstRateChgDt}) then
     "Closed-end Fixed Rate"
Else
      "";

@YrsToMaturity code:
iif({@Balloon}= "Other",{stored procedure;1.LoanTerm}/12,
datediff("d",{stored procedure;1.DueDtFirstPay},{storedprocedure;1.BalloonPayDt})/365)

@Balloon code:
iif(isdate(cstr({stored procedure;1.BalloonPayDt})),"Balloon","Other")

@Type code:
if {@Adjustable}= "Fixed Rate" then
   if {@YrsToMaturity}> 15 then
        "> 15 Years"
   Else "15 Years or less"
Else If {@Adjustable}="Balloon/Hybrid" then
        if {stored procedure;1.LienPosition}="participation" or {@YrsToMaturity}>5 then
            "> 5 Years"
    Else "5 Years or less"
Else "";
I am at the @Type formula and the results I am getting are only results for the Balloon/Hybrid section and showing if the loans are > 5 years or if they are 5 years or less. All the other categories have them falling under “Other”. I am inserting groups for Lien position, Adjustable and Type and specify an order within the groups. I am not too familiar with Crystal Reports and any help would be greatly appreciated.  
0
Comment
Question by:moni81011
9 Comments
 
LVL 101

Expert Comment

by:mlmcc
ID: 36906575
Do you get any Fixed Rate records for @Adjustable?

mlmcc
0
 
LVL 4

Expert Comment

by:musalman
ID: 36906708
can you attach the report
0
 

Author Comment

by:moni81011
ID: 36910167
I did get fixed rate results with the @adjustable, thank you.  Everything seems to be displaying correctly besides separating the fixed rate section between "> 15 Years" and  "15 Years or less".  They are all still combined into one.  So I was thinking my IF THEN and ELSE may be in the wrong place or it is just wrong somehow.

if {@Adjustable}= "Fixed Rate" then
   if {@YrsToMaturity}> 15 then
        "> 15 Years"
   Else "15 Years or less"
Else If {@Adjustable}="Balloon/Hybrid" then
        if {CallReportRealEstateNoBusiness_sp;1.LienPosition}="participation" or {@YrsToMaturity}>5 then
            "> 5 Years"
    Else "5 Years or less"
Else "";

If you need a screen shot of the report and what it looks like, let me know.
Thank you.
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 101

Expert Comment

by:mlmcc
ID: 36910541
Are there mortgage for less than 15 years?

mlmcc
0
 

Author Comment

by:moni81011
ID: 36910718
Yes sir.
0
 
LVL 101

Accepted Solution

by:
mlmcc earned 1000 total points
ID: 36911224
Are there reports where the BalloonPayDt is null?

If so you need to test for that in the @Ballon code.

mlmcc
0
 

Author Comment

by:moni81011
ID: 36912697
I got it. For some reason it didn't like the formula in the @balloon. I thought because it said if there is a date put "balloon", else "other". Well I changed it to say if it is null "other" else "balloon" and it worked. Thank you for telling me to take a look at that formula!
0
 

Author Closing Comment

by:moni81011
ID: 36912713
Thank you for all your help mlmcc!!!
0
 
LVL 35

Expert Comment

by:James0628
ID: 36916021
The problem is that if CR hits a null field in a formula, it just stops evaluating the formula at that point and the formula produces no value.  To avoid that, you can use the IsNull function to test the field _first_, before you do anything else with that field in that formula.

 Another option is to go to File > "Report Options" and set the "Convert Database NULL Values to Default" option, which will replace nulls in pretty much every formula in the report, except the record selection formula.  More recent versions of CR also have an option in the formula editor for how that specific formula will handle nulls.

 James
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question