
CRYSTAL REPORT, run time query report by date
Hi,
Crystal needs the date format added so your query should look something like
this :-
"{filename.date} = Date(yyyy,mm,dd)"
I wrote the following function to automatically format the date so all I
have to pass is the following
"{filename.date} = Date(" & CrystalDate(Now) & ")"
Function CrystalDate(sDate As String)
Dim iDay As Integer
Dim iMonth As Integer
Dim iYear As Integer
iDay = Day(sDate)
iMonth = Month(sDate)
iYear = Year(sDate)
CrystalDate = CStr(iYear) & "," & CStr(iMonth) & "," & CStr(iDay)
End Function
Hope this helps !
Regards,
David.
Quote:
>Hi,
> Iam trying to create a query report during the run time by
>date.
>I used :
> crystalreport1.selectionformula = "{filename.date}=#" &
>text1.text &"#"
>but after I press ok, it's not responding at all. although
>this command is working with other data types e.g
>numbers,strings..etc.
>please if any body can help this will really be highly
>appreciated.
>Thanks
>Hisham
>* Sent from AltaVista http://www.altavista.com Where you can also find
related Web Pages, Images, Audios, Videos, News, and Shopping. Smart is
Beautiful