Results 1 to 3 of 3

Thread: CR 10.2 - Is this correct syntax?

  1. #1

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

    CR 10.2 - Is this correct syntax?

    I have a Crystal Report 10.2 that' I'm running with VB.Net 2005. My formula looks like this:

    Code:
    {tblTimeSheetDetail.beginPeriodDate} = '4/9/2007' AND 
    {tblTimeSheetDetail.beginPeriodDate} = '4/23/2007' AND 
    {tblTimeSheetDetail.beginPeriodDate} = '4/16/2007' AND 
    {tblTimeSheetDetail.project} = '2006SC013'
    I was wondering if this is correct syntax because I'm not getting any results on my report when I SHOULD be. The beginPeriodDate column is a String Type within my Table.

    Thanks,
    Blake

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

    Re: CR 10.2 - Is this correct syntax?

    The syntax is correct however logically the statement is incorrect. Use OR (or IN) on the beginPeriodDatefields not AND.

    ({tblTimeSheetDetail.beginPeriodDate} = '4/9/2007' OR
    {tblTimeSheetDetail.beginPeriodDate} = '4/23/2007' OR
    tblTimeSheetDetail.beginPeriodDate} = '4/16/2007') AND
    {tblTimeSheetDetail.project} = '2006SC013'

  3. #3

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

    Re: CR 10.2 - Is this correct syntax?

    Thanks Bruce...that worked. Do you know how I can pass the Date Values into my report. I'm sure you use parameters but I've never used parameters in CR before.
    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