Can we pass Date Value like (2/3/2023) to parameter variable that initby expression in stimulsoft?

188 views Asked by At

We have variable 'mydate' that has data type as DateTime and that is init by expression.

Can I pass a value like (2/3/2023) to this variable? Or do we have to pass the expression (Today.AddDays(8)) only?

It is working when we pass expression. But it is failing (throwing below error) with the value '2/3/2023'.

System.Exception: Compilation error: Cannot implicitly convert type 'int' to 'System.DateTime'

   at Stimulsoft.Report.StiReport.Compile(String path, Stream stream, StiOutputType outputType, Boolean autoCreate, Object standaloneReportType)
   at Stimulsoft.Report.Engine.StiReportV2Builder.RenderSingleReport(StiReport masterReport, StiRenderState renderState)
   at Stimulsoft.Report.StiReport.RenderReport(StiRenderState renderState)
   at Stimulsoft.Report.StiReport.Render(StiRenderState renderState, StiGuiMode guiMode)
   at Stimulsoft.Report.StiReport.Render(Boolean showProgress)

Snapshot for your reference:

enter image description here

Can someone help why it is not converting 2/3/2023 to DateTime when we pass value?

1

There are 1 answers

0
pvyas On

I got an answer from stimulsoft support:

Hello,

It seems I understand why you get the issue. The date should be in a specific format. Our engine can't parse this date.

Please, convert the date to the ISO 8601 format.

Thank you.