Help - Crystal Reports Problem 
Author Message
 Help - Crystal Reports Problem

I am using vb5 to connect to an access 8 database. there is a date / time
field in there. in Visual Basic , i have a form with a mask box picking up
a date. the date is read into a variable. basically i am trying to open up
a report based on the date. i would also like to try a range of dates ie
start date , end date.

this is what i have for one date, but nothing happens.

 cryReport.SelectionFormula = "{qEmployeeWorkDone.date} = " & Chr(34) &
sdate & Chr(34)

any help appreciated

thanks

Troy



Mon, 12 Feb 2001 03:00:00 GMT  
 Help - Crystal Reports Problem

Quote:
> cryReport.SelectionFormula = "{qEmployeeWorkDone.date} = " & Chr(34) &
>sdate & Chr(34)

Convert date to plain string and send plain string as parametar to Crystal
Reports.

--
Josip



Tue, 13 Feb 2001 03:00:00 GMT  
 Help - Crystal Reports Problem
Hi,
  1) You can define a variable in the form like : Dim  MDstartDate  AS Date

  2) in the sub cmdPrint_click,set the value of MDstartDate
     MDstartDate=Cdate(mskDate.text)
  3) Change the selection formula

cryreport.selectionfornula="{qEmployeeWorkDone.date}=Date(Year(mdstartdate),
month(mdstartdate),day(mdstartdate))"
     Because I noticed that CR recogize the date in format  yy,mm,dd .
  Hope this can help you.



Quote:
> I am using vb5 to connect to an access 8 database. there is a date / time
> field in there. in visual basic , i have a form with a mask box picking
up
> a date. the date is read into a variable. basically i am trying to open
up
> a report based on the date. i would also like to try a range of dates ie
> start date , end date.

> this is what i have for one date, but nothing happens.

>  cryReport.SelectionFormula = "{qEmployeeWorkDone.date} = " & Chr(34) &
> sdate & Chr(34)

> any help appreciated

> thanks

> Troy



Wed, 14 Feb 2001 03:00:00 GMT  
 Help - Crystal Reports Problem
hi, I am sorry. I noticed that there is some mistake in the following code
3).
It is should be :
 cryreport.SelectionFormula="{table.datefield}=Date("  _
                        & Year(mdStartDate) & "," & Month(mdStartDate) _
                        & "," & Day(mdStartDate) & ")"
Actually the result should like this: {table.datefield}=Date(1998,9,4)
I Hope and believe this time it is really works.


Tue, 20 Feb 2001 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Help!!!!: Crystal Reports Problem

2. Crystal Report Help Please or Tell me where to get Crystal Help

3. Printing Crystal Reports without Crystal Control ActiveX or Crystal Reports API call

4. Help: Crystal Reports section subtotal problem...

5. Help: Crystal Report 6.0 OLE / DAO problem

6. Help wanted, problem with Crystal Report 6

7. Help !!!: Problem with Crystal Report

8. Help !! : problem with Crystal Report and Null fields

9. Password problem using Crystal Reports HELP ME !!

10. Crystal reports problem - help ?

11. Crystal Reports Problems, Help

12. CRYSTAL REPORTS PROBLEM HELP!

 

 
Powered by phpBB® Forum Software