Results 1 to 2 of 2

Thread: Crystal report - between two dates

  1. #1

    Thread Starter
    Hyperactive Member sterankin's Avatar
    Join Date
    Jul 2001
    Location
    N.Ireland
    Posts
    336

    Crystal report - between two dates

    I am using VB6 with crystal reports 9.
    I have this SQL statement as a command in crystal reports.


    SELECT DISTINCT Samplepoint, TestType, SUM(Result)
    FROM Daily WHERE Result <> 'none'
    GROUP by SamplePoint, TestType


    On my VB form, the user will select two dates to search between, and only results that occur between those two dates will be displayed on the crystal report.

    How would I do this?

    Can VB change the crystal report SQL command at runtime?

    Many Thanks


    "The Dude abides...."

  2. #2
    PowerPoster Pasvorto's Avatar
    Join Date
    Oct 2002
    Location
    Minnesota, USA
    Posts
    2,951
    How about this...

    SELECT DISTINCT Samplepoint, TestType, SUM(Result)
    FROM Daily WHERE Result <> 'none'
    and Date <= EndDateEntered
    and Date >= StartDateEntered
    GROUP by SamplePoint, TestType

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