Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Data Report/Crystal Report Problem

Status
Not open for further replies.

ISChana

Programmer
Dec 18, 2002
32
0
0
IN
Dear All

Pl. help me on this ;;

I had made data report but i was unable to put sr no. in the report..pl. suggest how to do that

then i tried to make this report in Crystal report. Serial no probelm was solved but then problem came of filtering the records.

i like to filter records based on a particular date(Entered by the user)e.g. user enter date in field dt_input
i wrote following query

cr.selectionformula="table.field=#dt_input#"

but problem was not solved
so please suggest the solution..

regards

Inderjeet
 
try

Code:
cr.selectionformula="{table.field}=#dt_input#"

Note the extra curly brackets..

Patrick
 
i tried the same but actually access has DATE/TIME fields while through VB coding it goes DATE only

that's why error comes..

error in record selection formula
A date time s required here

so please suggest..
 
Using redsmooth's example, try using Crystal's CDateTime function to cast the date to a Date/Time:

cr.selectionformula="{table.field}=CDateTime('" & dt_input & "')"

-dave
 
I don't have right now Crystal Reports on this computer but i remember that crytal use this format yy/mm/dd on a function called date so try this

cr.selectionformula="#table=Date(" & year(dtinput) & "," & month(dtinput) & "," & day(dtinput) & ")"



===================================
Never underestimate the power of stupid people in big numbers
===================================
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top