Hi,
I'm trying to set up a DateTime variable in my report (well two a StartDate and EndDate). I've tried running the report via my VB.Net code as well as straight from the Stimulsoft Designer, neither work!
How can I change the datetime format to DD/MM/YYYY rather than american format?
How do I then pass in the two dates from my VB.Net code to the report. I've tired the following code:
Dim report As New StiReport()
Dim fs As FileStream
fs = New FileStream(Server.MapPath("/Reports/MyReport.mrt"), FileMode.Open, FileAccess.Read)
Dim buffer(fs.Length) As Byte
fs.Read(buffer, 0, buffer.Length)
fs.Close()
report.Load(buffer)
report.Dictionary.Databases.Clear()
report.Dictionary.Databases.Add(New StiSqlDatabase("EasyBuildConnection", MyConnectionString))
report.Compile()
'format the parameters
StartDate = GetDate(StartDate)
EndDate = GetDate(EndDate)
'give the report it's parameters
report("StartDate") = StartDate
report("EndDate") = EndDate
report.Render()
It's looking at a SQLServer dbase, with the dates set as datetime though i would rather just pass in a date.
Currently when i try to run it via the Designer it tells me that '12' is invalid, so for some reason doesnt seem to like the time?
Cheers,
Michelle
DateTime Variable
DateTime Variable
Hai,
If you use query then you can format date using below code
select convert(varchar(100),getdate(),103)
Thank You
Jay
If you use query then you can format date using below code
select convert(varchar(100),getdate(),103)
Thank You
Jay