Help with using date variable in Crystal reports selection formula

Help with using date variable in Crystal reports selection formula

Post by Brant Desmon » Wed, 27 May 1998 04:00:00



Can anybody help me with using a date variable in a crystal reports
selection formula. I have tried the code following, as well as enclosing in
# signs, and anything else you can think of but nothing seems to work.
Please help.

CrystalReport1.SelectionFormula = "{Customers.DateOfShow} = '" & txtDate &
"'"

Thank you

Brant.

 
 
 

Help with using date variable in Crystal reports selection formula

Post by Jay Vint » Wed, 27 May 1998 04:00:00


Specify your date value as Date(yyyy,mm,dd)

On Tue, 26 May 1998 14:42:18 +1000, "Brant Desmond"


>Can anybody help me with using a date variable in a crystal reports
>selection formula. I have tried the code following, as well as enclosing in
># signs, and anything else you can think of but nothing seems to work.
>Please help.

>CrystalReport1.SelectionFormula = "{Customers.DateOfShow} = '" & txtDate &
>"'"

>Thank you

>Brant.


 
 
 

Help with using date variable in Crystal reports selection formula

Post by Peter van Ren » Sun, 31 May 1998 04:00:00


I've been there.

As I recall my round about solution was along the lines of:

dim lnYear as integer
dim lnMonth as integer
dim lnDay as integer

lnYear = year(txtDate)
lnMonth = month(txtDate)
lnDay = day(txtDate)

CrystalReport1.SelectionFormula = "{Customers.DateOfShow} = date(" & lnYear
& "," & lnMonth & "," & lnDay & ")"

where year,month,day may not be in the right place - check the crystal date
function.

I agree that this is very awkward and if somebody has the better solution,
please share it.


>Can anybody help me with using a date variable in a crystal reports
>selection formula. I have tried the code following, as well as enclosing in
># signs, and anything else you can think of but nothing seems to work.
>Please help.

>CrystalReport1.SelectionFormula = "{Customers.DateOfShow} = '" & txtDate &
>"'"

>Thank you

>Brant.

 
 
 

1. HELP with selection formula in VB6 for Crystal Reports

I am trying to build a selection formula in VB6 for Crystal Reports.

I have tried this every way, except the correct way.

What I am trying to do is get a list of Dies that the width is
between 2 variable numbers.
That is to say:  ( find all dies that the width is =>2.5 and =< 3.625)

I am not sure if using between would include the High and Low numbers

Listed below is a NOT WORKING J example using  " => "

CrystalReport1.SelectionFormula = "{DIELIST.Width} = >" _
& txtAdjWidthLow & "" _
& and = <  txtAdjWidthHigh "

Any help with this would be greatly appreciated

TKS
   Bill

2. NUMBER datatype

3. Help: Crystal Report Selection Formula

4. Sorry, wrong adress

5. Crystal Reports Selection Formula

6. Foxpro 2.5 DOS LCK FAQ

7. Crystal Report V4.6 Selection Formula

8. Configuring JNDI DataSource in Tomcat 4.x

9. Using formula field in selection formula

10. Help: CR group selection formula with dates

11. Selection Formula - Crystal repors

12. Crystal Report Formula Help

13. HELP: Crystal Reports - recursive formulas/functions?