p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

crystal_reports thread: datetime format for parameter of CrystalReport 7


Message #1 by "Boris Pelmenstein" <boris@s...> on Wed, 30 May 2001 13:12:47
I want to change the parameter of the report created in Crystal Report 

designer 7 from VB. I am calling AddCurrentValue method of the

ParameterFieldDefinition object with the argument in the form:

#d/m/yyyy#. Type of this parameter is Datetime.

I get run-time error: "Type mismatch" (No.13).

In the Crystal report 8 this works perfectly!

The arguments of other types (Long, etc) work OK in CR7



Can anyone answer me what is a format of the datetime argument that

this method can accept?



Boris
Message #2 by Harry Jega Nathan <hjeganathan@y...> on Wed, 30 May 2001 09:32:56 -0400 (EDT)
Date time parameter don't work with vb in CR v7 it

works on cr v8. work around is send the date as time

string then format the value in CR v 7.

Thanks

Harry

--- Boris Pelmenstein <boris@s...> wrote:

> I want to change the parameter of the report created

> in Crystal Report 

> designer 7 from VB. I am calling AddCurrentValue

> method of the

> ParameterFieldDefinition object with the argument in

> the form:

> #d/m/yyyy#. Type of this parameter is Datetime.

> I get run-time error: "Type mismatch" (No.13).

> In the Crystal report 8 this works perfectly!

> The arguments of other types (Long, etc) work OK in

> CR7

> 

> Can anyone answer me what is a format of the

> datetime argument that

> this method can accept?

> 

> Boris

>

Message #3 by Boris Pelmenstein <borisp@y...> on Wed, 30 May 2001 17:04:54 +0200
Dear Harry,



Thank You very much. Now this is more clear for me.



However in order be sure in 100%:

What is means of the "sending the date as time

string" - can You send me the example of this

argument?



Boris



-----Original Message-----

From: Harry Jega Nathan [mailto:hjeganathan@y...]

Sent: Wednesday, May 30, 2001 3:33 PM

To: crystal_reports

Subject: [crystal_reports] Re: datetime format for parameter of

CrystalReport 7





Date time parameter don't work with vb in CR v7 it

works on cr v8. work around is send the date as time

string then format the value in CR v 7.

Thanks

Harry

--- Boris Pelmenstein <boris@s...> wrote:

> I want to change the parameter of the report created

> in Crystal Report 

> designer 7 from VB. I am calling AddCurrentValue

> method of the

> ParameterFieldDefinition object with the argument in

> the form:

> #d/m/yyyy#. Type of this parameter is Datetime.

> I get run-time error: "Type mismatch" (No.13).

> In the Crystal report 8 this works perfectly!

> The arguments of other types (Long, etc) work OK in

> CR7

> 

> Can anyone answer me what is a format of the

> datetime argument that

> this method can accept?

> 

> Boris

>

Message #4 by Brian Smith <Brian.Smith@R...> on Wed, 30 May 2001 11:48:19 -0500
I believe he means to send the datetime as a string value (example:

CStr(Now)), and let CR7 handle converting the string back into a datetime

value.



/Brian



-----Original Message-----

From: Boris Pelmenstein [mailto:borisp@y...] 

Sent: Wednesday, May 30, 2001 10:05 AM

To: crystal_reports

Subject: [crystal_reports] Re: datetime format for parameter of Crysta

lReport 7





Dear Harry,



Thank You very much. Now this is more clear for me.



However in order be sure in 100%:

What is means of the "sending the date as time

string" - can You send me the example of this

argument?



Boris



-----Original Message-----

From: Harry Jega Nathan [mailto:hjeganathan@y...]

Sent: Wednesday, May 30, 2001 3:33 PM

To: crystal_reports

Subject: [crystal_reports] Re: datetime format for parameter of

CrystalReport 7





Date time parameter don't work with vb in CR v7 it

works on cr v8. work around is send the date as time

string then format the value in CR v 7.

Thanks

Harry

--- Boris Pelmenstein <boris@s...> wrote:

> I want to change the parameter of the report created

> in Crystal Report

> designer 7 from VB. I am calling AddCurrentValue

> method of the

> ParameterFieldDefinition object with the argument in

> the form:

> #d/m/yyyy#. Type of this parameter is Datetime.

> I get run-time error: "Type mismatch" (No.13).

> In the Crystal report 8 this works perfectly!

> The arguments of other types (Long, etc) work OK in

> CR7

> 

> Can anyone answer me what is a format of the

> datetime argument that

> this method can accept?

> 

> Boris

>


  Return to Index