Unable to specify a default date range in variable.

Stimulsoft Reports.WEB discussion
Post Reply
ryanr.eventpalette
Posts: 11
Joined: Tue Apr 21, 2015 11:12 am

Unable to specify a default date range in variable.

Post by ryanr.eventpalette »

I am using Stimulsoft Reports.Web 2014.3 Trial and created a cross tab report.
I used a date range variable to filter the report and I wanted the current date to be the default range upon the initial render of the report.
So I set the following variable properties: Type = datetime - Range, Init by = Expression, From = Today, To = Today, Date Time Format = Date.

All is fine upon the initial render of the report.
However, upon filtering the report using the selected date range, the report does not actualy get filtered.
And upon exporting the report to Excel, I get the following error: "Unable to cast object of type 'System.String' to type 'Stimulsoft.Report.Range'".

When I changed to variable properties to: Type = datetime - Range, Init by = Value, From = "01/01/2015", To = "01/01/2015", Date Time Format = Date.
The report worked fine. But this does not allow me to specify a default date range.

Can you please help me on how to achieve the desired functionality?
Thanks.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Unable to specify a default date range in variable.

Post by Alex K. »

Hello,

Can you please send us a simple report with test data which reproduce the issue for analysis.

Thank you.
ryanr.eventpalette
Posts: 11
Joined: Tue Apr 21, 2015 11:12 am

Re: Unable to specify a default date range in variable.

Post by ryanr.eventpalette »

Here is sample report which has a variable of type date range.
Sorry if I was not clear enough on this.
What I actually meant was I am unable to specify a default date range in variable using expression as init type.
Upon clicking Submit, the report just shows a loading image but nothing happens.
Upon saving to, Excel for example, the report encounters an error.
Please advise. Thanks.
Attachments
DateRangeSample.zip
(284.04 KiB) Downloaded 228 times
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Unable to specify a default date range in variable.

Post by HighAley »

Hello.

The report works right. You didn't set any filter for the databand.
The initial values of range variable are right too.

Thank you.
ryanr.eventpalette
Posts: 11
Joined: Tue Apr 21, 2015 11:12 am

Re: Unable to specify a default date range in variable.

Post by ryanr.eventpalette »

Hello.

Checked it again and it definitely encounters an error upon exporting (Save as Excel).
I did not filter the report on purpose but I thought the report should work even without applying the filter.
But it doesn't. Clicking submit does not do anything besides show a loading image which does not end.
May it has something to do with using a trial version? Or maybe this issue is already solved on the new release?
I searched in the forums and this post might be the same issue:
http://forum.stimulsoft.com/viewtopic.p ... 67&p=70882
Please advise. Thanks.
Attachments
daterangerror1.png
daterangerror1.png (69.59 KiB) Viewed 2223 times
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Unable to specify a default date range in variable.

Post by HighAley »

Hello.

We have made an improvement.
The fix will be available in our next prerelease build.

Thank you.
Post Reply