Date/Datetime expression conversion

Stimulsoft Reports.NET discussion
Post Reply
xss
Posts: 64
Joined: Wed Jun 10, 2009 3:03 am
Location: Austria

Date/Datetime expression conversion

Post by xss »

Dear sirs,

I am using Datasets as report data sources and date columns get mapped as datetime types in Designer. When the report gets rendered with null date fields, I get the message 'Expression in text property ... can't be evaluated." - this slows down rendering performance dramatically. If the data type gets changed to datetime (nullable) everything works as intended with great performance. I don't know the best way to avoid this. :?

1) Is there a way to define a .Net data type conversion map? For example, I can set that .Net date columns always get mapped as datetime (nullable).
2) The report engine verifies even datetime types if they are null.
3) After registering the data I loop through the Dictionary and change datetime types to datetime (nullable).
4) Check it in the text property with IIF(). Won't be my 1st choice...
5) Any other approaches?

Thanks a lot in advance.
xss
Posts: 64
Joined: Wed Jun 10, 2009 3:03 am
Location: Austria

Date/Datetime expression conversion

Post by xss »

Found it - Stimulsoft.Report.StiOptions.Dictionary.UseNullableDateTime = true;

Thank you anyway.

xss
Posts: 64
Joined: Wed Jun 10, 2009 3:03 am
Location: Austria

Date/Datetime expression conversion

Post by xss »

Now, when I set Stimulsoft.Report.StiOptions.Dictionary.UseNullableDateTime = true, everytime I synchronize the dictionary - f.e. in the Designer - the data type switches from datetime to datetime (nullable) and so on...
Andrew
Posts: 4109
Joined: Fri Jun 09, 2006 3:58 am

Date/Datetime expression conversion

Post by Andrew »

Hello,

We a happy that we have such smart users of our products. :biggrin:

Thank you.
xss
Posts: 64
Joined: Wed Jun 10, 2009 3:03 am
Location: Austria

Date/Datetime expression conversion

Post by xss »

Thank you :blush:. I'm glad that you guys made such a smart product!
xss
Posts: 64
Joined: Wed Jun 10, 2009 3:03 am
Location: Austria

Date/Datetime expression conversion

Post by xss »

xss wrote:Now, when I set Stimulsoft.Report.StiOptions.Dictionary.UseNullableDateTime = true, everytime I synchronize the dictionary - f.e. in the Designer - the data type switches from datetime to datetime (nullable) and so on...
Just a reminder, the bug is still in.

Version 2009.3.511.0

Best Regards
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

Date/Datetime expression conversion

Post by Jan »

Hello,

Please check build from 19 October (when it will be available).

Thank you.
Brainstorm
Posts: 31
Joined: Thu Feb 17, 2011 1:54 pm
Location: Cuiaba, Brazil

Date/Datetime expression conversion

Post by Brainstorm »

This bug is still in, using 2011.2, can be reproduced exactly like described above.
Setting to nullable solves it until the dataset is repopulated.

Datetime with null fields = veeeeeeeeeeery slow rendering.

EDIT
Fixed the problem on one specific report by changing the report properties. I set the End Render (so it is executed after the report and database select are finished) event to:
Stimulsoft.Report.StiOptions.Dictionary.UseNullableDateTime = true;

As seen on the screenshot:
Image


Please fix this bug, it can get annoying to remember to do this on every report we run into this issue.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Date/Datetime expression conversion

Post by HighAley »

Hello.

In our release 2011.2 was added new utility OptionsHelper.
The utility is designed to save the required properties of the class Stimulsoft.Report.StiOptions to an xml file and then use it in Stimulsoft Reports.
Save the settings to a file named Options.xml.
Copy the file to a folder with the file Designer.exe.
The file also can be loaded from code: Stimulsoft.Report.Helper.StiOptionsHelper.LoadOptions ("c:\\Options.xml");

Thank you.
Post Reply