Page 1 of 1

How to create a report variable "datetime (Nullable)" in Vb.NET code

Posted: Tue May 27, 2008 5:01 am
by Fabio Pagano
I need to create through my Vb.Net Program a report variable of "datetime (Nullable)" type. Actually i only can create a report variable "datetime" (not nullable).

This is my code:

Code: Select all

Dim v As New Stimulsoft.Report.Dictionary.StiVariable
v.Name = "MyName"
v.Type = CType(GetType(Date), Type)
v.ReadOnly = False
report.Dictionary.Variables.Add(v)
Thanks.

How to create a report variable "datetime (Nullable)" in Vb.NET code

Posted: Tue May 27, 2008 5:18 am
by Edward
Please use the following code:

for declaring:
Dim Variable1 As Nullable(Of DateTime)

for adding:
Report.Dictionary.Variables.Add(New Stimulsoft.Report.Dictionary.StiVariable("", "MyVariablename", "MyVariableAlias", GetType(Nullable(Of DateTime)), "5/27/2008", false, false))

Thank you.