954,582 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

selction formula

how to select the records between two date ranges in selection formula in crystal report.i am beginner to crystal report.if anybody have
idea about this on pls forward ur result to my id

amir_ct2001
Newbie Poster
5 posts since Jun 2005
Reputation Points: 10
Solved Threads: 0
 

if ur using access backend:

dtpFrom and dtpTo are time controls being used on vb6 frontend

'format date values as MM/dd/yyyy
Dim DtFrom as String, DtTo as String
DtFrom = dtpFrom.Month & "/" & dtpFrom.Day & "/" & dtpFrom.Year
DtTo = dtpTo.Month & "/" & dtpTo.Day & "/" & dtpTo.Year

crptAttnRpt.ReportFileName = App.Path & "\Report\rptAttendance.rpt"
crptAttnRpt.SelectionFormula = "{tblAttendanceLog.AttndDate} >= #" & DtFrom & "# and {tblAttendanceLog.AttndDate} <= #" & DtTo & "#"
crptAttnRpt.Action = 1
crptAttnRpt.Destination = crptToWindow

or else use single quotes instead of # (if backend is not access)

Pixelzzz
Newbie Poster
2 posts since May 2005
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You