avg, sum of timespan objects

Stimulsoft Reports.WEB discussion
Post Reply
erikbrandvig
Posts: 25
Joined: Tue Apr 26, 2011 1:01 pm
Location: Vista, CA

avg, sum of timespan objects

Post by erikbrandvig »

i am attempting to average or sum a number of timespan objects using the "results" tab inside a "data from other datasource" definition, and instead of an error message, i get a blank screen.

i can average them correctly if i change them to a .TotalSeconds double... but i want to keep it in the correct timespan format.

is that possible?

thanks

erik
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

avg, sum of timespan objects

Post by Vladimir »

Hello, Erik

We have fixed this error, the update will be available in prerelease build on May, 24.

Thank you.
jay@bplogix.com
Posts: 251
Joined: Fri Feb 04, 2011 11:46 am
Location: San Diego, CA

avg, sum of timespan objects

Post by jay@bplogix.com »

This does not appear to have been fixed in the latest pre-release.
I have a calculated column as a timespan set to DateDiff(new DateTime(2011,3,1),new DateTime(2011,2,2))
I then create a Data from other Data Source against that table. In the Results tab I add the timespan column and select Avg as the Aggregate function. This automatically creates a column in the new datasource, but its type is incorrectly set to decimal. When I change the type to timespan the report fails when run.
Andrew
Posts: 4108
Joined: Fri Jun 09, 2006 3:58 am

avg, sum of timespan objects

Post by Andrew »

Hello, Jay.

Calculated columns cannot be used in Data from other Data Source. Even if they are shown, then they work incorrectly. So, please do not use them in the Data from other Data Source.

Thank you.
jay@bplogix.com
Posts: 251
Joined: Fri Feb 04, 2011 11:46 am
Location: San Diego, CA

avg, sum of timespan objects

Post by jay@bplogix.com »

Is it just TimeSpan calculated columns that dont work in "Data from other Data Sources" ... or ANY calculated column? We have been calculating the average of a decimal Calculated column fine in the "Data from other Data Sources".

thx,
Jay
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

avg, sum of timespan objects

Post by Alex K. »

Hello,

If you add calculated columns (not only the TimeSpan type) to the data source, and then, on its basis, create "Data from other Data Sources", then, in the new data source, calculated columns obtained from the main data source may work incorrectly. In the .Net version of the product they are invisible from the dialog box when adding.

Thank you.
Post Reply