Results 1 to 3 of 3

Thread: [RESOLVED] CR 10.2 Error Message in Formula???

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Jan 2004
    Location
    Southern California
    Posts
    5,034

    Resolved [RESOLVED] CR 10.2 Error Message in Formula???

    I am getting the following error message on the highlighted code from a Crystal Report 10.2 formula:

    "A variable type (for example 'String') is missing"

    Here is my CR Formula in Basic Syntax

    Code:
    Dim intMonth as Int
    
    intMonth = Month (DateValue ({tblTimeSheetDetail.beginPeriodDate}))
    
    Select Case intMonth
       Case 1
            Formula = "January"
       Case 2
            Formula = "February"
       Case 3
            Formula = "March"
       Case 4
            Formula = "April"
       Case 5
            Formula = "May"
       Case 6
            Formula = "June"
       Case 7
            Formula = "July"
       Case 8
            Formula = "August"
       Case 9
            Formula = "September"
       Case 10
            Formula = "October"
       Case 11
            Formula = "November"
       Case 12
            Formula = "December"
    End Select
    What am I doing wrong?

    Thanks,
    Blake

  2. #2
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758

    Re: CR 10.2 Error Message in Formula???

    int isn't a variable type. Crystal does not have integer types. Use

    Dim x As Number

    or simply

    formula=MonthName (Month (DateValue ({tblTimeSheetDetail.beginPeriodDate})))
    Last edited by brucevde; Apr 11th, 2007 at 11:35 AM.

  3. #3

    Thread Starter
    PowerPoster
    Join Date
    Jan 2004
    Location
    Southern California
    Posts
    5,034

    Re: CR 10.2 Error Message in Formula???

    Thanks Bruce!
    Blake

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width