I try this:
Code: Select all
Dim v As New Stimulsoft.Report.Dictionary.StiVariable
v.Name = "MyName"
v.Alias = v.Name
v.Type = CType(GetType(Date), Type)
v.ReadOnly = False
v.Category = rv.Category
report.Dictionary.Variables.Add(v)
"v.Type = CType(GetType(Date), Type)"
The resulting reportvariable type is "DateTime", not "DateTime (nullable)" so if i pass a value of nothing the date is converted in today's date, if a pass a "date" variable (not assigned to any value) is converted in "01/01/0001". If i manually change the reportvariable type in "Datetime (nullable)" the field is left blank (that was i want).
So, how can i create by code a "DateTime (nullable)" reportvariable?
Or, alternatively, how can i print an empty field when i pass a value of "Nothing" to a "datetime" report variable?
Thanks.