Problem using DateTimeOffSet in BussinessObjects

Stimulsoft Reports.WEB discussion
Post Reply
Daniel Schmitz
Posts: 32
Joined: Tue Jul 03, 2012 2:16 pm

Problem using DateTimeOffSet in BussinessObjects

Post by Daniel Schmitz »

Hello.

I'm having some problems using a DateTimeOffSet property in a BussinessObjects, and trying to compile the report.

When I register my object in report's dictionary, and I look inside it, it is a DateTimeOffSet, so ok.
But in designer's dictionary tree it is shown as Object.
And the same happens when I send it back to the server, and I try to look inside the dictionary.

So the problem is that, if my report have some code like:

Code: Select all

Person.Birthdate.ToString("yyyy-MM-dd");
and I try to compile my report in server side:

Code: Select all

report.Compile("AnyPath...");
I get an error saying that Object does not contains a ToString(string) overload.

Thank you.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Problem using DateTimeOffSet in BussinessObjects

Post by HighAley »

Hello.

Unfortunately, this type like other not standard types is not supported in WebDesigner now.
This task is in our to-do list.

Thank you.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Problem using DateTimeOffSet in BussinessObjects

Post by HighAley »

Hello.

The DateTimeOffSet type is absent in the .Net Framework 2.0. We can not add this type because we will lost compatibility with .Net Framework 2.0 and we have many customers that use this version of framework.

We have in plans to discontinue support of the .Net Framework 2.0, 3.5 to the next year.

There is a workaround you could use next expression:

Code: Select all

((DateTimeOffset)Person.Birthdate).ToString("yyyy-MM-dd");
Thank you.
Post Reply