I figure I'll use ENDOFCURRENTMONTH as a default value for one of the parameters.
As soon as I do, I get a FormatException error from "ToDouble".
I was a bit puzzled by this, so digging in the decompiled LoadReport:
- Code: Select all
If (str10.ToUpper().IndexOf("ENDOFCURRENTMONTH") >= 0) Then
sysDateTime = Me.Manager.Database.SysDateTime
Dim num14 As Double = Conversions.ToDouble(sysDateTime.ToString("yyyy-MM-"))
sysDateTime = Me.Manager.Database.SysDateTime
Dim year As Integer = sysDateTime.Year
sysDateTime = Me.Manager.Database.SysDateTime
str10 = str10.Replace("ENDOFCURRENTMONTH", Conversions.ToString(num14 + CDbl(System.DateTime.DaysInMonth(year, sysDateTime.Month))))
End If
I am pretty sure that:
- Code: Select all
Dim num14 As Double = Conversions.ToDouble(sysDateTime.ToString("yyyy-MM-"))
Will never work.
I couldn't find mention of ENDOFCURRENTMONTH in the bug database.
Does that mean that I am the first person to try and use this promising feature?
I've tried to figure out a workaround, but it's not clear from the documentation I've found so far (i.e. where I found out about ENDOFCURRENTMONTH) how complicated I can make the //DEFAULT formula.