Results 1 to 10 of 10

Thread: crystal reports datetime problem (resolved)

Threaded View

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Apr 2002
    Posts
    638

    crystal reports datetime problem (resolved)

    i've got a crystal report that feeds off a stored procedure, that requires a datetime parameter. but when i pass a date in to the report from VB, i get a type mismatch error. this is the code i have to pass the date in:

    VB Code:
    1. pReport.ParameterFields(i).AddCurrentValue CDate(strParams(i - 1)) 'strParams(i - 1) is "01/01/01"


    i thought this might be because crystal wants a time as well, so i tried this:

    VB Code:
    1. pReport.ParameterFields(i).AddCurrentValue Format(strParams(i - 1), "dd/mm/yy hh:mm:ss")

    which still didn't work. then i tried just using the Now() function, and didn't get an error (although the report obviously returned no results).

    has anyone overcome this problem?
    Last edited by tr0n; Aug 30th, 2002 at 07:07 AM.

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