Find it EZ

Location: Local or Network Folders
Host: FINDITEZ-T460P
Path: C:\Users\ken\Documents\Test Cases\SSRS\Form Letter2.rpt

Report Information
    Version:    11.0
    Author:    George Peck
    Comments:    Form letter demonstrating several techniques used for text and formula manipulation
    Title:    Form Letter
    Printer:    Brother DCP-7030 Printer

Main Body

    Data Sources

        Source:    Connection #1
            Database DLL:    crdb_odbc.dll
            Database Type:    ODBC (RDO)
            Server:    Xtreme Sample Database 11.5

            Properties:    QE_LogonProperties
                DSN:    Xtreme Sample Database 11.5
                UseDSNProperties:    False
            QE_SQLDB:    True
            SSO Enabled:    False

    Report Parameters

        Parameter:    Ending Period
            Data Type:    String
            List Type:    Static

    Tables

        Table:    Customer
            Connection:    Connection #1
            Used Columns:    {Customer.Customer Name} : String[82]
                             {Customer.Contact First Name} : String[62]
                             {Customer.Contact Last Name} : String[62]
                             {Customer.Contact Title} : String[12]
                             {Customer.Contact Position} : String[62]
                             {Customer.Last Year's Sales} : Number
                             {Customer.Address1} : String[122]
                             {Customer.Address2} : String[42]
                             {Customer.City} : String[42]
                             {Customer.Region} : String[62]
                             {Customer.Country} : String[62]
                             {Customer.Postal Code} : String[22]

    Record Selection Formulas
        Formula:    {Customer.Country} In ["USA", "Japan", "China", "Canada", "France", "Italy", "Australis"]

    Formula Fields

        Field:    Contact Name
            Formula:    {Customer.Contact Title} & " " & {Customer.Contact First Name} & " " &
                        {Customer.Contact Last Name} & ", " & {Customer.Contact Position}

        Field:    City State Zip
            Formula:    {Customer.City} & ", " & {Customer.Region} & "  " & {Customer.Postal Code}

        Field:    Salutation
            Formula:    "Dear " & {Customer.Contact Title} & " " & 
                        {Customer.Contact Last Name} & ","

        Field:    First Line
            Formula:    "Thanks for purchasing " & ToText({Customer.Last Year's Sales},0) &
                        " in merchandise last year."

        Field:    Sales Goal
            Formula:    CurrencyVar Goal;
                        Select {Customer.Last Year's Sales}
                            Case 0 to 10000: //Boost sales to 25K + 20% of last years sales
                                Goal := {Customer.Last Year's Sales} * 1.2 + 25000
                            Case 10001 to 25000: //Boost sales to 25K + 15% of last years sales
                                Goal := {Customer.Last Year's Sales} * 1.15 + 25000
                            Case 25001 to 50000: //Boost sales by 25%
                                Goal := {Customer.Last Year's Sales} * 1.25
                            Default:    // If over 50K last year, boost by 15%
                                Goal := {Customer.Last Year's Sales} * 1.15

        Field:    Contact Name Posessive
            Formula:    If Right({Customer.Contact Last Name},1) = "s" Then
                            {Customer.Contact Title} & " " & {Customer.Contact First Name} & " " & {Customer.Contact Last Name} & "'"
                        Else
                            {Customer.Contact Title} & " " & {Customer.Contact First Name} & " " & {Customer.Contact Last Name} & "'s"

    Page Header

        Section:    Section a

            Pictures

                Picture:    Picture10
                    Size:    764x883

    Detail

        Section:    Section a

            Fields

                Field:    PrintDate1
                    Data Source:    PrintDate
                    Data Type:    Date
                    Format:    Date and Time
                        Order:    Date Time
                        Date Type:    Custom
                        Date Format:    MMMM D, YYYY hh:mm:ss  AM

                Field:    CustomerName1
                    Data Source:    {Customer.Customer Name}
                    Data Type:    String

                Field:    Address11
                    Data Source:    {Customer.Address1}
                    Data Type:    String

                Field:    ContactName1
                    Data Source:    {@Contact Name}
                    Data Type:    String

            Pictures

                Picture:    Picture1
                    Size:    286x74

        Section:    Section b

            Fields

                Field:    Address21
                    Data Source:    {Customer.Address2}
                    Data Type:    String

        Section:    Section c

            Fields

                Field:    CityStateZip1
                    Data Source:    {@City State Zip}
                    Data Type:    String

                Field:    Salutation1
                    Data Source:    {@Salutation}
                    Data Type:    String

        Section:    Section d

            Conditional Formulas

                Condition:    EnableSuppress
                    Formula:    {Customer.Last Year's Sales} >= 25000

            Text Fields

                Text Field:    Text3
                    Text:    {@First Line} We truly appreciate your business, and trust that you found the quality of XTREME products to meet your expectations in every way.
                             
                             However, we are concerned that orders from {Customer.Customer Name} didn't meet our coordinated goal of at least $25,000 last year.
                             
                             We think that our products speak for themselves. And, we think when you look carefully at our line of high quality bicycles and accessories, you'll find that your customers will be happiest with XTREME products as well. So, as an incentive to increase sales of XTREME products in the coming year, we're doing two things:
                             
                             F	Extending {Customer.Customer Name} a 15 percent discount on new orders between now and the end of the year.
                             F	Holding a special gift with {@Contact Name Posessive} name on it. As soon as sales this year exceed our agreed-upon goal of {@Sales Goal}, we'll put this gift right in the mail to you!
                             
                             Together, we can work harder this year to not only improve our business relationship, but to provide your customers with the most fun, state-of-the-art, and reliable products in the industry!

        Section:    Section e

            Conditional Formulas

                Condition:    EnableSuppress
                    Formula:    {Customer.Last Year's Sales} < 25000

            Text Fields

                Text Field:    Text4
                    Text:    {@First Line} We truly appreciate your business, and trust that you found the quality of XTREME products to meet your expectations in every way.
                             
                             Not only did you exceed our common $25,000 goal for last year, but you helped "spread the word" on XTREME quality and value.
                             
                             We think that our products speak for themselves. And, we're glad that {Customer.Customer Name} recognizes this and passes the enthusiasm on to your customers. As thanks for your help in making last year the most successful in XTREME history, we're doing two things:
                             
                             F	Extending {Customer.Customer Name} a 10 percent discount on new orders between now and the end of the year.
                             F	Putting in the mail a special gift with {@Contact Name Posessive} name on it. Look for it to arrive on your doorstep soon!
                             
                             But, we're not resting here. We have aggressive goals for rolling out new, innovative products for the coming year. And, we are sharing our aggressive sales goals with our most successful dealers. We plan on working hard with you to attain sales of {@Sales Goal} during the coming year. Together, we can work harder this year to not only improve our business relationship, but to provide your customers with the most fun, state-of-the-art, and reliable products in the industry!

        Section:    Section f

            Text Fields

                Text Field:    Text5
                    Text:    Again, {Customer.Contact First Name}, thank you so much for your support and confidence in XTREME Mountain Bikes during the previous year. We're looking eagerly forward to continuing our great relationship into the future.
                             
                             Sincerely,

                Text Field:    Text1
                    Text:    Andrew Fuller
                             Vice President, Sales