manishjoisar
Programmer
how to write custom function in Crystal
Can u give me syntax of it,
Following function i have written in VB.NET, now i want this function in Crystal Report, so i can pass two date and i get No. Of Weeks
Function (GetNoOfWeeks(ByVal sdate As Date, ByVal edate As Date)
Dim w1, w2, i As Integer
w1 = Weekday(sdate)
w2 = Weekday(edate)
sdate = DateAdd("d", 6 - w1, sdate)
edate = DateAdd("d", 6 - w2, edate)
i = 1
Do While Not DateDiff("d", sdate, edate) = 0
sdate = DateAdd("d", 7, sdate)
i = i + 1
Loop
GetNoOfWeeks = i
End Function
Is there any way i can get VB.NET functions in Crystal Reports, IN VB6 we can Named DLL With Prefix As CRUFL
so it is coming in Additional Function in VB6, but what is there for VB.NET
Can u give me syntax of it,
Following function i have written in VB.NET, now i want this function in Crystal Report, so i can pass two date and i get No. Of Weeks
Function (GetNoOfWeeks(ByVal sdate As Date, ByVal edate As Date)
Dim w1, w2, i As Integer
w1 = Weekday(sdate)
w2 = Weekday(edate)
sdate = DateAdd("d", 6 - w1, sdate)
edate = DateAdd("d", 6 - w2, edate)
i = 1
Do While Not DateDiff("d", sdate, edate) = 0
sdate = DateAdd("d", 7, sdate)
i = i + 1
Loop
GetNoOfWeeks = i
End Function
Is there any way i can get VB.NET functions in Crystal Reports, IN VB6 we can Named DLL With Prefix As CRUFL
so it is coming in Additional Function in VB6, but what is there for VB.NET